Struct tamasfe_json_rpc_types::Request[][src]

pub struct Request<T = ()> {
    pub jsonrpc: &'static str,
    pub method: String,
    pub id: Option<RequestId>,
    pub params: Option<T>,
}

Fields

jsonrpc: &'static strmethod: Stringid: Option<RequestId>params: Option<T>

Implementations

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

pub fn new() -> Self[src]

pub fn with_method(self, method: &str) -> Self[src]

pub fn with_id(self, id: Option<RequestId>) -> Self[src]

pub fn with_params(self, params: Option<T>) -> Self[src]

pub fn into_message(self) -> Message[src]

impl Request<Value>[src]

Trait Implementations

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

impl<T: Default> Default for Request<T>[src]

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

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

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

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

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

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

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for Request<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, 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.