Skip to main content

Packet

Trait Packet 

Source
pub trait Packet:
    Send
    + Sync
    + Marshal
    + Unmarshal
    + Display
    + Debug {
    // Required methods
    fn header(&self) -> Header;
    fn destination_ssrc(&self) -> Vec<u32>;
    fn raw_size(&self) -> usize;
    fn as_any(&self) -> &dyn Any;
    fn equal(&self, other: &dyn Packet) -> bool;
    fn cloned(&self) -> Box<dyn Packet>;
}
Expand description

Packet represents an RTCP packet, a protocol used for out-of-band statistics and control information for an RTP session

Required Methods§

Source

fn header(&self) -> Header

This packet’s RTCP header.

Source

fn destination_ssrc(&self) -> Vec<u32>

The SSRCs this packet is about.

Used to route feedback: a report’s destination SSRCs identify the streams it concerns, which is how an SFU decides where to forward it.

Source

fn raw_size(&self) -> usize

The encoded size in bytes, header and padding included.

Source

fn as_any(&self) -> &dyn Any

Downcasting hook, so a caller holding Box<dyn Packet> can recover the concrete type.

Source

fn equal(&self, other: &dyn Packet) -> bool

Compares against another packet, since PartialEq is not object safe.

Source

fn cloned(&self) -> Box<dyn Packet>

Clones this packet behind a trait object, since Clone is not object safe.

Trait Implementations§

Source§

impl Clone for Box<dyn Packet>

Source§

fn clone(&self) -> Box<dyn Packet>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl PartialEq for dyn Packet

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Packet for ApplicationDefined

Source§

impl Packet for ApplicationLayerFeedback

Source§

impl Packet for CcFeedbackReport

Source§

impl Packet for CompoundPacket

Source§

impl Packet for DLRRReportBlock

Source§

impl Packet for EcnFeedback

Source§

impl Packet for EcnSummaryReportBlock

Source§

impl Packet for ExtendedReport

Source§

impl Packet for FullIntraRequest

Source§

impl Packet for Goodbye

Source§

impl Packet for LayerRefreshRequest

Source§

impl Packet for PacketReceiptTimesReportBlock

Source§

impl Packet for PauseResume

Source§

impl Packet for PictureLossIndication

Source§

impl Packet for RLEReportBlock

Source§

impl Packet for RapidResynchronizationRequest

Source§

impl Packet for RawPacket

Source§

impl Packet for ReceiverEstimatedMaximumBitrate

Source§

impl Packet for ReceiverReferenceTimeReportBlock

Source§

impl Packet for ReceiverReport

Source§

impl Packet for ReceptionReport

Source§

impl Packet for ReferencePictureSelectionIndication

Source§

impl Packet for SenderReport

Source§

impl Packet for SliceLossIndication

Source§

impl Packet for SourceDescription

Source§

impl Packet for StatisticsSummaryReportBlock

Source§

impl Packet for TemporalSpatialTradeoffNotification

Source§

impl Packet for TemporalSpatialTradeoffRequest

Source§

impl Packet for TemporaryMaximumBitrateNotification

Source§

impl Packet for TemporaryMaximumBitrateRequest

Source§

impl Packet for TransportLayerCc

Source§

impl Packet for TransportLayerNack

Source§

impl Packet for UnknownReportBlock

Source§

impl Packet for VideoBackChannelMessage

Source§

impl Packet for VoIPMetricsReportBlock