[−][src]Struct time_me::Timer
used to build a timer with different options: progress bar, duration, and notification
Implementations
impl Timer
[src]
pub fn builder() -> TimerBuilder<((), (), (), ())>
[src]
Create a builder for building Timer
.
On the builder, call .progress_bar_style(...)
(optional), .duration(...)
(optional), .task(...)
(optional), .sticky_notification(...)
(optional) to set the values of the fields (they accept Into
values).
Finally, call .build()
to create the instance of Timer
.
impl Timer
[src]
pub fn start(&self)
[src]
starts the timer this will show a progress bar while running a notification will be sent out after timer finishes
Example
Timer::builder() .duration(Duration::from_secs(1)) .build() .start() // waits 1 second // sends "time!" -> notification
Trait Implementations
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]
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,