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.