pub struct BoundMethod<'a, T>where
T: Deserialize<'static>,{ /* private fields */ }
Expand description
Create a binding of arguments to a method name. Can be turned into either a jsonrpc call using call, or a jsonrpc notification using notification.
Implementations§
Source§impl<'a, T> BoundMethod<'a, T>where
T: Deserialize<'static>,
impl<'a, T> BoundMethod<'a, T>where
T: Deserialize<'static>,
Sourcepub fn new(method: &'a str, args: Vec<Value>) -> BoundMethod<'_, T>
pub fn new(method: &'a str, args: Vec<Value>) -> BoundMethod<'_, T>
Create a binding of arguments to a method name. You probably don’t want to use this method directly. Try using the rpc macro instead.
Sourcepub fn call(&'a self) -> (Call<'a>, Tracker<T>)where
T: Deserialize<'static>,
pub fn call(&'a self) -> (Call<'a>, Tracker<T>)where
T: Deserialize<'static>,
Create a jsonrpc method call with a random id and a tracker for retrieving the return value.
Sourcepub fn notification(&'a self) -> Call<'a>
pub fn notification(&'a self) -> Call<'a>
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.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for BoundMethod<'a, T>
impl<'a, T> RefUnwindSafe for BoundMethod<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for BoundMethod<'a, T>
impl<'a, T> !Sync for BoundMethod<'a, T>
impl<'a, T> Unpin for BoundMethod<'a, T>
impl<'a, T> UnwindSafe for BoundMethod<'a, T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more