mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
database: Implement Hash for public structs
This commit is contained in:
parent
b17ffc5db9
commit
05b18db18a
6 changed files with 11 additions and 11 deletions
|
|
@ -6,7 +6,7 @@ use log::info;
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// A specific recording of a work.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Recording {
|
||||
pub id: String,
|
||||
|
|
@ -40,7 +40,7 @@ impl Recording {
|
|||
}
|
||||
|
||||
/// How a person or ensemble was involved in a recording.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Performance {
|
||||
pub performer: PersonOrEnsemble,
|
||||
|
|
@ -62,7 +62,7 @@ impl Performance {
|
|||
}
|
||||
|
||||
/// Either a person or an ensemble.
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Clone, Debug)]
|
||||
pub enum PersonOrEnsemble {
|
||||
Person(Person),
|
||||
Ensemble(Ensemble),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue