[−][src]Struct discortp::rtcp::RtcpPacket
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]
impl<'a> Packet for RtcpPacket<'a>
[src]
impl<'a> PacketSize for RtcpPacket<'a>
[src]
fn packet_size(&self) -> usize
[src]
impl<'p> PartialEq<RtcpPacket<'p>> for RtcpPacket<'p>
[src]
fn eq(&self, other: &RtcpPacket<'p>) -> bool
[src]
fn ne(&self, other: &RtcpPacket<'p>) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,