[−][src]Struct id3::frame::Frame
A structure representing an ID3 frame.
It is imporant to note that the (Partial)Eq and Hash implementations are based on the ID3 spec. This means that text frames with equal ID's are equal but picture frames with both "APIC" as ID are not because their uniqueness is also defined by their content.
Methods
impl Frame
[src]
pub fn with_content(
id: impl AsRef<str>,
content: Content
) -> Frame
[src]
id: impl AsRef<str>,
content: Content
) -> Frame
Creates a frame with the specified ID and content.
Both ID3v2.2 and >ID3v2.3 IDs are accepted, although they will be converted to ID3v2.3 format. If an ID3v2.2 ID is supplied but could not be remapped, it is stored as-is.
Panics
If the id's length is not 3 or 4 bytes long.
pub fn id(&self) -> &str
[src]
Returns the ID of this frame.
The string returned us usually 4 bytes long except when the frame was read from an ID3v2.2 tag and the ID could not be mapped to an ID3v2.3 ID.
pub fn id_for_version(&self, version: Version) -> Option<&str>
[src]
Returns the ID that is compatible with specified version or None if no ID is available in that version.
pub fn content(&self) -> &Content
[src]
Returns the content of the frame.
pub fn tag_alter_preservation(&self) -> bool
[src]
Returns whether the tag_alter_preservation flag is set.
pub fn set_tag_alter_preservation(&mut self, tag_alter_preservation: bool)
[src]
Sets the tag_alter_preservation flag.
pub fn file_alter_preservation(&self) -> bool
[src]
Returns whether the file_alter_preservation flag is set.
pub fn set_file_alter_preservation(&mut self, file_alter_preservation: bool)
[src]
Sets the file_alter_preservation flag.
Trait Implementations
impl Eq for Frame
[src]
impl Clone for Frame
[src]
fn clone(&self) -> Frame
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Frame> for Frame
[src]
fn eq(&self, other: &Frame) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Hash for Frame
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Frame
[src]
impl Display for Frame
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,