Struct id3::frame::Frame [−][src]
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.
Implementations
impl Frame
[src]
pub fn with_content(id: impl AsRef<str>, content: Content) -> Frame
[src]
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.
pub fn name(&self) -> &str
[src]
Trait Implementations
impl Clone for Frame
[src]
impl Debug for Frame
[src]
impl Display for Frame
[src]
impl Eq for Frame
[src]
impl Hash for Frame
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Frame> for Frame
[src]
impl StructuralEq for Frame
[src]
Auto Trait Implementations
impl RefUnwindSafe for Frame
[src]
impl Send for Frame
[src]
impl Sync for Frame
[src]
impl Unpin for Frame
[src]
impl UnwindSafe for Frame
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,