pub struct JsonRpcMessage<M> { /* private fields */ }Expand description
A message (request, response, or notification) 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<'de, M> Deserialize<'de> for JsonRpcMessage<M>where
M: Deserialize<'de>,
impl<'de, M> Deserialize<'de> for JsonRpcMessage<M>where
M: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<M> JsonSchema for JsonRpcMessage<M>where
M: JsonSchema,
impl<M> JsonSchema for JsonRpcMessage<M>where
M: JsonSchema,
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto 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