Struct request_channel::Request
source · pub struct Request<'a, R> { /* private fields */ }Expand description
Request handle. Used as a promise for response.
Implementations
sourceimpl<'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> !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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more