Struct std::time::FromFloatSecsError
source · [−]pub struct FromFloatSecsError { /* 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
#![feature(duration_checked_float)]
use std::time::Duration;
if let Err(e) = Duration::try_from_secs_f32(-1.0) {
println!("Failed conversion to Duration: {e}");
}RunTrait Implementations
impl Clone for FromFloatSecsError
source
impl Clone for FromFloatSecsError
sourcefn clone(&self) -> FromFloatSecsError
source
fn clone(&self) -> FromFloatSecsError
sourceReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0 · source
fn clone_from(&mut self, source: &Self)
1.0.0 · sourcePerforms copy-assignment from source. Read more
impl Debug for FromFloatSecsError
source
impl Debug for FromFloatSecsError
sourceimpl Display for FromFloatSecsError
source
impl Display for FromFloatSecsError
sourceimpl Error for FromFloatSecsError
source
impl Error for FromFloatSecsError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0 · source
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0 · sourceThe lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
source
fn backtrace(&self) -> Option<&Backtrace>
sourceReturns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0 · source
fn description(&self) -> &str
1.0.0 · source👎 Deprecated since 1.42.0:
use the Display impl or to_string()
impl PartialEq<FromFloatSecsError> for FromFloatSecsError
source
impl PartialEq<FromFloatSecsError> for FromFloatSecsError
sourcefn eq(&self, other: &FromFloatSecsError) -> bool
source
fn eq(&self, other: &FromFloatSecsError) -> bool
sourceThis method tests for self and other values to be equal, and is used
by ==. Read more
fn ne(&self, other: &FromFloatSecsError) -> bool
source
fn ne(&self, other: &FromFloatSecsError) -> bool
sourceThis method tests for !=.
impl Eq for FromFloatSecsError
sourceimpl StructuralEq for FromFloatSecsError
sourceimpl StructuralPartialEq for FromFloatSecsError
sourceAuto Trait Implementations
impl RefUnwindSafe for FromFloatSecsError
impl Send for FromFloatSecsError
impl Sync for FromFloatSecsError
impl Unpin for FromFloatSecsError
impl UnwindSafe for FromFloatSecsError
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more