pub struct Responses { /* private fields */ }Expand description
Events from a client transaction: responses, then a terminal event.
Implementations§
Source§impl Responses
impl Responses
Sourcepub fn transaction_key(&self) -> Option<&TransactionKey>
pub fn transaction_key(&self) -> Option<&TransactionKey>
The exact INVITE transaction these responses belong to, when they belong to an INVITE.
Sourcepub fn connection_generation(&self) -> Option<u64>
pub fn connection_generation(&self) -> Option<u64>
Exact stream generation selected for the outbound request; absent for UDP.
Sourcepub async fn next(&mut self) -> Option<TuEvent>
pub async fn next(&mut self) -> Option<TuEvent>
The next event, or None once the transaction has finished.
Sourcepub fn take_transport_error(&mut self) -> Option<Error>
pub fn take_transport_error(&mut self) -> Option<Error>
Take the concrete driver failure associated with a TransportError event.
The sans-I/O transaction layer carries only the fact that transport failed. The endpoint queues the I/O-layer cause before feeding that fact into the core, which lets an application preserve a TLS verification error instead of reporting an unanswered request.
Sourcepub async fn peek(&mut self) -> Option<&TuEvent>
pub async fn peek(&mut self) -> Option<&TuEvent>
Look at the next event without consuming it.
Used to decide whether a resolved candidate is viable before handing the stream to the caller, who must still see whatever was peeked at.
Sourcepub async fn final_response(&mut self) -> Option<Response>
pub async fn final_response(&mut self) -> Option<Response>
Wait for the first final response.
Returns None if the transaction ended without one — a timeout or a transport error,
both of which arrive as events on Self::next if the caller wants to tell them
apart.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Responses
impl RefUnwindSafe for Responses
impl Send for Responses
impl Sync for Responses
impl Unpin for Responses
impl UnsafeUnpin for Responses
impl UnwindSafe for Responses
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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