pub struct ResponseReceiver { /* private fields */ }Implementations§
Source§impl ResponseReceiver
impl ResponseReceiver
pub async fn recv(&mut self) -> Option<MessageResponse>
Sourcepub async fn recv_initial(
&mut self,
) -> Result<MessageResponse, ReceiveOkResponseError>
pub async fn recv_initial( &mut self, ) -> Result<MessageResponse, ReceiveOkResponseError>
Receive one message within the connection’s initial timeout.
Sourcepub async fn get_response(
&mut self,
) -> Result<Result<OkResponse, ErrorResponse>, ReceiveOkResponseError>
pub async fn get_response( &mut self, ) -> Result<Result<OkResponse, ErrorResponse>, ReceiveOkResponseError>
Get the OK or error response from the machine, ignoring NEXT messages. Uses connection’s default timeouts: initial_timeout for first response, next_to_ok_timeout after NEXT.
Sourcepub async fn get_response_with_timeout(
&mut self,
timeout_duration: Duration,
) -> Result<Result<OkResponse, ErrorResponse>, ReceiveOkResponseError>
pub async fn get_response_with_timeout( &mut self, timeout_duration: Duration, ) -> Result<Result<OkResponse, ErrorResponse>, ReceiveOkResponseError>
Get the OK or error response with a single timeout, ignoring connection defaults. Times out if OK/Error is not received within the specified timeout.
Sourcepub async fn get_response_with_next_and_ok_timeout(
&mut self,
initial: Duration,
next_to_ok: Duration,
) -> Result<Result<OkResponse, ErrorResponse>, ReceiveOkResponseError>
pub async fn get_response_with_next_and_ok_timeout( &mut self, initial: Duration, next_to_ok: Duration, ) -> Result<Result<OkResponse, ErrorResponse>, ReceiveOkResponseError>
Get the OK or error response with custom timeouts for initial wait and post-NEXT wait.
Auto Trait Implementations§
impl Freeze for ResponseReceiver
impl RefUnwindSafe for ResponseReceiver
impl Send for ResponseReceiver
impl Sync for ResponseReceiver
impl Unpin for ResponseReceiver
impl UnsafeUnpin for ResponseReceiver
impl UnwindSafe for ResponseReceiver
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more