[][src]Struct discortp::rtcp::RtcpPacket

pub struct RtcpPacket<'p> { /* fields omitted */ }

A structure enabling manipulation of on the wire packets

Methods

impl<'a> RtcpPacket<'a>[src]

pub fn new<'p>(packet: &'p [u8]) -> Option<RtcpPacket<'p>>[src]

Constructs a new RtcpPacket. If the provided buffer is less than the minimum required packet size, this will return None.

pub fn owned(packet: Vec<u8>) -> Option<RtcpPacket<'static>>[src]

Constructs a new RtcpPacket. If the provided buffer is less than the minimum required packet size, this will return None. With this constructor the RtcpPacket will own its own data and the underlying buffer will be dropped when the RtcpPacket is.

pub fn to_immutable<'p>(&'p self) -> RtcpPacket<'p>[src]

Maps from a RtcpPacket to a RtcpPacket

pub fn consume_to_immutable(self) -> RtcpPacket<'a>[src]

Maps from a RtcpPacket to a RtcpPacket while consuming the source

pub const fn minimum_packet_size() -> usize[src]

The minimum size (in bytes) a packet of this type can be. It's based on the total size of the fixed-size fields.

pub fn packet_size(_packet: &Rtcp) -> usize[src]

The size (in bytes) of a Rtcp instance when converted into a byte-array

pub fn get_version(&self) -> u2[src]

Get the version field.

pub fn get_padding(&self) -> u1[src]

Get the padding field.

pub fn get_rx_report_count(&self) -> u5[src]

Get the rx_report_count field.

pub fn get_packet_type(&self) -> RtcpType[src]

Get the value of the packet_type field

pub fn get_pkt_length(&self) -> u16be[src]

Get the pkt_length field. This field is always stored big-endian within the struct, but this accessor returns host order.

pub fn get_ssrc(&self) -> u32be[src]

Get the ssrc field. This field is always stored big-endian within the struct, but this accessor returns host order.

Trait Implementations

impl<'p> Debug for RtcpPacket<'p>[src]

impl<'p> FromPacket for RtcpPacket<'p>[src]

type T = Rtcp

The type of the packet to convert from.

impl<'a> Packet for RtcpPacket<'a>[src]

impl<'a> PacketSize for RtcpPacket<'a>[src]

impl<'p> PartialEq<RtcpPacket<'p>> for RtcpPacket<'p>[src]

impl<'p> StructuralPartialEq for RtcpPacket<'p>[src]

Auto Trait Implementations

impl<'p> RefUnwindSafe for RtcpPacket<'p>

impl<'p> Send for RtcpPacket<'p>

impl<'p> Sync for RtcpPacket<'p>

impl<'p> Unpin for RtcpPacket<'p>

impl<'p> UnwindSafe for RtcpPacket<'p>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.