pub enum EnvelopeError {
NotAMessage,
MethodNotAString {
found: &'static str,
},
IdNotAllowed {
found: &'static str,
},
CodeNotAnInteger {
found: &'static str,
},
}Expand description
An envelope this build could not lift.
Variants§
NotAMessage
The object is not a JSON-RPC message of any recognised shape.
That is: no method (so not a request or notification) and no
result/error (so not a reply). JSON-RPC 2.0 calls this
Invalid Request, and -32600 is the right answer for it.
MethodNotAString
A method that is not a string.
IdNotAllowed
An id that is neither a string nor a number.
null is not an error: it is how a peer reports a request it could
not parse enough to recover an id for, and dropping it would turn a
recoverable client error into an unanswerable one.
CodeNotAnInteger
An error member whose code is not an integer.
Trait Implementations§
Source§impl Clone for EnvelopeError
impl Clone for EnvelopeError
Source§impl Debug for EnvelopeError
impl Debug for EnvelopeError
Source§impl Display for EnvelopeError
impl Display for EnvelopeError
impl Eq for EnvelopeError
Source§impl Error for EnvelopeError
impl Error for EnvelopeError
1.30.0 · 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()
Source§impl From<EnvelopeError> for BridgeError
impl From<EnvelopeError> for BridgeError
Source§fn from(source: EnvelopeError) -> Self
fn from(source: EnvelopeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EnvelopeError
impl PartialEq for EnvelopeError
impl StructuralPartialEq for EnvelopeError
Auto Trait Implementations§
impl Freeze for EnvelopeError
impl RefUnwindSafe for EnvelopeError
impl Send for EnvelopeError
impl Sync for EnvelopeError
impl Unpin for EnvelopeError
impl UnsafeUnpin for EnvelopeError
impl UnwindSafe for EnvelopeError
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