pub struct JsonRpcMessage<M> { /* private fields */ }Expand description
Either OutgoingMessage or IncomingMessage with "jsonrpc": "2.0" specified as
required by JSON-RPC 2.0 Specification.
Implementations§
Source§impl<M> JsonRpcMessage<M>
impl<M> JsonRpcMessage<M>
Sourcepub fn wrap(message: M) -> Self
pub fn wrap(message: M) -> Self
Wraps the provided OutgoingMessage or IncomingMessage into a versioned
JsonRpcMessage.
Trait Implementations§
Source§impl<M: Debug> Debug for JsonRpcMessage<M>
impl<M: Debug> Debug for JsonRpcMessage<M>
Source§impl<M> Deserialize<'static> for JsonRpcMessage<M>where
M: Deserialize<'static>,
impl<M> Deserialize<'static> for JsonRpcMessage<M>where
M: Deserialize<'static>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<M> Freeze for JsonRpcMessage<M>where
M: Freeze,
impl<M> RefUnwindSafe for JsonRpcMessage<M>where
M: RefUnwindSafe,
impl<M> Send for JsonRpcMessage<M>where
M: Send,
impl<M> Sync for JsonRpcMessage<M>where
M: Sync,
impl<M> Unpin for JsonRpcMessage<M>where
M: Unpin,
impl<M> UnwindSafe for JsonRpcMessage<M>where
M: UnwindSafe,
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