pub struct ReceivedRequestWriteHandle<F: Format> { /* private fields */ }Expand description
Write-only handle for a received buy_tomatoes request.
Implementations§
Source§impl<F: Format> ReceivedRequestWriteHandle<F>
impl<F: Format> ReceivedRequestWriteHandle<F>
Sourcepub fn inner(&self) -> &ReceivedRequestWriteHandle<F::Body>
pub fn inner(&self) -> &ReceivedRequestWriteHandle<F::Body>
Get the raw request.
Note that the request body has been consumed when it was parsed. As a result, the raw request always has an empty body.
Sourcepub fn inner_mut(&self) -> &ReceivedRequestWriteHandle<F::Body>
pub fn inner_mut(&self) -> &ReceivedRequestWriteHandle<F::Body>
Get an exclusive reference to the raw request.
Note that the request body has been consumed when it was parsed. As a result, the raw request always has an empty body.
Sourcepub fn into_inner(self) -> ReceivedRequestWriteHandle<F::Body>
pub fn into_inner(self) -> ReceivedRequestWriteHandle<F::Body>
Consume this object to get the raw request.
Note that the request body has been consumed when it was parsed. As a result, the raw request always has an empty body.
Sourcepub fn request_id(&self) -> u32
pub fn request_id(&self) -> u32
Get the request ID.
Sourcepub fn service_id(&self) -> i32
pub fn service_id(&self) -> i32
Get the service ID of the request.
Sourcepub async fn send_price_update(&self, update: &Price) -> Result<(), Error>where
F: EncodeBody<Price>,
pub async fn send_price_update(&self, update: &Price) -> Result<(), Error>where
F: EncodeBody<Price>,
Send a price update to the remote peer.
Sourcepub async fn send_response(
&self,
response: &BuyTomatoesResponse,
) -> Result<(), Error>where
F: EncodeBody<BuyTomatoesResponse>,
pub async fn send_response(
&self,
response: &BuyTomatoesResponse,
) -> Result<(), Error>where
F: EncodeBody<BuyTomatoesResponse>,
Send the final response.
Trait Implementations§
Source§impl<F: Format> Clone for ReceivedRequestWriteHandle<F>
impl<F: Format> Clone for ReceivedRequestWriteHandle<F>
Auto Trait Implementations§
impl<F> Freeze for ReceivedRequestWriteHandle<F>
impl<F> RefUnwindSafe for ReceivedRequestWriteHandle<F>
impl<F> Send for ReceivedRequestWriteHandle<F>
impl<F> Sync for ReceivedRequestWriteHandle<F>
impl<F> Unpin for ReceivedRequestWriteHandle<F>
impl<F> UnsafeUnpin for ReceivedRequestWriteHandle<F>
impl<F> UnwindSafe for ReceivedRequestWriteHandle<F>
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