[][src]Enum lavish::Message

pub enum Message<P, NP, R> where
    P: Atom,
    NP: Atom,
    R: Atom
{ Request { id: u32, params: P, }, Response { id: u32, error: Option<String>, results: Option<R>, }, Notification { params: NP, }, }

Variants

Request

Fields of Request

id: u32params: P
Response

Fields of Response

id: u32error: Option<String>results: Option<R>
Notification

Fields of Notification

params: NP

Methods

impl<P, NP, R> Message<P, NP, R> where
    P: Atom,
    NP: Atom,
    R: Atom
[src]

pub fn request(id: u32, params: P) -> Self[src]

pub fn notification(params: NP) -> Self[src]

pub fn response(id: u32, error: Option<String>, results: Option<R>) -> Self[src]

impl<P, NP, R> Message<P, NP, R> where
    P: Atom,
    NP: Atom,
    R: Atom
[src]

pub fn deserialize<'de, D>(
    d: D,
    pending: &'de dyn PendingRequests
) -> Result<Self, D::Error> where
    D: Deserializer<'de>, 
[src]

Trait Implementations

impl<P: Debug, NP: Debug, R: Debug> Debug for Message<P, NP, R> where
    P: Atom,
    NP: Atom,
    R: Atom
[src]

impl<P, NP, R> Serialize for Message<P, NP, R> where
    P: Atom,
    NP: Atom,
    R: Atom
[src]

Auto Trait Implementations

impl<P, NP, R> Send for Message<P, NP, R>

impl<P, NP, R> Sync for Message<P, NP, R> where
    NP: Sync,
    P: Sync,
    R: Sync

Blanket Implementations

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

impl<T> From<T> for T[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

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