[][src]Struct discortp::rtcp::MutableRtcpPacket

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

A structure enabling manipulation of on the wire packets

Methods

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

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

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

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

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

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

Maps from a MutableRtcpPacket to a RtcpPacket

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

Maps from a MutableRtcpPacket 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 populate(&mut self, packet: &Rtcp)[src]

Populates a RtcpPacket using a Rtcp structure

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.

pub fn set_version(&mut self, val: u2)[src]

Set the version field.

pub fn set_padding(&mut self, val: u1)[src]

Set the padding field.

pub fn set_rx_report_count(&mut self, val: u5)[src]

Set the rx_report_count field.

pub fn set_packet_type(&mut self, val: RtcpType)[src]

Set the value of the packet_type field.

pub fn set_pkt_length(&mut self, val: u16be)[src]

Set the pkt_length field. This field is always stored big-endian within the struct, but this mutator wants host order.

pub fn set_ssrc(&mut self, val: u32be)[src]

Set the ssrc field. This field is always stored big-endian within the struct, but this mutator wants host order.

pub fn set_payload(&mut self, vals: &[u8])[src]

Set the value of the payload field (copies contents)

Trait Implementations

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

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

type T = Rtcp

The type of the packet to convert from.

impl<'a> MutablePacket for MutableRtcpPacket<'a>[src]

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

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

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

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

Auto Trait Implementations

impl<'p> RefUnwindSafe for MutableRtcpPacket<'p>

impl<'p> Send for MutableRtcpPacket<'p>

impl<'p> Sync for MutableRtcpPacket<'p>

impl<'p> Unpin for MutableRtcpPacket<'p>

impl<'p> !UnwindSafe for MutableRtcpPacket<'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.