pub struct Generic<T> { /* private fields */ }
Expand description
The Generic
Duration
type allows an arbitrary scaling factor to be used without having to
impl FixedPoint
.
The purpose of this type is to allow a simple Duration
object that can be defined at run-time.
It does this by replacing the const
scaling factor with a struct field.
Implementations§
Trait Implementations§
Source§impl<T: TimeInt> From<Microseconds<T>> for Generic<T>
impl<T: TimeInt> From<Microseconds<T>> for Generic<T>
Source§fn from(duration: Microseconds<T>) -> Self
fn from(duration: Microseconds<T>) -> Self
Source§impl<T: TimeInt> From<Milliseconds<T>> for Generic<T>
impl<T: TimeInt> From<Milliseconds<T>> for Generic<T>
Source§fn from(duration: Milliseconds<T>) -> Self
fn from(duration: Milliseconds<T>) -> Self
Source§impl<T: TimeInt> From<Nanoseconds<T>> for Generic<T>
impl<T: TimeInt> From<Nanoseconds<T>> for Generic<T>
Source§fn from(duration: Nanoseconds<T>) -> Self
fn from(duration: Nanoseconds<T>) -> Self
Source§impl<T: TimeInt> Ord for Generic<T>
impl<T: TimeInt> Ord for Generic<T>
Source§impl<T: TimeInt> PartialOrd for Generic<T>
impl<T: TimeInt> PartialOrd for Generic<T>
impl<T: Copy> Copy for Generic<T>
impl<T: TimeInt> Duration for Generic<T>
impl<T: TimeInt> Eq for Generic<T>
Auto Trait Implementations§
impl<T> Freeze for Generic<T>where
T: Freeze,
impl<T> RefUnwindSafe for Generic<T>where
T: RefUnwindSafe,
impl<T> Send for Generic<T>where
T: Send,
impl<T> Sync for Generic<T>where
T: Sync,
impl<T> Unpin for Generic<T>where
T: Unpin,
impl<T> UnwindSafe for Generic<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more