pub enum EntityKind {
Artist,
Release,
Track,
Recording,
Work,
ReleaseGroup,
Label,
Genre,
}Expand description
Entity kind, for the polymorphic tables (credits, relations, genres).
Variants§
Artist
A person or a group.
Release
An album, in the release sense.
Track
A local placement of one recording on one release.
Recording
A recorded performance, independent of its local placements.
Work
A musical composition realized by recordings.
ReleaseGroup
The album identity shared by several release editions.
Label
A record label.
Genre
A genre. Never carried by a credit or a relation — a genre performs nothing — but an entity all the same, and one a user can have an opinion about.
Implementations§
Source§impl EntityKind
impl EntityKind
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Lowercase spelling used on disk and in the polymorphic tables.
Sourcepub fn parse_kind(s: &str) -> Option<EntityKind>
pub fn parse_kind(s: &str) -> Option<EntityKind>
Named parse_kind rather than from_str: this is not the standard
trait, and the homonymy would be confusing.
Trait Implementations§
Source§impl Clone for EntityKind
impl Clone for EntityKind
Source§fn clone(&self) -> EntityKind
fn clone(&self) -> EntityKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EntityKind
impl Debug for EntityKind
Source§impl Hash for EntityKind
impl Hash for EntityKind
Source§impl Ord for EntityKind
impl Ord for EntityKind
Source§fn cmp(&self, other: &EntityKind) -> Ordering
fn cmp(&self, other: &EntityKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EntityKind
impl PartialEq for EntityKind
Source§impl PartialOrd for EntityKind
impl PartialOrd for EntityKind
impl Copy for EntityKind
impl Eq for EntityKind
impl StructuralPartialEq for EntityKind
Auto Trait Implementations§
impl Freeze for EntityKind
impl RefUnwindSafe for EntityKind
impl Send for EntityKind
impl Sync for EntityKind
impl Unpin for EntityKind
impl UnwindSafe for EntityKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more