pub enum IncomingMessage {
Request(JsonRpcRequest),
Notification(JsonRpcNotification),
Response(JsonRpcResponse),
}Expand description
A single decoded inbound JSON-RPC message, classified by the Option<id> discrimination.
A frame with method + id is a Self::Request; a frame with method and no id is a
Self::Notification; a frame with id and result/error (no method) is a
Self::Response. This is the structural result/event split the whole design relies on: a
notification can never carry an id, so it can never be captured as a correlated response.
Variants§
Request(JsonRpcRequest)
A peer-initiated call awaiting a response.
Notification(JsonRpcNotification)
A peer-initiated one-way message (no response).
Response(JsonRpcResponse)
A reply to one of our outstanding requests.
Implementations§
Trait Implementations§
Source§impl Clone for IncomingMessage
impl Clone for IncomingMessage
Source§fn clone(&self) -> IncomingMessage
fn clone(&self) -> IncomingMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IncomingMessage
impl Debug for IncomingMessage
impl Eq for IncomingMessage
Source§impl PartialEq for IncomingMessage
impl PartialEq for IncomingMessage
impl StructuralPartialEq for IncomingMessage
Auto Trait Implementations§
impl Freeze for IncomingMessage
impl RefUnwindSafe for IncomingMessage
impl Send for IncomingMessage
impl Sync for IncomingMessage
impl Unpin for IncomingMessage
impl UnsafeUnpin for IncomingMessage
impl UnwindSafe for IncomingMessage
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