pub struct SdesItemBuilder<'a> { /* private fields */ }Expand description
SDES item builder
Implementations§
Source§impl<'a> SdesItemBuilder<'a>
impl<'a> SdesItemBuilder<'a>
Sourcepub fn prefix(self, prefix: impl Into<Cow<'a, [u8]>>) -> Self
pub fn prefix(self, prefix: impl Into<Cow<'a, [u8]>>) -> Self
Adds a prefix to a PRIV SDES Item.
Has no effect if the type is not SdesItem::PRIV.
Sourcepub fn write_into(&self, buf: &mut [u8]) -> Result<usize, RtcpWriteError>
pub fn write_into(&self, buf: &mut [u8]) -> Result<usize, RtcpWriteError>
Writes the SDES Item into buf.
Returns an error if:
- The buffer is too small.
- An Item presents an invalid size.
Sourcepub fn into_owned(self) -> SdesItemBuilder<'static>
pub fn into_owned(self) -> SdesItemBuilder<'static>
Converts this SdesItemBuilder into an owned version.
Clones the value (and prefix if applicable) if it is not already owned.