pub struct SubscriptionNotification<T = Value> {
pub jsonrpc: Version,
pub method: String,
pub params: SubscriptionNotificationParams<T>,
}
Expand description
Server notification about something the client is subscribed to.
Fields§
§jsonrpc: Version
A String specifying the version of the JSON-RPC protocol.
method: String
A String containing the name of the method that was used for the subscription.
params: SubscriptionNotificationParams<T>
Parameters of the subscription notification.
Implementations§
Source§impl<T> SubscriptionNotification<T>where
T: Serialize + DeserializeOwned,
impl<T> SubscriptionNotification<T>where
T: Serialize + DeserializeOwned,
Sourcepub fn new<M>(
method: M,
params: SubscriptionNotificationParams<T>,
) -> SubscriptionNotification<T>
pub fn new<M>( method: M, params: SubscriptionNotificationParams<T>, ) -> SubscriptionNotification<T>
Creates a JSON-RPC 2.0 notification which is a subscription notification.
Trait Implementations§
Source§impl<T> Clone for SubscriptionNotification<T>where
T: Clone,
impl<T> Clone for SubscriptionNotification<T>where
T: Clone,
Source§fn clone(&self) -> SubscriptionNotification<T>
fn clone(&self) -> SubscriptionNotification<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Debug for SubscriptionNotification<T>where
T: Debug,
impl<T> Debug for SubscriptionNotification<T>where
T: Debug,
Source§impl<'de, T> Deserialize<'de> for SubscriptionNotification<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for SubscriptionNotification<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubscriptionNotification<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubscriptionNotification<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Display for SubscriptionNotification<T>where
T: Serialize,
impl<T> Display for SubscriptionNotification<T>where
T: Serialize,
Source§impl<T> PartialEq for SubscriptionNotification<T>where
T: PartialEq,
impl<T> PartialEq for SubscriptionNotification<T>where
T: PartialEq,
Source§impl<T> Serialize for SubscriptionNotification<T>where
T: Serialize,
impl<T> Serialize for SubscriptionNotification<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Eq for SubscriptionNotification<T>where
T: Eq,
impl<T> StructuralPartialEq for SubscriptionNotification<T>
Auto Trait Implementations§
impl<T> Freeze for SubscriptionNotification<T>where
T: Freeze,
impl<T> RefUnwindSafe for SubscriptionNotification<T>where
T: RefUnwindSafe,
impl<T> Send for SubscriptionNotification<T>where
T: Send,
impl<T> Sync for SubscriptionNotification<T>where
T: Sync,
impl<T> Unpin for SubscriptionNotification<T>where
T: Unpin,
impl<T> UnwindSafe for SubscriptionNotification<T>where
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.