pub struct RpcNotification {
pub jsonrpc: JsonRpcVersion,
pub method: String,
pub params: Option<Value>,
}Expand description
A JSON-RPC 2.0 notification (no id). The worker’s init handshake is a notification —
{ jsonrpc:"2.0", method:"worker/init", params:<InitAnnounce> } — so the first frame rides
the SAME JSON-RPC parse path as every later frame (spec §5): the host reads frame 1, parses
it as a notification, checks method == INIT_METHOD, and deserializes params as
InitAnnounce. InitAnnounce is never sent as a naked object.
Fields§
§jsonrpc: JsonRpcVersion§method: String§params: Option<Value>Trait Implementations§
Source§impl Clone for RpcNotification
impl Clone for RpcNotification
Source§fn clone(&self) -> RpcNotification
fn clone(&self) -> RpcNotification
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 RpcNotification
impl Debug for RpcNotification
Source§impl<'de> Deserialize<'de> for RpcNotification
impl<'de> Deserialize<'de> for RpcNotification
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
Auto Trait Implementations§
impl Freeze for RpcNotification
impl RefUnwindSafe for RpcNotification
impl Send for RpcNotification
impl Sync for RpcNotification
impl Unpin for RpcNotification
impl UnsafeUnpin for RpcNotification
impl UnwindSafe for RpcNotification
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