pub struct ErrorMessage<'a> {
pub reason: &'a str,
pub code: &'static str,
}Fields§
§reason: &'a strThis should be a human readable description of the error.
code: &'static strThis field does not appear in the spec, but something similar is required for
letting the client handle error conditions. This should be a machine readable
identifier, like "CHARACTER_TAKEN".
It is serialized in #[cfg(test)], so that
tests can ensure the correct error case was triggered.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ErrorMessage<'a>
impl<'a> RefUnwindSafe for ErrorMessage<'a>
impl<'a> Send for ErrorMessage<'a>
impl<'a> Sync for ErrorMessage<'a>
impl<'a> Unpin for ErrorMessage<'a>
impl<'a> UnwindSafe for ErrorMessage<'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
Mutably borrows from an owned value. Read more