Struct async_jsonrpc_client::Notification[][src]

pub struct Notification {
    pub jsonrpc: Version,
    pub method: String,
    pub params: Option<Params>,
}

Represents JSON-RPC 2.0 request which is a notification.

A Request object that is a Notification signifies the Client’s lack of interest in the corresponding Response object, and as such no Response object needs to be returned to the client. As such, the Client would not be aware of any errors (like e.g. “Invalid params”,“Internal error”).

The Server MUST NOT reply to a Notification, including those that are within a batch request.

Fields

jsonrpc: Version

A String specifying the version of the JSON-RPC protocol.

method: String

A String containing the name of the method to be invoked.

Method names that begin with the word rpc followed by a period character (U+002E or ASCII 46) are reserved for rpc-internal methods and extensions and MUST NOT be used for anything else.

params: Option<Params>

A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.

Implementations

impl Notification[src]

pub fn new<M>(method: M, params: Option<Params>) -> Notification where
    M: Into<String>, 
[src]

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

Trait Implementations

impl Clone for Notification[src]

impl Debug for Notification[src]

impl<'de> Deserialize<'de> for Notification[src]

impl Display for Notification[src]

impl Eq for Notification[src]

impl From<Notification> for Call[src]

impl PartialEq<Notification> for Notification[src]

impl Serialize for Notification[src]

impl StructuralEq for Notification[src]

impl StructuralPartialEq for Notification[src]

Auto Trait Implementations

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,