pub struct DialogSnapshot { /* private fields */ }Expand description
Immutable version-two facts needed to continue a confirmed dialog.
Implementations§
Source§impl DialogSnapshot
impl DialogSnapshot
Sourcepub fn local_party(&self) -> &str
pub fn local_party(&self) -> &str
The validated local party value, without the separately retained dialog tag.
Sourcepub fn remote_party(&self) -> &str
pub fn remote_party(&self) -> &str
The validated remote party value, without the separately retained dialog tag.
Sourcepub const fn local_cseq(&self) -> u32
pub const fn local_cseq(&self) -> u32
The last locally used in-dialog sequence number.
Sourcepub const fn remote_cseq(&self) -> Option<u32>
pub const fn remote_cseq(&self) -> Option<u32>
The greatest accepted remote sequence number.
Sourcepub const fn remote_target(&self) -> &Uri
pub const fn remote_target(&self) -> &Uri
The retained remote target from the latest target refresh.
Sourcepub const fn protected_signalling(&self) -> bool
pub const fn protected_signalling(&self) -> bool
Whether the captured signalling path was protected.
Sourcepub const fn media_keying(&self) -> NegotiatedKeying
pub const fn media_keying(&self) -> NegotiatedKeying
The negotiated media keying class. No key bytes are retained.
Sourcepub const fn media_profile(&self) -> MediaProfile
pub const fn media_profile(&self) -> MediaProfile
The retained named media profile.
Sourcepub const fn clock_rate(&self) -> u32
pub const fn clock_rate(&self) -> u32
The RTP clock rate of the negotiated audio format.
Sourcepub const fn payload_type(&self) -> u8
pub const fn payload_type(&self) -> u8
The RTP payload type used to send the negotiated codec.
Sourcepub const fn receive_payload_type(&self) -> u8
pub const fn receive_payload_type(&self) -> u8
The RTP payload type accepted for the negotiated codec.
Sourcepub const fn dtmf_payload_type(&self) -> Option<u8>
pub const fn dtmf_payload_type(&self) -> Option<u8>
The dynamic RTP payload type carrying telephone events, when enabled.
Sourcepub const fn peer_allows_update(&self) -> bool
pub const fn peer_allows_update(&self) -> bool
Whether the peer advertised support for UPDATE.
Sourcepub const fn session_timer(&self) -> Option<(Duration, bool, Duration)>
pub const fn session_timer(&self) -> Option<(Duration, bool, Duration)>
Negotiated interval, local refresher role, and remaining duration at capture.
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Encode this value in the deterministic version-two binary format.
Values can only be obtained from validated capture or decoding, so this operation is infallible and never writes a partial result to a caller-owned buffer.
Sourcepub fn decode(input: &[u8]) -> Result<Self, DialogPersistenceError>
pub fn decode(input: &[u8]) -> Result<Self, DialogPersistenceError>
Decode and validate one complete snapshot.
The total input bound is applied before any field is read. Per-field and aggregate bounds are then checked before each allocation, so hostile length prefixes cannot request their declared amount of memory.
Trait Implementations§
Source§impl Clone for DialogSnapshot
impl Clone for DialogSnapshot
Source§fn clone(&self) -> DialogSnapshot
fn clone(&self) -> DialogSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for DialogSnapshot
impl RefUnwindSafe for DialogSnapshot
impl Send for DialogSnapshot
impl Sync for DialogSnapshot
impl Unpin for DialogSnapshot
impl UnsafeUnpin for DialogSnapshot
impl UnwindSafe for DialogSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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