pub enum Arriving {
Stun,
Dtls,
Rtp,
Unknown,
}Expand description
What a datagram arriving on a media port is (RFC 5764 §5.1.2).
One port carries three protocols at once, and §5.1.2 disambiguates them by the first byte alone.
The ranges do not overlap because RTP’s version-2 header puts 10 in the top two bits, DTLS
content types are 20–63, and STUN’s first two bits are zero.
Variants§
Stun
A STUN message — first byte 0 or 1. Relevant once ICE exists; classified here because §5.1.2 classifies it, and silently treating one as RTP would corrupt the sequence state.
Dtls
A DTLS record — first byte 20 to 63.
Rtp
RTP or RTCP — first byte 128 to 191.
Unknown
None of the three. §5.1.2 gives no meaning to these, so they are dropped by name rather than fed to whichever parser happens to be first.
Trait Implementations§
impl Copy for Arriving
impl Eq for Arriving
impl StructuralPartialEq for Arriving
Auto Trait Implementations§
impl Freeze for Arriving
impl RefUnwindSafe for Arriving
impl Send for Arriving
impl Sync for Arriving
impl Unpin for Arriving
impl UnsafeUnpin for Arriving
impl UnwindSafe for Arriving
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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>
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