pub struct SynchronizedTextFrame<'a> {
pub encoding: TextEncoding,
pub language: [u8; 3],
pub timestamp_format: TimestampFormat,
pub content_type: SyncTextContentType,
pub description: Option<String>,
pub content: Vec<(u32, String)>,
/* private fields */
}Expand description
Represents an ID3v2 synchronized text frame
Fields§
§encoding: TextEncodingThe text encoding (description/text)
language: [u8; 3]ISO-639-2 language code (3 bytes)
timestamp_format: TimestampFormatThe format of the timestamps
content_type: SyncTextContentTypeThe type of content stored
description: Option<String>Unique content description
content: Vec<(u32, String)>Collection of timestamps and text
Implementations§
Source§impl SynchronizedTextFrame<'_>
impl SynchronizedTextFrame<'_>
Sourcepub fn new(
encoding: TextEncoding,
language: [u8; 3],
timestamp_format: TimestampFormat,
content_type: SyncTextContentType,
description: Option<String>,
content: Vec<(u32, String)>,
) -> Self
pub fn new( encoding: TextEncoding, language: [u8; 3], timestamp_format: TimestampFormat, content_type: SyncTextContentType, description: Option<String>, content: Vec<(u32, String)>, ) -> Self
Create a new SynchronizedTextFrame
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(data: &[u8], frame_flags: FrameFlags) -> Result<Self>
pub fn parse(data: &[u8], frame_flags: FrameFlags) -> Result<Self>
Read a SynchronizedTextFrame from a slice
NOTE: This expects the frame header to have already been skipped
§Errors
This function will return BadSyncText if at any point it’s unable to parse the data
Trait Implementations§
Source§impl<'a> Clone for SynchronizedTextFrame<'a>
impl<'a> Clone for SynchronizedTextFrame<'a>
Source§fn clone(&self) -> SynchronizedTextFrame<'a>
fn clone(&self) -> SynchronizedTextFrame<'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 SynchronizedTextFrame<'a>
impl<'a> Debug for SynchronizedTextFrame<'a>
Source§impl<'a> Hash for SynchronizedTextFrame<'a>
impl<'a> Hash for SynchronizedTextFrame<'a>
Source§impl<'a> PartialEq for SynchronizedTextFrame<'a>
impl<'a> PartialEq for SynchronizedTextFrame<'a>
Source§fn eq(&self, other: &SynchronizedTextFrame<'a>) -> bool
fn eq(&self, other: &SynchronizedTextFrame<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> Eq for SynchronizedTextFrame<'a>
impl<'a> StructuralPartialEq for SynchronizedTextFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for SynchronizedTextFrame<'a>
impl<'a> RefUnwindSafe for SynchronizedTextFrame<'a>
impl<'a> Send for SynchronizedTextFrame<'a>
impl<'a> Sync for SynchronizedTextFrame<'a>
impl<'a> Unpin for SynchronizedTextFrame<'a>
impl<'a> UnwindSafe for SynchronizedTextFrame<'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