Enum mpd_client::tag::Tag[][src]

#[non_exhaustive]
pub enum Tag {
Show variants Album, AlbumSort, AlbumArtist, AlbumArtistSort, Artist, ArtistSort, Comment, Composer, Conductor, Date, Grouping, OriginalDate, Disc, Genre, Label, MusicBrainzArtistId, MusicBrainzRecordingId, MusicBrainzReleaseArtistId, MusicBrainzReleaseId, MusicBrainzTrackId, MusicBrainzWorkId, Name, Performer, Title, Track, Work, Other(Box<str>),
}

Tags which can be set on a Song.

MusicBrainz tags are named differently from how they appear in the protocol to better reflect their actual purpose.

Tag validity

Manually constructing a tag with the Other variant may result in protocols errors if the tag is invalid. Use the TryFrom implementation for checked conversion.

Unknown tags

When parsing or constructing responses, tags not recognized by this type will be stored as they are encountered using the Other variant. Additionally the enum is marked as non-exhaustive, so additional tags may be added without breaking compatibility.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Album
AlbumSort
AlbumArtist
AlbumArtistSort
Artist
ArtistSort
Comment
Composer
Conductor
Date
Grouping
OriginalDate
Disc
Genre
Label
MusicBrainzArtistId
MusicBrainzRecordingId
MusicBrainzReleaseArtistId
MusicBrainzReleaseId
MusicBrainzTrackId
MusicBrainzWorkId
Name
Performer
Title
Track
Work
Other(Box<str>)

Catch-all variant that contains the raw tag string when it doesn’t match any other variants, but is valid.

Implementations

impl Tag[src]

pub fn any() -> Self[src]

Creates a tag for filtering which will match any tag.

Trait Implementations

impl Argument for Tag[src]

impl Clone for Tag[src]

impl Debug for Tag[src]

impl Eq for Tag[src]

impl Hash for Tag[src]

impl PartialEq<Tag> for Tag[src]

impl StructuralEq for Tag[src]

impl StructuralPartialEq for Tag[src]

impl<'a> TryFrom<&'a str> for Tag[src]

type Error = TagError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Tag

impl Send for Tag

impl Sync for Tag

impl Unpin for Tag

impl UnwindSafe for Tag

Blanket Implementations

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

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

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

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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.

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.

impl<T> WithSubscriber for T[src]