[][src]Struct jsonrpc_types::v2::SubscriptionNotification

pub struct SubscriptionNotification<T = Value> {
    pub jsonrpc: Version,
    pub method: String,
    pub params: SubscriptionNotificationParams<T>,
}

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

impl<T: Serialize + DeserializeOwned> SubscriptionNotification<T>[src]

pub fn new<M: Into<String>>(
    method: M,
    params: SubscriptionNotificationParams<T>
) -> Self
[src]

Creates a JSON-RPC 2.0 notification which is a subscription notification.

Trait Implementations

impl<T: Clone> Clone for SubscriptionNotification<T>[src]

impl<T: Debug> Debug for SubscriptionNotification<T>[src]

impl<'de, T> Deserialize<'de> for SubscriptionNotification<T> where
    T: Deserialize<'de>, 
[src]

impl<T: Serialize> Display for SubscriptionNotification<T>[src]

impl<T: Eq> Eq for SubscriptionNotification<T>[src]

impl<T: PartialEq> PartialEq<SubscriptionNotification<T>> for SubscriptionNotification<T>[src]

impl<T> Serialize for SubscriptionNotification<T> where
    T: Serialize
[src]

impl<T> StructuralEq for SubscriptionNotification<T>[src]

impl<T> StructuralPartialEq for SubscriptionNotification<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for SubscriptionNotification<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for SubscriptionNotification<T> where
    T: Send
[src]

impl<T> Sync for SubscriptionNotification<T> where
    T: Sync
[src]

impl<T> Unpin for SubscriptionNotification<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for SubscriptionNotification<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.