pub struct Request<'a, R> { /* private fields */ }Expand description
Request handle. Used as a promise for response.
Implementations§
Source§impl<'a, R> Request<'a, R>
impl<'a, R> Request<'a, R>
Sourcepub fn try_get_response(self) -> Option<Option<R>>
pub fn try_get_response(self) -> Option<Option<R>>
Try get response without waiting.
This function returns:
None- no response yet but it may arrive in future.Some(response)- response arrived or it will never arrive (seeSelf::get_response).
Sourcepub async fn get_response(self) -> Option<R>
pub async fn get_response(self) -> Option<R>
Trait Implementations§
Auto Trait Implementations§
impl<'a, R> Freeze for Request<'a, R>
impl<'a, R> !RefUnwindSafe for Request<'a, R>
impl<'a, R> Send for Request<'a, R>where
R: Send,
impl<'a, R> Sync for Request<'a, R>where
R: Send,
impl<'a, R> Unpin for Request<'a, R>
impl<'a, R> !UnwindSafe for Request<'a, R>
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