Enum Field

Source
pub enum Field {
Show 39 variants Title, Artist, Album, Recording, Work, Movement, ReleaseGroup, AlbumArtist, Genre, Label, Comment, Lyrics, Path, Codec, Container, Year, Duration, Size, Bitrate, SampleRate, BitDepth, Channels, Reference, Lossless, Compilation, Rating(Scope), Loved(Scope), LovedAnywhere, Tag(Scope), Note(Scope), Played, Performing, Credit(&'static str), Instrument, Guest, CompilationArtist, Contributor, Collaborator, Anything,
}
Expand description

Which value of a track a term reads.

The names are the ones typed, and the dotted ones say where an opinion was written: rating is the track’s own, album.rating the album’s, artist.rating the artist’s. Without that distinction “rated five stars” would be a different claim depending on where the user happened to put it, and no message could say which was meant.

Variants§

§

Title

Track title.

§

Artist

Any artist credited on the track, in any role.

§

Album

Album title.

§

Recording

The canonical recorded performance behind the local track.

§

Work

An identified composition, its explicit parent, or this file’s WORK tag.

§

Movement

A movement title or number written in the local file’s tags.

§

ReleaseGroup

The release group shared by this edition and its remasters.

§

AlbumArtist

The album’s own artist.

§

Genre

A genre carried by the track or by its album.

§

Label

A label the album came out on.

§

Comment

The comment tag, as the tagger wrote it.

§

Lyrics

The words: from the tag that carries them, or from the .lrc beside the file.

§

Path

The file’s path.

§

Codec

The codec: flac, mp3, opus…

§

Container

File container, independently of the contained codec.

§

Year

Year of the album.

§

Duration

Playing time, in milliseconds.

§

Size

Size on disk, in bytes.

§

Bitrate

Bitrate in kbps.

§

SampleRate

Sample rate in Hz.

§

BitDepth

Declared bits per sample, when the format provides it.

§

Channels

Declared source channel count.

§

Reference

Stable catalog track reference, independent of display titles.

§

Lossless

true for a lossless codec.

§

Compilation

true when the album is one several artists share.

§

Rating(Scope)

Stars given, on the entity named by the scope.

§

Loved(Scope)

A favourite, on the entity named by the scope.

§

LovedAnywhere

A favourite, wherever it was actually written: the track itself, or failing that its album, or failing that its artist.

What a bare loved asks. Unlike Field::Rating, a favourite is a blunter signal — closer to “this matters to me” than to a precise score — so loving a whole album should not have to be repeated one track at a time. track.loved still reaches the precise, track-only question, exactly as album.loved and artist.loved already do for theirs.

§

Tag(Scope)

A free label, on the entity named by the scope.

§

Note(Scope)

A note was written, and contains this text.

§

Played

How many times it was played.

§

Performing

An artist audible on the track, in any performing role.

The class model::is_performing_role draws: singing one guest verse counts, having written the words does not. artist --with asks exactly this question, and no pile of role fields ORed together would say it as plainly.

§

Credit(&'static str)

An artist credited in one named role.

artist: matches any credit, in any role, which is what makes artist:ozzy artist:"zakk wylde" already mean “both are on it”. This asks the finer question the graph was built for: who did what.

§

Instrument

An instrument or relationship attribute on a credit.

§

Guest

A performing artist appearing on another artist’s non-compilation release.

§

CompilationArtist

A performing artist appearing on a compilation.

§

Contributor

An artist with a non-performing contribution such as composer or producer.

§

Collaborator

A performing artist sharing the track with at least one other performer.

§

Anything

The whole track, for a bare word with no field.

Trait Implementations§

Source§

impl Clone for Field

Source§

fn clone(&self) -> Field

Returns a duplicate 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 Field

Source§

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

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

impl PartialEq for Field

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Field

Source§

impl StructuralPartialEq for Field

Auto Trait Implementations§

§

impl Freeze for Field

§

impl RefUnwindSafe for Field

§

impl Send for Field

§

impl Sync for Field

§

impl Unpin for Field

§

impl UnwindSafe for Field

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

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.

§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

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

Source§

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>,

Source§

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.
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,