Struct musicbrainz_rs::entity::relations::Relation
source · pub struct Relation {Show 13 fields
pub end: Option<NaiveDate>,
pub attributes: Option<Vec<String>>,
pub content: RelationContent,
pub attribute_values: Option<HashMap<String, String>>,
pub attribute_ids: Option<HashMap<String, String>>,
pub target_type: Option<String>,
pub target_credit: Option<String>,
pub source_credit: Option<String>,
pub ended: Option<bool>,
pub type_id: String,
pub begin: Option<NaiveDate>,
pub direction: String,
pub relation_type: String,
}
Expand description
Relationships are a way to represent all the different ways in which entities are connected to each other and to URLs outside MusicBrainz.
Fields§
§end: Option<NaiveDate>
§attributes: Option<Vec<String>>
Relationships can have attributes which modify the relationship. There is a list of all attributes, but the attributes which are available, and how they should be used, depends on the relationship type, so see the documentation for the relationship you want to use for more information.
content: RelationContent
§attribute_values: Option<HashMap<String, String>>
§attribute_ids: Option<HashMap<String, String>>
§target_type: Option<String>
There are a huge number of different relationship types. The lists (organised per types of entities they connect) can be checked at the relationship type table.
target_credit: Option<String>
Credits allow indicating that, for example, songwriting was credited to an artist’s legal name, and not his main (performance) name.
source_credit: Option<String>
§ended: Option<bool>
§type_id: String
§begin: Option<NaiveDate>
Some relationships have two date fields, a begin date and an end date, to store the period of time during which the relationship applied. The date can be the year, the year and the month or the full date. It is optional, so it can also be left blank. As with other attributes, see the documentation for the relationship types you are using.
direction: String
§relation_type: String