pub struct MediaRequestIdentity { /* private fields */ }Expand description
Pending identity used to decide whether a handset media ACK belongs to the currently opening receive/transmit request.
Implementations§
Source§impl MediaRequestIdentity
impl MediaRequestIdentity
Sourcepub const fn new(generation: u64, token: MediaRequestToken) -> Option<Self>
pub const fn new(generation: u64, token: MediaRequestToken) -> Option<Self>
Construct an identity. Generations are monotonic per call and start at one; a deliberately coupled ORC/SMT pair shares one identity. Tokens must be allocated uniquely among live and retired media sessions.
pub const fn generation(self) -> u64
pub const fn token(self) -> MediaRequestToken
Sourcepub const fn checked_next(self) -> Option<Self>
pub const fn checked_next(self) -> Option<Self>
Advance both the logical generation and its wire token without wrap.
A caller must fail the media reopen when this returns None.
Sourcepub const fn accepts_ack(
self,
acknowledgement_party_id: u32,
acknowledgement_call_reference: u32,
stable_call_reference: u32,
) -> bool
pub const fn accepts_ack( self, acknowledgement_party_id: u32, acknowledgement_call_reference: u32, stable_call_reference: u32, ) -> bool
Match an ACK without permitting a prior generation to settle a reopen.
An SMT acknowledgement may omit the party ID. That fallback is safe only for generation one and only with the stable call reference; after a reopen, a zero-party ACK is intrinsically ambiguous and fails closed. A present party ID must match the fresh token, while a present call reference must still identify the same call.
Trait Implementations§
Source§impl Clone for MediaRequestIdentity
impl Clone for MediaRequestIdentity
Source§fn clone(&self) -> MediaRequestIdentity
fn clone(&self) -> MediaRequestIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more