Enum TimeUnit

Source
pub enum TimeUnit {
    Nanos,
    Micros,
    Millis,
    Secs,
}

Variants§

§

Nanos

§

Micros

§

Millis

§

Secs

Trait Implementations§

Source§

impl Clone for TimeUnit

Source§

fn clone(&self) -> TimeUnit

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TimeUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl FromStr for TimeUnit

Source§

type Err = ParseUnitError

The associated error which can be returned from parsing.
Source§

fn from_str(unit: &str) -> Result<TimeUnit, ParseUnitError>

Parses a string s to return a value of this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyExt for T

Source§

fn drop(self)

Chainable drop
Source§

fn into_some(self) -> Option<Self>

Convert value to Some(value)
Source§

fn into_ok<B>(self) -> Result<Self, B>

Convert value to Ok(value)
Source§

fn into_err<A>(self) -> Result<A, Self>

Convert value to Err(value)
Source§

fn into_box(self) -> Box<Self>

Convert value to Box::new(value)
Source§

fn into_cell(self) -> Cell<Self>

Convert value to Cell::new(value)
Source§

fn into_refcell(self) -> RefCell<Self>

Convert value to RefCell::new(value)
Source§

fn into_rc(self) -> Rc<Self>

Convert value to Rc::new(value)
Source§

fn into_rc_cell(self) -> Rc<Cell<Self>>

Convert value to Rc::new(Cell::new(value))
Source§

fn into_rc_refcell(self) -> Rc<RefCell<Self>>

Convert value to Rc::new(RefCell::new(value))
Source§

fn into_arc(self) -> Arc<Self>

Convert value to Arc::new(value)
Source§

fn type_name(self) -> &'static str

Consumes self, returns the name of its type as a string slice and the receiver self. Read more
Source§

fn type_size(self) -> usize

Consumes self, returns the size of its type in number and the receiver self. Read more
Source§

