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>),
}
Expand description
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.
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§
Source§impl<'a> Debug for OpenProtocolError<'a>
impl<'a> Debug for OpenProtocolError<'a>
Source§impl<'a> Display for OpenProtocolError<'a>
impl<'a> Display for OpenProtocolError<'a>
Source§impl Error for OpenProtocolError<'_>
impl Error for OpenProtocolError<'_>
Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
Source§impl From<OpenProtocolError<'_>> for String
impl From<OpenProtocolError<'_>> for String
Source§fn from(error: OpenProtocolError<'_>) -> Self
fn from(error: OpenProtocolError<'_>) -> Self
Source§impl PartialEq for OpenProtocolError<'_>
impl PartialEq for OpenProtocolError<'_>
Source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
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
.
impl Eq for OpenProtocolError<'_>
Auto Trait Implementations§
impl<'a> Freeze for OpenProtocolError<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.