Struct core::time::TryFromFloatSecsError
1.66.0 · source · pub struct TryFromFloatSecsError { /* private fields */ }
Expand description
将秒的浮点值转换为 Duration
时可能返回的错误。
此错误用作 Duration::try_from_secs_f32
和 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§
source§impl Clone for TryFromFloatSecsError
impl Clone for TryFromFloatSecsError
source§fn clone(&self) -> TryFromFloatSecsError
fn clone(&self) -> TryFromFloatSecsError
返回值的副本。 Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
从
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
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
从拥有的值中借用。 Read more