[−][src]Struct mqttest::OptMsDuration
Convenience type to save on typing an Option<Duration>
.
fn fmt_opt_duration(od: impl Into<OptMsDuration>) -> String { format!("{:?}", od.into().0) } assert_eq!("None", &fmt_opt_duration(None)); assert_eq!("Some(0ns)", &fmt_opt_duration(Some(Duration::from_millis(0)))); assert_eq!("Some(1s)", &fmt_opt_duration(Duration::from_secs(1))); assert_eq!("Some(2s)", &fmt_opt_duration(2000));
Trait Implementations
impl From<Duration> for OptMsDuration
[src]
impl From<Option<Duration>> for OptMsDuration
[src]
impl From<u64> for OptMsDuration
[src]
Auto Trait Implementations
impl RefUnwindSafe for OptMsDuration
impl Send for OptMsDuration
impl Sync for OptMsDuration
impl Unpin for OptMsDuration
impl UnwindSafe for OptMsDuration
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,