[][src]Enum ichen_openprotocol::OpenProtocolError

pub enum OpenProtocolError<'a> {
    EmptyField(&'a str),
    InvalidField {
        field: &'a str,
        value: Cow<'a, str>,
        description: Cow<'a, str>,
    },
    InconsistentState(&'a str),
    InconsistentField(&'a str),
    ConstraintViolated(Cow<'a, str>),
    JsonError(Error),
    SystemError(Cow<'a, str>),
}

Result error type.

Variants

EmptyField(&'a str)

The value of a field is the empty string "" or containing all white-spaces, which is not allowed as value of that field.

InvalidField

The value of a field is not valid.

Fields of InvalidField

field: &'a strvalue: Cow<'a, str>description: Cow<'a, str>
InconsistentState(&'a str)

The value of a field is not consistent with the matching value in the state.

InconsistentField(&'a str)

The value of a field is not consistent with the matching value in the Controller structure.

ConstraintViolated(Cow<'a, str>)

An enforced constraint is broken.

JsonError(Error)

Error when serializing/deserializing JSON.

SystemError(Cow<'a, str>)

An unexpected system error.

Trait Implementations

impl<'a> Debug for OpenProtocolError<'a>[src]

impl<'a> Display for OpenProtocolError<'a>[src]

impl<'_> Eq for OpenProtocolError<'_>[src]

impl<'_> Error for OpenProtocolError<'_>[src]

impl<'_> From<OpenProtocolError<'_>> for String[src]

impl<'_> PartialEq<OpenProtocolError<'_>> for OpenProtocolError<'_>[src]

fn eq(&self, other: &Self) -> bool[src]

Implement PartialEq for OpenProtocolError.

Most variants already implement PartialEq and are simply delegated.

The only variant that doesn't automatically implement PartialEq is JsonError which encapsulates a serde::error::Error object that does not implement PartialEq. In this case, we test for equality simply by comparing the Debug output of self and other.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for OpenProtocolError<'a>

impl<'a> Send for OpenProtocolError<'a>

impl<'a> Sync for OpenProtocolError<'a>

impl<'a> Unpin for OpenProtocolError<'a>

impl<'a> !UnwindSafe for OpenProtocolError<'a>

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

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.

impl<T> Typeable for T where
    T: Any