pub struct ArtistFacts {Show 20 fields
pub lookup_mbid: Option<String>,
pub relationships_complete: bool,
pub area: Option<String>,
pub country_code: Option<String>,
pub began: Option<String>,
pub ended: Option<String>,
pub active: Option<bool>,
pub kind: Option<String>,
pub disambiguation: Option<String>,
pub genres: Vec<String>,
pub aliases: Vec<String>,
pub wikidata: Option<String>,
pub discogs: Option<String>,
pub homepage: Option<String>,
pub summary: Option<Prose>,
pub discography: Vec<KnownRelease>,
pub discography_fetched_at: Option<u64>,
pub members: Vec<Membership>,
pub portrait: Option<Picture>,
pub logo: Option<Picture>,
}Expand description
What a source says about one artist.
Every field is optional: a source may not hold it, and an empty answer is not an error. None of these have a tag counterpart — there is no widely used tag for an artist’s country — so this is knowledge the files simply do not carry, rather than a second opinion about something they do.
Fields§
§lookup_mbid: Option<String>An artist MBID whose exact lookup confirmed this canonical source ID.
Set by the lookup orchestrator when MusicBrainz redirects a merged ID.
It preserves that verified alias without replacing the canonical ID in
SourceRecord::source_id. Absent on legacy snapshots; name searches
never establish this evidence.
relationships_complete: boolA full MusicBrainz lookup checked relationships, including a confirmed absence of URLs.
area: Option<String>Country or area of origin, as the source names it.
country_code: Option<String>The same country as a two-letter code, when the source gives one.
Kept beside the name rather than instead of it, because the source
states both and they answer different needs: area is what a reader
sees, the code is what they can type. It used to be read only as a
fallback for a missing name and otherwise dropped — a fact the source
had stated, thrown away because another field happened to be filled.
ISO 3166-1 alpha-2, so the United Kingdom is GB and not UK.
began: Option<String>Formation date: a year, or a fuller date when the source has one.
ended: Option<String>When it ended, for a group that has.
active: Option<bool>Whether it is still going, when the source says so.
Distinct from ArtistFacts::ended being absent, and the distinction
is the whole point: a band with no end date may be one that never
stopped, or one nobody has filled in. Some(true) is an answer,
None is a silence, and a reader shown the same thing for both learns
nothing.
kind: Option<String>person, group, orchestra, choir… as the source classifies it.
disambiguation: Option<String>The short phrase a source uses to tell two same-named artists apart — “US industrial metal band”, “UK folk singer”, and sometimes something as unhelpful as “the band”.
Not a description, and it must not be labelled as one: it exists to separate two entries that share a name, so it is written against whatever the other entry is. Shown as a note for that reason.
genres: Vec<String>Genres, as the source’s editors voted them, most agreed first.
Beside the genre tag rather than over it: what a crowd calls a record and what its tags call it are two answers, and the second is the one the user chose to write.
aliases: Vec<String>Other names the same artist is known by.
wikidata: Option<String>Wikidata entity page, when the source links to one.
The one link that leads somewhere else: Wikidata is how a real article is reached in the reader’s own language, so it is stored under its own name rather than lost in a list of URLs.
discogs: Option<String>Discogs page, when the source links to one.
homepage: Option<String>The artist’s own site, when they have one the source knows about.
summary: Option<Prose>A few sentences about the artist, with the attribution its licence
requires — see Prose.
MusicBrainz never fills this: it holds identifiers and relationships, not prose. It comes from an encyclopaedia, and it is stored as one inseparable value for the reason written on the type.
discography: Vec<KnownRelease>Every record the source credits to this artist — see KnownRelease.
On the artist, and deliberately not on the releases. A release key
is artist|title|folder, and an album you do not own has no folder, so
a record you are missing cannot be an entity of this layer at all. It is
instead a fact about the artist: “MusicBrainz credits fourteen albums
to this name”.
Which of them are missing from the shelf is then derived on read, by comparing that list with the catalog — the same rule the whole layer follows for agreement with a tag. Storing “missing” would go stale the moment the album is bought, and the catalog would hold a claim it had stopped being able to justify.
discography_fetched_at: Option<u64>When a complete discography browse succeeded, including an empty answer.
Unix seconds, set only after every page was received and validated. Absent on older documents and artist lookups that never browsed release groups. A legacy nonempty list remains reusable without this optional field; an empty list needs it to distinguish an answer from no request. An artist lookup must preserve it only while the artist ID stays the same.
members: Vec<Membership>Who played in this band, or which bands this person played in — see
Membership.
One list, not two, because MusicBrainz states one relation and the two readings are the same fact seen from either end. Splitting it here would mean deciding at write time which question a reader was going to ask, and getting it wrong for a person who is both — a soloist with a backing band under their own name is exactly that.
portrait: Option<Picture>A picture of the artist, when a source holds an address for one — see
Picture.
The address, never the bytes. The image itself is written to disk —
beside the music when one folder holds every album of theirs, an
assets/ folder otherwise — and rediscovered from there, the same way
cover.jpg is never registered anywhere either. What is kept here is
only the fact that a source was asked and what it answered, so a later
run does not ask again for nothing: see fetch --portraits.
logo: Option<Picture>The artist’s logo, when a source holds an address for one — see
Picture.
Same shape and same reason as ArtistFacts::portrait: the address
only, written to disk and rediscovered from there, kept here so a
later run does not ask again for nothing: see fetch --logos.
Implementations§
Source§impl ArtistFacts
impl ArtistFacts
Sourcepub fn discography_is_cached(&self) -> bool
pub fn discography_is_cached(&self) -> bool
Whether a completed discography answer is cached, even when it is empty.
Nonempty legacy lists remain cached without a completion timestamp.
Sourcepub fn line_up(&self) -> impl Iterator<Item = &Membership>
pub fn line_up(&self) -> impl Iterator<Item = &Membership>
The line-up: everyone the source says played in this artist.
Sourcepub fn bands(&self) -> impl Iterator<Item = &Membership>
pub fn bands(&self) -> impl Iterator<Item = &Membership>
The other way round: the bands this artist played in.
Sourcepub fn line_up_in(&self, year: u32) -> (Vec<&Membership>, usize)
pub fn line_up_in(&self, year: u32) -> (Vec<&Membership>, usize)
Who the source places in this band in a given year, and how many members it cannot place at all.
This is the whole reason the dates are worth fetching: a line-up is a fact about an artist, an album is a fact about a year, and crossing them answers the question a listener actually asks — who was in the band when this record came out.
Derived when read, never stored. A stored line-up would be a claim the catalog had stopped being able to justify the moment either side changed, and it is the same rule the missing-albums list already follows.
A row is placed only when the source’s own dates put it there: an undated membership, or one the source says has ended without saying when, is counted rather than shown. Including it would put a musician on a record they may not be on, which is the one mistake here that matters; dropping it in silence would be a filter the reader cannot see.
Trait Implementations§
Source§impl Clone for ArtistFacts
impl Clone for ArtistFacts
Source§fn clone(&self) -> ArtistFacts
fn clone(&self) -> ArtistFacts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more