Struct core::time::TryFromFloatSecsError
1.66.0 · source · pub struct TryFromFloatSecsError { /* private fields */ }
Expand description
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}");
}
RunTrait Implementations
sourceimpl Clone for TryFromFloatSecsError
impl Clone for TryFromFloatSecsError
sourcefn clone(&self) -> TryFromFloatSecsError
fn clone(&self) -> TryFromFloatSecsError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TryFromFloatSecsError
impl Debug for TryFromFloatSecsError
sourceimpl Display for TryFromFloatSecsError
impl Display for TryFromFloatSecsError
sourceimpl Error for TryFromFloatSecsError
impl Error for TryFromFloatSecsError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl PartialEq<TryFromFloatSecsError> for TryFromFloatSecsError
impl PartialEq<TryFromFloatSecsError> for TryFromFloatSecsError
sourcefn eq(&self, other: &TryFromFloatSecsError) -> bool
fn eq(&self, other: &TryFromFloatSecsError) -> bool
impl Eq for TryFromFloatSecsError
impl StructuralEq for TryFromFloatSecsError
impl StructuralPartialEq for TryFromFloatSecsError
Auto Trait Implementations
impl RefUnwindSafe for TryFromFloatSecsError
impl Send for TryFromFloatSecsError
impl Sync for TryFromFloatSecsError
impl Unpin for TryFromFloatSecsError
impl UnwindSafe for TryFromFloatSecsError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more