Struct TryFromFloatSecsError

struct TryFromFloatSecsError { ... }

An error which can be returned when converting a floating-point value of seconds into a Duration.

This error is used as the error type for Duration::try_from_secs_f32 and Duration::try_from_secs_f64.

Example

use std::time::Duration;

if let Err(e) = Duration::try_from_secs_f32(-1.0) {
    println!("Failed conversion to Duration: {e}");
}

Implementations

impl Clone for TryFromFloatSecsError

fn clone(self: &Self) -> TryFromFloatSecsError

impl Debug for TryFromFloatSecsError

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl Display for TryFromFloatSecsError

fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

impl Eq for TryFromFloatSecsError

impl Error for crate::time::TryFromFloatSecsError

impl Freeze for TryFromFloatSecsError

impl PartialEq for TryFromFloatSecsError

fn eq(self: &Self, other: &TryFromFloatSecsError) -> bool

impl RefUnwindSafe for TryFromFloatSecsError

impl Send for TryFromFloatSecsError

impl StructuralPartialEq for TryFromFloatSecsError

impl Sync for TryFromFloatSecsError

impl Unpin for TryFromFloatSecsError

impl UnwindSafe for TryFromFloatSecsError

impl<T> Any for TryFromFloatSecsError

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for TryFromFloatSecsError

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for TryFromFloatSecsError

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for TryFromFloatSecsError

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for TryFromFloatSecsError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for TryFromFloatSecsError

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for TryFromFloatSecsError

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for TryFromFloatSecsError

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>