pub struct CouplingState { /* private fields */ }Expand description
Sans-I/O policy shared by early and confirmed coupling drivers.
Implementations§
Source§impl CouplingState
impl CouplingState
Sourcepub fn is_confirmed(&self, leg: Leg) -> bool
pub fn is_confirmed(&self, leg: Leg) -> bool
Whether this leg has reached a confirmed dialog.
Sourcepub fn begin_offer(&mut self, source: Leg, axis: OfferAxis) -> OfferAction
pub fn begin_offer(&mut self, source: Leg, axis: OfferAxis) -> OfferAction
Begin relaying an offer.
A collision with an offer this coupling sent on the source leg is refused 491. The remote UAC owns the randomized retry required by RFC 3261 §14.1; when it arrives after completion, it enters through this method as a new transaction.
Sourcepub fn complete(&mut self, source: Leg) -> bool
pub fn complete(&mut self, source: Leg) -> bool
Complete the exchange sourced on source.
Returns whether an exchange from that leg was outstanding.
Sourcepub fn fail(&mut self, source: Leg) -> bool
pub fn fail(&mut self, source: Leg) -> bool
Fail the exchange sourced on source.
Failure settles the offer/answer axis just as a final answer does; there is no answer left outstanding after a final refusal.
Sourcepub fn cancel(&self, source: Leg) -> CancelAction
pub fn cancel(&self, source: Leg) -> CancelAction
Map a CANCEL on source according to the peer leg’s confirmation state.
Sourcepub fn final_failure(&self, source: Leg, status: u16) -> FailureAction
pub fn final_failure(&self, source: Leg, status: u16) -> FailureAction
Map a final failure on source according to the peer leg’s confirmation state.
Trait Implementations§
Source§impl Debug for CouplingState
impl Debug for CouplingState
Auto Trait Implementations§
impl Freeze for CouplingState
impl RefUnwindSafe for CouplingState
impl Send for CouplingState
impl Sync for CouplingState
impl Unpin for CouplingState
impl UnsafeUnpin for CouplingState
impl UnwindSafe for CouplingState
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