Struct fizyr_rpc::ReceivedRequestWriteHandle
source · pub struct ReceivedRequestWriteHandle<Body> { /* private fields */ }
Expand description
A write handle for a received request.
Unlike ReceivedRequestHandle
, write handles can be cloned.
But unlike regular handles, they can not be used to receive updates or the response from the remote peer.
Write handles can be used to send updates even when the regular handle is mutably borrowed.
You can get more write handles using ReceivedRequestHandle::write_handle()
or by cloning an existing one.
Implementations§
source§impl<Body> ReceivedRequestWriteHandle<Body>
impl<Body> ReceivedRequestWriteHandle<Body>
sourcepub fn request_id(&self) -> u32
pub fn request_id(&self) -> u32
Get the request ID of the sent request.
sourcepub fn service_id(&self) -> i32
pub fn service_id(&self) -> i32
Get the service ID of the initial request message.
sourcepub async fn send_update(
&self,
service_id: i32,
body: impl Into<Body>
) -> Result<(), Error>
pub async fn send_update( &self, service_id: i32, body: impl Into<Body> ) -> Result<(), Error>
Send an update for the request to the remote peer.
Trait Implementations§
source§impl<Body> Clone for ReceivedRequestWriteHandle<Body>
impl<Body> Clone for ReceivedRequestWriteHandle<Body>
Auto Trait Implementations§
impl<Body> !RefUnwindSafe for ReceivedRequestWriteHandle<Body>
impl<Body> Send for ReceivedRequestWriteHandle<Body>where
Body: Send,
impl<Body> Sync for ReceivedRequestWriteHandle<Body>where
Body: Send,
impl<Body> Unpin for ReceivedRequestWriteHandle<Body>
impl<Body> !UnwindSafe for ReceivedRequestWriteHandle<Body>
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