[−][src]Struct messages::request::Request
Request
structure represents a message which expects a response.
Initializing a Request
will return two objects:
- A request itself, which has to be sent to the
Mailbox
; - A oneshot receiver channel to await for the response.
Implementations
impl<Input, Output> Request<Input, Output>
[src]
pub fn new(message: Input) -> (Self, Receiver<Output>)
[src]
Initializes a new request, returning a Request
object and a receiver channel to await for the response.
pub fn message(&self) -> &Input
[src]
Returns a reference to the message held in the request.
pub fn respond(self, output: Output) -> Result<(), SendError>
[src]
Sends a response to the request initiator.
pub fn into_inner(self) -> (Input, Sender<Output>)
[src]
Destructs the request object, returning the request message and the sender channel.
Trait Implementations
Auto Trait Implementations
impl<Input, Output> !RefUnwindSafe for Request<Input, Output>
impl<Input, Output> Send for Request<Input, Output> where
Input: Send,
Output: Send,
Input: Send,
Output: Send,
impl<Input, Output> Sync for Request<Input, Output> where
Input: Sync,
Output: Send,
Input: Sync,
Output: Send,
impl<Input, Output> Unpin for Request<Input, Output> where
Input: Unpin,
Input: Unpin,
impl<Input, Output> !UnwindSafe for Request<Input, Output>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,