[][src]Struct fizyr_rpc::SentRequest

pub struct SentRequest<Body> { /* fields omitted */ }

A handle for a sent request.

The handle can be used to receive updates and the response from the remote peer, and to send update messages to the remote peer.

Implementations

impl<Body> SentRequest<Body>[src]

pub fn request_id(&self) -> u32[src]

Get the request ID of the sent request.

pub fn service_id(&self) -> i32[src]

Get the service ID of the initial request message.

pub async fn next_message<'_>(
    &'_ mut self
) -> Result<Message<Body>, NextMessageError>
[src]

Receive the next message from the request.

This could be an update message or a response message.

pub async fn send_update<'_>(
    &'_ mut self,
    service_id: i32,
    body: impl Into<Body>
) -> Result<(), WriteMessageError>
[src]

Send an update for the request.

Trait Implementations

impl<Body> Debug for SentRequest<Body>[src]

Auto Trait Implementations

impl<Body> !RefUnwindSafe for SentRequest<Body>

impl<Body> Send for SentRequest<Body> where
    Body: Send

impl<Body> Sync for SentRequest<Body> where
    Body: Send

impl<Body> Unpin for SentRequest<Body>

impl<Body> !UnwindSafe for SentRequest<Body>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.