Enum pdbtbx::ErrorLevel[][src]

pub enum ErrorLevel {
    BreakingError,
    InvalidatingError,
    StrictWarning,
    LooseWarning,
    GeneralWarning,
}

This indicates the level of the error, to handle it differently based on the level of the raised error.

Variants

BreakingError

An error that breaks the execution of the program.

InvalidatingError

An error that invalidates the output of the function generating the error. So things like invalid characters, numeric literals etc.

StrictWarning

A warning that invalidates some strict invariants posed by the specification. Which do not necessarily prevent the code from running, but will need to be checked.

LooseWarning

A warning that invalidates some looser defined invariants. Which are generally bad but sometimes occur due to other software packages not following the specifications to the letter.

GeneralWarning

A general warning.

Implementations

impl ErrorLevel[src]

pub fn descriptor(&self) -> &str[src]

Get the descriptor for this ErrorLevel (Error/Warning). This can be used to display to users to indicate the severity of the error.

pub fn fails(&self, level: StrictnessLevel) -> bool[src]

Tests if this errors is breaking with the given strictness level

Trait Implementations

impl Clone for ErrorLevel[src]

impl Copy for ErrorLevel[src]

impl Debug for ErrorLevel[src]

impl Display for ErrorLevel[src]

impl Eq for ErrorLevel[src]

impl Ord for ErrorLevel[src]

impl PartialEq<ErrorLevel> for ErrorLevel[src]

impl PartialOrd<ErrorLevel> for ErrorLevel[src]

impl StructuralEq for ErrorLevel[src]

impl StructuralPartialEq for ErrorLevel[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.