pub struct TimerBuilder { /* private fields */ }
Expand description

The builder struct for Timer.

Implementations§

source§

impl TimerBuilder

source

pub fn time(self, time: Time) -> Self

Set the time as a Time.

source

pub fn time_str<T>(self, time_str: T) -> Selfwhere T: ToString,

Set the time as a string.

source

pub fn start_time(self, start_time: Time) -> Self

Set the start_time Time.

source

pub fn quiet(self, quiet: bool) -> Self

Set the quiet flag, used for printing to stdout.

source

pub fn format<T>(self, format: T) -> Selfwhere T: ToString,

TODO: Unimplemented Set the format string, used for parsing the given time string.

source

pub fn print_interval(self, print_interval: Time) -> Self

Set the interval in which output should be printed to stdout.

source

pub fn write<T>(self, write: T) -> Selfwhere T: ToString,

Set a file for the output to be written to, instead of stdout.

source

pub fn continue_after_finish(self, continue_after_finish: bool) -> Self

Specify if timer should continue timing into negative time after it finishes.

source

pub fn build(self) -> ClimerResult<Timer>

Build a Timer.

Trait Implementations§

source§

impl Default for TimerBuilder

source§

fn default() -> TimerBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.