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

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more