[][src]Struct cex::log::Env

pub struct Env<Agent: LogAgent>(_);

Environment variable controlled log level.

The variable is CEX_LOG_LEVEL which are parsed as u32, or in the human readable text: Debug, Info, Warn, Error, Fatal, Nolog

Usage

If the user decide to use log level control, the type definition can be unchanged by using a type alias: type Log<E> = cex::Log<E, Env<Vec<Frame>>>;.

Then put log levels in client code, e.g. change foo.map_err_to_log( frame!() ) to the following: foo.map_err_to_log(( LogLevel::Debug, frame!() )). Note that map_err_to_log() accepts a tuple of two elements now.

Trait Implementations

impl<Agent> LogAgent for Env<Agent> where
    Agent: LogAgent
[src]

type Item = (LogLevel, <Agent as LogAgent>::Item)

impl<Agent: Eq + LogAgent> Eq for Env<Agent>
[src]

impl<Agent: PartialEq + LogAgent> PartialEq<Env<Agent>> for Env<Agent>
[src]

impl<Agent: Debug + LogAgent> Debug for Env<Agent>
[src]

Auto Trait Implementations

impl<Agent> Send for Env<Agent> where
    Agent: Send

impl<Agent> Sync for Env<Agent> where
    Agent: Sync

Blanket Implementations

impl<Enum> Okey for Enum
[src]

fn okey<E, Dest, Index>(self) -> Result<Dest, E> where
    Self: Sized + IntoEnumx<Dest, Index>, 
[src]

impl<Enum> Error for Enum
[src]

fn error<T, Dest, Index>(self) -> Result<T, Dest> where
    Self: Sized + IntoEnumx<Dest, Index>, 
[src]

impl<Inner, Agent> ToLog for Inner where
    Agent: LogAgent
[src]

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<Enum, Variant, Index> IntoEnum for Variant where
    Enum: FromVariant<Variant, Index>, 
[src]

impl<Src, Dest, Proto, Indices> ExchangeInto for Src where
    Dest: EnumX<Proto = Proto>,
    Src: ExchangeInto<Proto, (Indices, AA)>, 
[src]

impl<Src, Dest, Indices> ExchangeInto for Src where
    Dest: ExchangeFrom<Src, (Indices, AA)>, 
[src]

impl<Src, Dest, Index> IntoEnumx for Src where
    Dest: EnumxFrom<Src, Index>, 
[src]

impl<Src, Dest, Indices> EnumxFrom for Dest where
    Dest: ExchangeFrom<Src, Indices>, 
[src]