pub enum Level {
    Panic,
    Bug,
    Error,
    Warning,
    Surprise,
    Info,
    Debug,
}
Expand description

Levels are not in order.

Variants

Panic

The program violated a self-imposed constraint, ended up in an inconsistent state, and cannot recover. Handlers must not actually panic. (should they?)

Bug

The program violated a self-imposed constraint, ended up in an inconsistent state, but some state can be recovered.

Error

Invalid data given by an external source, some state of the program must be dropped.

Warning

Invalid data given by an external source, parts of data are ignored. No previous program state needs to be dropped.

Surprise

External source not in an expected state, but not violating any protocols (including no relevant protocol).

Info

A change in internal state that results in a change of behaviour that a user can observe, and a tinkerer might find useful. E.g. selection of external sources, like loading user’s UI files, language switch, overrides.

Debug

Information useful for application developer only. Should be limited to information gotten from external sources, and more tricky parts of internal state.

Implementations

Trait Implementations

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.