Struct lofty::AnyTag[][src]

pub struct AnyTag<'a> {
    pub title: Option<&'a str>,
    pub artists: Option<Vec<&'a str>>,
    pub album: Album<'a>,
    pub comments: Option<Vec<&'a str>>,
    pub year: Option<i32>,
    pub date: Option<String>,
    pub track_number: Option<u32>,
    pub total_tracks: Option<u32>,
    pub disc_number: Option<u32>,
    pub total_discs: Option<u32>,
}
Expand description

Used to convert between tags

Fields

title: Option<&'a str>

The track title

artists: Option<Vec<&'a str>>

The track artists

album: Album<'a>

The track Album

comments: Option<Vec<&'a str>>

Collection of user comments

year: Option<i32>

The track year

date: Option<String>

The track date

track_number: Option<u32>

The track number

total_tracks: Option<u32>

The total tracks

disc_number: Option<u32>

The disc number

total_discs: Option<u32>

The total discs

Implementations

impl<'a> AnyTag<'a>[src]

pub fn title(&self) -> Option<&str>[src]

Returns title.

pub fn set_title(&mut self, title: &'a str)[src]

Replaces title.

pub fn artists(&self) -> Option<&[&str]>[src]

Returns artists.

pub fn set_artists(&mut self, artists: Vec<&'a str>)[src]

Replaces artists.

pub fn add_artist(&mut self, artist: &'a str)[src]

Appends an artist to artists

pub fn album(&self) -> Album<'_>[src]

Returns album

pub fn set_album(&mut self, album: Album<'a>)[src]

Replaces album

pub fn year(&self) -> Option<i32>[src]

Returns year

pub fn set_year(&mut self, year: i32)[src]

Replaces year

pub fn track_number(&self) -> Option<u32>[src]

Returns track number

pub fn total_tracks(&self) -> Option<u32>[src]

Returns total_tracks

pub fn disc_number(&self) -> Option<u32>[src]

Returns disc_number

pub fn total_discs(&self) -> Option<u32>[src]

Returns total_discs

impl AnyTag<'_>[src]

pub fn artists_as_string(&self) -> Option<String>[src]

Turns artists into a comma separated String

Trait Implementations

impl<'a> Debug for AnyTag<'a>[src]

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

Formats the value using the given formatter. Read more

impl<'a> Default for AnyTag<'a>[src]

fn default() -> AnyTag<'a>[src]

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for AnyTag<'a>

impl<'a> Send for AnyTag<'a>

impl<'a> Sync for AnyTag<'a>

impl<'a> Unpin for AnyTag<'a>

impl<'a> UnwindSafe for AnyTag<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.