Struct fizyr_rpc::ReceivedRequest [−][src]
pub struct ReceivedRequest<Body> { /* fields omitted */ }
Expand description
A handle for a received request.
The handle can be used to receive updates from the remote peer, and to send updates and the response to the remote peer.
Implementations
impl<Body> ReceivedRequest<Body>
[src]
impl<Body> ReceivedRequest<Body>
[src]pub fn request_id(&self) -> u32
[src]
pub fn request_id(&self) -> u32
[src]Get the request ID of the received request.
pub fn service_id(&self) -> i32
[src]
pub fn service_id(&self) -> i32
[src]Get the service ID of the initial request message.
pub async fn recv_update(&mut self) -> Result<Message<Body>, ReadMessageError>
[src]
pub async fn recv_update(&mut self) -> Result<Message<Body>, ReadMessageError>
[src]Receive the next update message of the request from the remote peer.
pub async fn send_update(
&mut self,
service_id: i32,
body: impl Into<Body>
) -> Result<(), WriteMessageError>
[src]
pub async fn send_update(
&mut self,
service_id: i32,
body: impl Into<Body>
) -> Result<(), WriteMessageError>
[src]Send an update for the request to the remote peer.
pub async fn send_response(
self,
service_id: i32,
body: impl Into<Body>
) -> Result<(), WriteMessageError>
[src]
pub async fn send_response(
self,
service_id: i32,
body: impl Into<Body>
) -> Result<(), WriteMessageError>
[src]Send the final response for the request to the remote peer.
pub async fn send_error_response(
self,
message: &str
) -> Result<(), WriteMessageError> where
Body: Body,
[src]
pub async fn send_error_response(
self,
message: &str
) -> Result<(), WriteMessageError> where
Body: Body,
[src]Send the final response with an error message.
Trait Implementations
Auto Trait Implementations
impl<Body> !RefUnwindSafe for ReceivedRequest<Body>
impl<Body> Send for ReceivedRequest<Body> where
Body: Send,
Body: Send,
impl<Body> Sync for ReceivedRequest<Body> where
Body: Send + Sync,
Body: Send + Sync,
impl<Body> Unpin for ReceivedRequest<Body> where
Body: Unpin,
Body: Unpin,