pub struct ErrorMessage {
pub code: ErrorCode,
pub message: String,
pub missing: Vec<ObjectName>,
pub current: Option<RefState>,
}Expand description
The Error message, which the server sends to report a failure.
The session ends after this message. The Error message converts to the
Error variant of its code, and Error::to_message converts back.
Fields§
§code: ErrorCodeThe code of the failure.
message: StringThe text of the failure for a human reader.
missing: Vec<ObjectName>The missing objects, for the code missing-objects.
The key is missing. The encoder writes the key only if the list is
not empty. Each object is of type 1 to 4. For another type,
encode and decode return Error::Protocol.
current: Option<RefState>The current state of the ref, for the code ref-mismatch.
The keys are ref and current. If the code is ref-mismatch and
this field is None, encode and decode return Error::Protocol. The
decode of a body with one of the two keys alone also returns
Error::Protocol.
Trait Implementations§
Source§impl Clone for ErrorMessage
impl Clone for ErrorMessage
Source§impl Debug for ErrorMessage
impl Debug for ErrorMessage
impl Eq for ErrorMessage
Source§impl From<ErrorMessage> for Error
Converts an Error message from a server to the Error variant of its
code.
impl From<ErrorMessage> for Error
Converts an Error message from a server to the Error variant of its
code.
The conversion drops a missing list or a current state on a code that
does not carry one. A decoded ref-mismatch always carries its current
state, so Error::to_message gives the same message back.
Source§fn from(msg: ErrorMessage) -> Error
fn from(msg: ErrorMessage) -> Error
Source§impl PartialEq for ErrorMessage
impl PartialEq for ErrorMessage
impl StructuralPartialEq for ErrorMessage
Auto Trait Implementations§
impl Forget for ErrorMessage
impl Freeze for ErrorMessage
impl Move for ErrorMessage
impl RefUnwindSafe for ErrorMessage
impl Send for ErrorMessage
impl Sync for ErrorMessage
impl Unpin for ErrorMessage
impl UnsafeUnpin for ErrorMessage
impl UnwindSafe for ErrorMessage
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.