Struct sp_std::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}");
}
Trait Implementations§
source§impl Clone for TryFromFloatSecsError
impl Clone for TryFromFloatSecsError
source§fn clone(&self) -> TryFromFloatSecsError
fn clone(&self) -> TryFromFloatSecsError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TryFromFloatSecsError
impl Debug for TryFromFloatSecsError
source§impl Display for TryFromFloatSecsError
impl Display for TryFromFloatSecsError
source§impl Error for TryFromFloatSecsError
impl Error for TryFromFloatSecsError
1.30.0 · source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq<TryFromFloatSecsError> for TryFromFloatSecsError
impl PartialEq<TryFromFloatSecsError> for TryFromFloatSecsError
source§fn eq(&self, other: &TryFromFloatSecsError) -> bool
fn eq(&self, other: &TryFromFloatSecsError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.