Struct lofty::iff::wav::RIFFInfoList

source ·
pub struct RIFFInfoList { /* private fields */ }
Expand description

A RIFF INFO LIST

Supported file types

Conversions

To Tag

All items will be converted to a TagItem, with all unknown keys being stored with ItemKey::Unknown.

From Tag

When converting a TagItem, two conditions must be met:

  • The TagItem has a value other than ItemValue::Binary
  • It has a key that is 4 bytes in length and within the ASCII range

Implementations§

source§

impl RIFFInfoList

source

pub fn new() -> Self

Create a new empty RIFFInfoList

Examples
use lofty::iff::wav::RIFFInfoList;
use lofty::TagExt;

let riff_info_tag = RIFFInfoList::new();
assert!(riff_info_tag.is_empty());
source

pub fn get(&self, key: &str) -> Option<&str>

Get an item by key

source

pub fn insert(&mut self, key: String, value: String)

Insert an item

NOTE: This will do nothing if key is invalid

This will case-insensitively replace any item with the same key

source

pub fn remove(&mut self, key: &str) -> Option<String>

Remove an item by key

This will case-insensitively remove an item with the key, returning it if it exists.

Trait Implementations§

source§

impl Accessor for RIFFInfoList

source§

fn artist(&self) -> Option<Cow<'_, str>>

Returns the artist Read more
source§

fn set_artist(&mut self, value: String)

Sets the artist Read more
source§

fn remove_artist(&mut self)

Removes the artist Read more
source§

fn title(&self) -> Option<Cow<'_, str>>

Returns the title Read more
source§

fn set_title(&mut self, value: String)

Sets the title Read more
source§

fn remove_title(&mut self)

Removes the title Read more
source§

fn album(&self) -> Option<Cow<'_, str>>

Returns the album Read more
source§

fn set_album(&mut self, value: String)

Sets the album Read more
source§

fn remove_album(&mut self)

Removes the album Read more
source§

fn genre(&self) -> Option<Cow<'_, str>>

Returns the genre Read more
source§

fn set_genre(&mut self, value: String)

Sets the genre Read more
source§

fn remove_genre(&mut self)

Removes the genre Read more
source§

fn comment(&self) -> Option<Cow<'_, str>>

Returns the comment Read more
source§

fn set_comment(&mut self, value: String)

Sets the comment Read more
source§

fn remove_comment(&mut self)

Removes the comment Read more
source§

fn track(&self) -> Option<u32>

Returns the track Read more
source§

fn set_track(&mut self, value: u32)

Sets the track Read more
source§

fn remove_track(&mut self)

Removes the track Read more
source§

fn track_total(&self) -> Option<u32>

Returns the track total Read more
source§

fn set_track_total(&mut self, value: u32)

Sets the track total Read more
source§

fn remove_track_total(&mut self)

Removes the track total Read more
source§

fn year(&self) -> Option<u32>

Returns the year Read more
source§

fn set_year(&mut self, value: u32)

Sets the year Read more
source§

fn remove_year(&mut self)

Removes the year Read more
source§

fn disk(&self) -> Option<u32>

Returns the disk Read more
source§

fn set_disk(&mut self, _value: u32)

Sets the disk Read more
source§

fn remove_disk(&mut self)

Removes the disk Read more
source§

fn disk_total(&self) -> Option<u32>

Returns the disk total Read more
source§

fn set_disk_total(&mut self, _value: u32)

Sets the disk total Read more
source§

fn remove_disk_total(&mut self)

Removes the disk total Read more
source§

impl Clone for RIFFInfoList

source§

fn clone(&self) -> RIFFInfoList

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RIFFInfoList

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RIFFInfoList

source§

fn default() -> RIFFInfoList

Returns the “default value” for a type. Read more
source§

impl From<RIFFInfoList> for Tag

source§

fn from(input: RIFFInfoList) -> Self

Converts to this type from the input type.
source§

impl From<Tag> for RIFFInfoList

source§

fn from(input: Tag) -> Self

Converts to this type from the input type.
source§

impl<'a> IntoIterator for &'a RIFFInfoList

§

type Item = &'a (String, String)

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, (String, String)>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl IntoIterator for RIFFInfoList

§

type Item = (String, String)

The type of the elements being iterated over.
§

type IntoIter = IntoIter<<RIFFInfoList as IntoIterator>::Item>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq for RIFFInfoList

source§

fn eq(&self, other: &RIFFInfoList) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl SplitTag for RIFFInfoList

§

type Remainder = SplitTagRemainder

The remainder of the split operation that is not represented in the resulting Tag.
source§

fn split_tag(self) -> (Self::Remainder, Tag)

Extract and split generic contents into a Tag. Read more
source§

impl TagExt for RIFFInfoList

§

type Err = LoftyError

The associated error which can be returned from IO operations
§

type RefKey<'a> = &'a str

The type of key used in the tag for non-mutating functions
source§

fn len(&self) -> usize

Returns the number of items in the tag Read more
source§

fn contains<'a>(&'a self, key: Self::RefKey<'a>) -> bool

Whether the tag contains an item with the key Read more
source§

fn is_empty(&self) -> bool

Whether the tag has any items Read more
source§

fn save_to(&self, file: &mut File) -> Result<(), Self::Err>

Save the tag to a File Read more
source§

fn dump_to<W: Write>(&self, writer: &mut W) -> Result<(), Self::Err>

Dump the tag to a writer Read more
source§

fn remove_from_path<P: AsRef<Path>>(&self, path: P) -> Result<(), Self::Err>

Remove a tag from a Path Read more
source§

fn remove_from(&self, file: &mut File) -> Result<(), Self::Err>

Remove a tag from a File Read more
source§

fn clear(&mut self)

Clear the tag, removing all items Read more
source§

fn save_to_path<P: AsRef<Path>>(&self, path: P) -> Result<(), Self::Err>

Save the tag to a path Read more
source§

impl Eq for RIFFInfoList

source§

impl StructuralEq for RIFFInfoList

source§

impl StructuralPartialEq for RIFFInfoList

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.