pub struct ReceivedPacket { /* private fields */ }Expand description
A received RTP packet.
This holds more information than the packet itself: also a
PacketContext, the stream, and extended timestamp.
Implementations§
Source§impl ReceivedPacket
impl ReceivedPacket
Sourcepub fn header(&self) -> PacketHeader
pub fn header(&self) -> PacketHeader
Returns the fixed 12-byte RTP header.
This constructs a PacketHeader on-the-fly from the packet data;
inlining should avoid an actual copy in most cases.
pub fn timestamp(&self) -> Timestamp
pub fn mark(&self) -> bool
pub fn ctx(&self) -> &PacketContext
pub fn stream_id(&self) -> usize
pub fn ssrc(&self) -> u32
pub fn sequence_number(&self) -> u16
pub fn loss(&self) -> u16
Sourcepub fn into_payload_bytes(self) -> Bytes
pub fn into_payload_bytes(self) -> Bytes
Consumes the ReceivedPacket and returns the Payload as a Bytes.
This is currently very efficient (no copying or reference-counting), although that is not an API guarantee.
Trait Implementations§
Source§impl Debug for ReceivedPacket
impl Debug for ReceivedPacket
impl Eq for ReceivedPacket
Source§impl PartialEq for ReceivedPacket
impl PartialEq for ReceivedPacket
impl StructuralPartialEq for ReceivedPacket
Auto Trait Implementations§
impl !Freeze for ReceivedPacket
impl RefUnwindSafe for ReceivedPacket
impl Send for ReceivedPacket
impl Sync for ReceivedPacket
impl Unpin for ReceivedPacket
impl UnsafeUnpin for ReceivedPacket
impl UnwindSafe for ReceivedPacket
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