Struct async_jsonrpc_client::SubscriptionNotification[][src]

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> SubscriptionNotification<T> where
    T: DeserializeOwned + Serialize
[src]

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

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

Trait Implementations

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

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

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

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

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

impl<T> PartialEq<SubscriptionNotification<T>> for SubscriptionNotification<T> where
    T: PartialEq<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.