#[non_exhaustive]pub enum MessageError {
Json(Error),
UnsupportedVersion(u8),
EmptyQuery,
MaxResultsOutOfRange(u32),
}Expand description
Errors that can occur when encoding or decoding a NERVE message payload.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Json(Error)
The JSON payload could not be serialized or deserialized.
UnsupportedVersion(u8)
The v field in the payload does not equal MESSAGE_VERSION.
EmptyQuery
The query field is an empty string.
MaxResultsOutOfRange(u32)
The max_results field is outside 1..=MAX_RESULTS.
Trait Implementations§
Source§impl Debug for MessageError
impl Debug for MessageError
Source§impl Display for MessageError
impl Display for MessageError
Source§impl Error for MessageError
impl Error for MessageError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for MessageError
impl !UnwindSafe for MessageError
impl Freeze for MessageError
impl Send for MessageError
impl Sync for MessageError
impl Unpin for MessageError
impl UnsafeUnpin for MessageError
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