[−][src]Struct clout::Builder
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
Auto Trait Implementations
impl Unpin for Builder
impl Sync for Builder
impl Send for Builder
impl UnwindSafe for Builder
impl RefUnwindSafe for Builder
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,