pub struct CommentFrame<'a> {
pub encoding: TextEncoding,
pub language: Lang,
pub description: String,
pub content: String,
/* private fields */
}Expand description
An ID3v2 comment frame
Similar to TXXX and WXXX frames, comments are told apart by their descriptions.
Fields§
§encoding: TextEncodingThe encoding of the description and comment text
language: LangISO-639-2 language code (3 bytes)
description: StringUnique content description
content: StringThe actual frame content
Implementations§
Source§impl CommentFrame<'_>
impl CommentFrame<'_>
Sourcepub fn new(
encoding: TextEncoding,
language: Lang,
description: String,
content: String,
) -> Self
pub fn new( encoding: TextEncoding, language: Lang, description: String, content: String, ) -> Self
Create a new CommentFrame
Sourcepub fn flags(&self) -> FrameFlags
pub fn flags(&self) -> FrameFlags
Get the flags for the frame
Sourcepub fn set_flags(&mut self, flags: FrameFlags)
pub fn set_flags(&mut self, flags: FrameFlags)
Set the flags for the frame
Sourcepub fn parse<R>(
reader: &mut R,
frame_flags: FrameFlags,
version: Id3v2Version,
) -> Result<Option<Self>>where
R: Read,
pub fn parse<R>(
reader: &mut R,
frame_flags: FrameFlags,
version: Id3v2Version,
) -> Result<Option<Self>>where
R: Read,
Read a CommentFrame from a slice
NOTE: This expects the frame header to have already been skipped
§Errors
- Unable to decode the text
ID3v2.2:
- The encoding is not
TextEncoding::Latin1orTextEncoding::UTF16
Trait Implementations§
Source§impl<'a> Clone for CommentFrame<'a>
impl<'a> Clone for CommentFrame<'a>
Source§fn clone(&self) -> CommentFrame<'a>
fn clone(&self) -> CommentFrame<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for CommentFrame<'a>
impl<'a> Debug for CommentFrame<'a>
Source§impl<'a> From<CommentFrame<'a>> for Frame<'a>
impl<'a> From<CommentFrame<'a>> for Frame<'a>
Source§fn from(value: CommentFrame<'a>) -> Self
fn from(value: CommentFrame<'a>) -> Self
Converts to this type from the input type.
Source§impl Hash for CommentFrame<'_>
impl Hash for CommentFrame<'_>
Source§impl PartialEq for CommentFrame<'_>
impl PartialEq for CommentFrame<'_>
impl<'a> Eq for CommentFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for CommentFrame<'a>
impl<'a> RefUnwindSafe for CommentFrame<'a>
impl<'a> Send for CommentFrame<'a>
impl<'a> Sync for CommentFrame<'a>
impl<'a> Unpin for CommentFrame<'a>
impl<'a> UnwindSafe for CommentFrame<'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