pub struct Metadata {
pub data: Data,
/* private fields */
}Expand description
Data associated with a single metadata block.
Fields§
§data: DataBlock data containing one of the eight different types of metadata.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn new(is_last: bool, length: u32, data: Data) -> Self
pub fn new(is_last: bool, length: u32, data: Data) -> Self
Constructs a new Metadata struct based on the arguments passed in.
Sourcepub fn is_stream_info(&self) -> bool
pub fn is_stream_info(&self) -> bool
Returns true when the current Metadata is StreamInfo.
Sourcepub fn is_padding(&self) -> bool
pub fn is_padding(&self) -> bool
Returns true when the current Metadata is Padding.
Sourcepub fn is_application(&self) -> bool
pub fn is_application(&self) -> bool
Returns true when the current Metadata is Application.
Sourcepub fn is_seek_table(&self) -> bool
pub fn is_seek_table(&self) -> bool
Returns true when the current Metadata is SeekTable.
Sourcepub fn is_vorbis_comment(&self) -> bool
pub fn is_vorbis_comment(&self) -> bool
Returns true when the current Metadata is VorbisComment.
Sourcepub fn is_cue_sheet(&self) -> bool
pub fn is_cue_sheet(&self) -> bool
Returns true when the current Metadata is CueSheet.
Sourcepub fn is_picture(&self) -> bool
pub fn is_picture(&self) -> bool
Returns true when the current Metadata is Picture.
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true when the current Metadata is Unknown.
pub fn bytes_len(&self) -> usize
pub fn to_bytes<Write: Write>(&self, buffer: &mut Write) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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