[−][src]Struct discortp::rtp::RtpPacket
A structure enabling manipulation of on the wire packets
Methods
impl<'a> RtpPacket<'a>
[src]
pub fn new<'p>(packet: &'p [u8]) -> Option<RtpPacket<'p>>
[src]
Constructs a new RtpPacket. If the provided buffer is less than the minimum required packet size, this will return None.
pub fn owned(packet: Vec<u8>) -> Option<RtpPacket<'static>>
[src]
Constructs a new RtpPacket. If the provided buffer is less than the minimum required packet size, this will return None. With this constructor the RtpPacket will own its own data and the underlying buffer will be dropped when the RtpPacket is.
pub fn to_immutable<'p>(&'p self) -> RtpPacket<'p>
[src]
Maps from a RtpPacket to a RtpPacket
pub fn consume_to_immutable(self) -> RtpPacket<'a>
[src]
Maps from a RtpPacket to a RtpPacket 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: &Rtp) -> usize
[src]
The size (in bytes) of a Rtp 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_extension(&self) -> u1
[src]
Get the extension field.
pub fn get_csrc_count(&self) -> u4
[src]
Get the csrc_count field.
pub fn get_marker(&self) -> u1
[src]
Get the marker field.
pub fn get_payload_type(&self) -> RtpType
[src]
Get the value of the payload_type field
pub fn get_sequence(&self) -> u16be
[src]
Get the sequence field. This field is always stored big-endian within the struct, but this accessor returns host order.
pub fn get_timestamp(&self) -> u32be
[src]
Get the timestamp 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 get_csrc_list_raw(&self) -> &[u8]
[src]
Get the raw &u8 value of the csrc_list field, without copying
pub fn get_csrc_list(&self) -> Vec<u32be>
[src]
Get the value of the csrc_list field (copies contents)
Trait Implementations
impl<'p> Debug for RtpPacket<'p>
[src]
impl<'p> FromPacket for RtpPacket<'p>
[src]
impl<'a> Packet for RtpPacket<'a>
[src]
impl<'a> PacketSize for RtpPacket<'a>
[src]
fn packet_size(&self) -> usize
[src]
impl<'p> PartialEq<RtpPacket<'p>> for RtpPacket<'p>
[src]
impl<'p> StructuralPartialEq for RtpPacket<'p>
[src]
Auto Trait Implementations
impl<'p> RefUnwindSafe for RtpPacket<'p>
impl<'p> Send for RtpPacket<'p>
impl<'p> Sync for RtpPacket<'p>
impl<'p> Unpin for RtpPacket<'p>
impl<'p> UnwindSafe for RtpPacket<'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>,