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

Source

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

Source

fn raw_size(&self) -> usize

Source

fn as_any(&self) -> &dyn Any

Source

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

Source

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

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§