pub struct Tracker<T>where
T: Deserialize<'static>,{ /* private fields */ }
Expand description
Links a jsonrpc id to a return type. Trackers can be used to get a typed return value from a json response.
Implementations§
Source§impl<T> Tracker<T>where
T: Deserialize<'static>,
impl<T> Tracker<T>where
T: Deserialize<'static>,
Sourcepub fn get_return(&self, response: &mut Response) -> Result<T, ResponseFail>
pub fn get_return(&self, response: &mut Response) -> Result<T, ResponseFail>
Get typed return value from server response. If response contains the return value for this request, remove it from the server response and attempt to interpret it as a value with type T.
Auto Trait Implementations§
impl<T> Freeze for Tracker<T>
impl<T> RefUnwindSafe for Tracker<T>where
T: RefUnwindSafe,
impl<T> !Send for Tracker<T>
impl<T> !Sync for Tracker<T>
impl<T> Unpin for Tracker<T>
impl<T> UnwindSafe for Tracker<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