Struct rtcp_types::SdesItemBuilder
source · pub struct SdesItemBuilder<'a> { /* private fields */ }Implementations§
source§impl<'a> SdesItemBuilder<'a>
impl<'a> SdesItemBuilder<'a>
pub fn new(type_: u8, value: impl Into<Cow<'a, str>>) -> 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.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for SdesItemBuilder<'a>
impl<'a> Send for SdesItemBuilder<'a>
impl<'a> Sync for SdesItemBuilder<'a>
impl<'a> Unpin for SdesItemBuilder<'a>
impl<'a> UnwindSafe for SdesItemBuilder<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more