pub struct Incoming {
pub id: Option<Value>,
pub method: String,
pub params: Value,
}Expand description
A request or notification arriving from the client.
One type for both, because they differ only in whether id is present — a notification is
a request nobody is waiting on. Splitting them into two types would mean writing every
dispatch arm twice.
Fields§
§id: Option<Value>Absent for a notification, which must not be answered.
method: StringWhich method was called.
params: ValueArguments, defaulting to null so a method that takes none still parses.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Incoming
impl<'de> Deserialize<'de> for Incoming
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 Incoming
impl RefUnwindSafe for Incoming
impl Send for Incoming
impl Sync for Incoming
impl Unpin for Incoming
impl UnsafeUnpin for Incoming
impl UnwindSafe for Incoming
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