[][src]Struct clock_core::timer::Timer

pub struct Timer {
    pub remaining: Duration,
    pub total: Duration,
    pub start_moments: Vec<DateTime<Local>>,
    pub pause_moments: Vec<DateTime<Local>>,
    pub paused: bool,
}

A countdown timer

Fields

remaining: Durationtotal: Durationstart_moments: Vec<DateTime<Local>>pause_moments: Vec<DateTime<Local>>paused: bool

Implementations

impl Timer[src]

pub fn new(duration: Duration) -> Self[src]

Returns stopwatch reset to zero

pub fn read(&self) -> Duration[src]

pub fn pause_or_resume(&mut self)[src]

pub fn start_moment(&self) -> DateTime<Local>[src]

pub fn stop_moment(&self) -> DateTime<Local>[src]

pub fn pause(&mut self)[src]

pub fn resume(&mut self)[src]

Trait Implementations

impl Clone for Timer[src]

impl Debug for Timer[src]

Auto Trait Implementations

impl RefUnwindSafe for Timer

impl Send for Timer

impl Sync for Timer

impl Unpin for Timer

impl UnwindSafe for Timer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.