[][src]Struct clout::Builder

pub struct Builder { /* fields omitted */ }

Builder to configuring clout

Methods

impl Builder[src]

pub fn new() -> Builder[src]

Construct a new builder with default (Status level, Auto colour)

pub fn with_level(self, level: Level) -> Builder[src]

Set the message level

pub fn with_verbose(self, verbose: u8) -> Builder[src]

Set the message level from a verbosity flag This is useful for supporting flags like -v, -vv etc...

  • 0 (the default) => Status
  • 1 => Info level
  • 2 => Debug
  • 3 or greater => Trace

pub fn with_quiet(self, quiet: bool) -> Builder[src]

If quiet is true, set the message level to errors only. Otherwise do nothing. Useful for supporting a -q flag. Call this after calling Builder::with_verbose.

pub fn with_silent(self, silent: bool) -> Builder[src]

If silent is true, disable all messages, even errors. Otherwise do nothing. Useful for supporting a -s flag. Call this after calling Builder::with_verbose and Builder::with_quiet.

pub fn with_use_color(self, use_color: UseColor) -> Builder[src]

Set the colour usage mode.

pub fn done(self) -> Result<(), CloutError>[src]

Finish configuring clout and install these settings. No messages may be emitted before this has been called.

Trait Implementations

impl Default for Builder[src]

Auto Trait Implementations

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

impl RefUnwindSafe for Builder

Blanket Implementations

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

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

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.

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

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

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