Trait float_duration::duration::FromDuration
[−]
[src]
pub trait FromDuration<T>: Sized { type Error; fn from_duration(from: T) -> Result<Self, Self::Error>; }
A fallible conversion from one duration representation to another.
This is very similar to the std::convert::TryFrom
trait which is currently
unstable.
Associated Types
type Error
Required Methods
fn from_duration(from: T) -> Result<Self, Self::Error>
Convert from
into a Self
object.
Implementors
impl FromDuration<Duration> for FloatDuration
impl FromDuration<Duration> for FloatDuration
impl FromDuration<FloatDuration> for std::time::duration::Duration
impl FromDuration<FloatDuration> for time::duration::Duration