fn type_name_with_value(self) -> (&'static str, Self)

Consumes self, returns the name of its type as a string slice and the receiver self. Read more
Source§

fn type_size_with_value(self) -> (usize, Self)

Consumes self, returns the size of its type in number and the receiver self. Read more
Source§

fn if_take(self, f: impl FnOnce(&Self) -> bool) -> Option<Self>

Returns Some(self) if it satisfies the given predicate function, or None if it doesn’t. Read more
Source§

fn if_not_take(self, f: impl FnOnce(&Self) -> bool) -> Option<Self>

Returns Some(self) if it doesn’t satisfy the given predicate function, or None if it does. Read more
Source§

impl<T, R> AnyExt1<R> for T

Source§

fn y(self, f: impl Copy + Fn(&dyn Fn(Self) -> R, Self) -> R) -> R

The Y Combinator Read more
Source§

fn if_then( self, if: impl FnOnce(&Self) -> bool, then: impl FnOnce(Self) -> R, ) -> Option<R>

Returns Some(f()) if it satisfies the given predicate function, or None if it doesn’t. Read more
Source§

fn if_not_then( self, unless: impl FnOnce(&Self) -> bool, then: impl FnOnce(Self) -> R, ) -> Option<R>

Returns Some(f()) if it doesn’t satisfy the given predicate function, or None if it does. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, R> Op<R> for T

Source§

fn add_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Add,

The continuation supporting for Add operator Read more
Source§

fn sub_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Sub,

The continuation supporting for Sub operator Read more
Source§

fn mul_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Mul,

The continuation supporting for Mul operator Read more
Source§

fn div_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Div,

The continuation supporting for Div operator Read more
Source§

fn rem_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Rem,

The continuation supporting for Rem operator Read more
Source§

fn neg_c(self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Neg,

The continuation supporting for Neg operator
Source§

fn not_c(self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Not,

The continuation supporting for Not operator
Source§

fn shl_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Shl,

The continuation supporting for Shl operator
Source§

fn shr_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: Shr,

The continuation supporting for Shr operator
Source§

fn bit_and_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: BitAnd,

The continuation supporting for BitAnd operator
Source§

fn bit_or_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: BitOr,

The continuation supporting for BitOr operator
Source§

fn bit_xor_c(self, other: Self, k: impl FnOnce(Self::Output) -> R) -> R
where Self: BitXor,

The continuation supporting for BitXor operator
Source§

fn cmp_c(&self, other: &Self, k: impl FnOnce(Ordering) -> R) -> R
where Self: Ord,

The continuation supporting for the cmp function of Ord operator
Source§

impl<T, R> Pipe<R> for T
where T: ?Sized,

Source§

fn pipe(self, f: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a>(&'a self, f: impl FnOnce(&'a Self) -> R) -> R

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_mut<'a>(&'a mut self, f: impl FnOnce(&'a mut Self) -> R) -> R

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B>(&'a self, f: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B>(&'a mut self, f: impl FnOnce(&'a mut B) -> R) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U>(&'a self, f: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U>(&'a mut self, f: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T>(&'a self, f: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T>(&'a mut self, f: impl FnOnce(&'a mut T) -> R) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> StdAnyExt for T

Source§

fn dbg(self) -> Self
where Self: Debug,

System output -> with :#?’s println!. Read more
Source§

fn sout(self) -> Self
where Self: Debug,

System output -> with :?’s println!. Read more
Source§

fn echo(self) -> Self
where Self: Display,

Consumes self, println! as it is, returns self.
Source§

fn into_mutex(self) -> Mutex<Self>

Convert value to Mutex::new(value)
Source§

fn into_arc_mutex(self) -> Arc<Mutex<Self>>

Convert value to Arc::new(Mutex::new(value))
Source§

fn into_rwlock(self) -> RwLock<Self>

Convert value to RwLock::new(value)
Source§

fn into_arc_rwlock(self) -> Arc<RwLock<Self>>

Convert value to Arc::new(RwLock::new(value))
Source§

impl<T, R> StdAnyExt1<R> for T

Source§

fn ext_measure_time(self, f: impl FnOnce(Self) -> R) -> Duration

Executes the given closure block and returns the duration of elapsed time interval.
Source§

fn ext_measure_time_with_value(self, f: impl FnOnce(Self) -> R) -> (Duration, R)

Executes the given closure block, returns the duration of elapsed time interval and the result of the closure execution.
Source§

fn ext_measure_time_with_self( self, f: impl FnOnce(&Self) -> R, ) -> (Duration, Self)

Executes the given closure block, returns the duration of elapsed time interval and the receiver self.
Source§

fn ext_measure_time_with_mut_self( self, f: impl FnOnce(&mut Self) -> R, ) -> (Duration, Self)

Executes the given closure block, returns the duration of elapsed time interval and the receiver self.
Source§

impl<T, R> Tap<R> for T

Source§

fn tap(self, f: impl FnOnce(&Self) -> Ret) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, f: impl FnOnce(&mut Self) -> Ret) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, f: impl FnOnce(&B) -> Ret) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, f: impl FnOnce(&mut B) -> Ret) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_as_ref<R>(self, f: impl FnOnce(&R) -> Ret) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_as_mut<R>(self, f: impl FnOnce(&mut R) -> Ret) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, f: impl FnOnce(&T) -> Ret) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, f: impl FnOnce(&mut T) -> Ret) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, f: impl FnOnce(&Self) -> Ret) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, f: impl FnOnce(&mut Self) -> Ret) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, f: impl FnOnce(&B) -> Ret) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, f: impl FnOnce(&mut B) -> Ret) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_as_ref_dbg<R>(self, f: impl FnOnce(&R) -> Ret) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_as_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_as_mut_dbg<R>(self, f: impl FnOnce(&mut R) -> Ret) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_as_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, f: impl FnOnce(&T) -> Ret) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, f: impl FnOnce(&mut T) -> Ret) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.