[−][src]Struct easy_jsonrpc::Call
A single rpc method call with arguments. May be sent to the server by itself using as_request, or as a batch, using batch_request.
Methods
impl<'a> Call<'a>[src]
pub fn call<T>(method: &'a str, args: Vec<Value>) -> (Call, Tracker<T>) where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
Create a jsonrpc method call with a random id. T is the expected return type of the method.
pub fn notification(method: &'a str, args: Vec<Value>) -> Call[src]
Create a jsonrpc method call with no id. Jsonrpc servers accept notifications silently. That is to say, they handle the notification, but send to reasponse.
pub fn as_request(&self) -> Value[src]
Convert call to a json object which can be serialized and sent to a jsonrpc server.
pub fn batch_request(calls: &[Self]) -> Value[src]
Convert list of calls to a json object which can be serialized and sent to a jsonrpc server.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,