Type Alias StringStatus

Source
pub type StringStatus = Status<Cow<'static, str>>;
Expand description

This Status typedef allows to use both: &'static str and String in a message

Aliased Type§

struct StringStatus {
    pub time: Instant,
    pub progress: Progress,
    pub message: Cow<'static, str>,
}

Fields§

§time: Instant

Time when this status was created

§progress: Progress

Current progress

§message: Cow<'static, str>

Message

Implementations§

Source§

impl StringStatus

Source

pub fn from_str(progress: Progress, static_message: &'static str) -> Self

create a StringStatus from a &'static str

Source

pub fn from_string(progress: Progress, message: String) -> Self

create a StringStatus from a String