pub struct MetadataFrame { /* private fields */ }Implementations§
Source§impl MetadataFrame
impl MetadataFrame
Sourcepub fn with_data(data: impl Into<String>, timecode: i64) -> Result<Self>
pub fn with_data(data: impl Into<String>, timecode: i64) -> Result<Self>
Create a metadata frame from UTF-8 text and a timecode.
§Errors
Returns Error::InvalidCString if data contains an interior NUL byte
or Error::InvalidFrame if the SDK metadata length would exceed the
crate’s metadata size limit.
Sourcepub fn timecode(&self) -> i64
pub fn timecode(&self) -> i64
Get the timecode.
A value of zero is passed through to the SDK as its default timestamp behavior.
Sourcepub fn set_data(&mut self, data: impl Into<String>) -> Result<()>
pub fn set_data(&mut self, data: impl Into<String>) -> Result<()>
Replace the metadata text.
§Errors
Returns Error::InvalidCString if data contains an interior NUL byte
or Error::InvalidFrame if the SDK metadata length would exceed the
crate’s metadata size limit.
Sourcepub fn set_timecode(&mut self, timecode: i64)
pub fn set_timecode(&mut self, timecode: i64)
Set the timecode.
Sourcepub fn with_timecode(self, timecode: i64) -> Self
pub fn with_timecode(self, timecode: i64) -> Self
Return this frame with an updated timecode.
Trait Implementations§
Source§impl Clone for MetadataFrame
impl Clone for MetadataFrame
Source§fn clone(&self) -> MetadataFrame
fn clone(&self) -> MetadataFrame
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataFrame
impl Debug for MetadataFrame
Auto Trait Implementations§
impl Freeze for MetadataFrame
impl RefUnwindSafe for MetadataFrame
impl Send for MetadataFrame
impl Sync for MetadataFrame
impl Unpin for MetadataFrame
impl UnsafeUnpin for MetadataFrame
impl UnwindSafe for MetadataFrame
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