[][src]Struct tui_logger::LevelConfig

pub struct LevelConfig { /* fields omitted */ }

LevelConfig stores the relation target->LevelFilter in a hash table.

The table supports copying from the logger system LevelConfig to a widget's LevelConfig. In order to detect changes, the generation of the hash table is compared with any previous copied table. On every change the generation is incremented.

Methods

impl LevelConfig[src]

pub fn new() -> LevelConfig[src]

Create an empty LevelConfig.

pub fn set(&mut self, target: &str, level: LevelFilter)[src]

Set for a given target the LevelFilter in the table and update the generation.

pub fn keys(&self) -> Keys<String, LevelFilter>[src]

Retrieve an iter for all the targets stored in the hash table.

pub fn get(&self, target: &str) -> Option<&LevelFilter>[src]

Get the levelfilter for a given target.

pub fn iter(&self) -> Iter<String, LevelFilter>[src]

Retrieve an iterator through all entries of the table.

Auto Trait Implementations

impl Send for LevelConfig

impl Sync for LevelConfig

Blanket Implementations

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

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[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, 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<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Erased for T