pub trait XrBlockParser<'a>: Sized {
// Required methods
fn parse(data: &'a [u8]) -> Result<Self, RtcpParseError>;
fn header_data(&self) -> [u8; 4];
}
Expand description
Trait for parsing XR report block data in Xr
packets
Implementers only need to return the 4 byte RTCP header
from XrBlockParser::header_data
to be able to use
the getters for the common RTCP packet fields.
Required Methods§
Sourcefn parse(data: &'a [u8]) -> Result<Self, RtcpParseError>
fn parse(data: &'a [u8]) -> Result<Self, RtcpParseError>
Parse the provided XR block
Sourcefn header_data(&self) -> [u8; 4]
fn header_data(&self) -> [u8; 4]
Returns the common header for this XR Block.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.