Struct TokioTimer

#[non_exhaustive]
pub struct TokioTimer;

A Timer that uses the tokio runtime.

Implementations

impl TokioTimer

fn new() -> Self

Create a new TokioTimer

Trait Implementations

impl Clone for TokioTimer

fn clone(&self) -> TokioTimer

impl Debug for TokioTimer

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

impl Default for TokioTimer

fn default() -> TokioTimer

impl Timer for TokioTimer

fn sleep(&self, duration: Duration) -> Pin<Box<dyn Sleep>>
fn sleep_until(&self, deadline: Instant) -> Pin<Box<dyn Sleep>>
fn reset(&self, sleep: &mut Pin<Box<dyn Sleep>>, new_deadline: Instant)
fn now(&self) -> Instant

Auto Trait Implementations

impl Freeze for TokioTimer

impl RefUnwindSafe for TokioTimer

impl Send for TokioTimer

impl Sync for TokioTimer

impl Unpin for TokioTimer

impl UnsafeUnpin for TokioTimer

impl UnwindSafe for TokioTimer

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for TokioTimer

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for TokioTimer

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

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T> WithSubscriber for TokioTimer

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

fn into(self) -> U

Calls U::from(self).

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

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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