Enum musicbrainz_rs::entity::instrument::InstrumentType
source · #[non_exhaustive]
pub enum InstrumentType {
WindInstrument,
StringInstrument,
PercussionInstrument,
ElectronicInstrument,
OtherInstrument,
Family,
Ensemble,
UnrecognizedInstrumentType,
}
Expand description
The type of a MusicBrainz instrument entity.
Note that this enum is non_exhaustive
; The list of instrument types is subject to change and
these changes are only reflected in the DB, not in actual MB code.
Variants are derived from the instrument_type
table in the MusicBrainz database.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WindInstrument
An aerophone, i.e. an instrument where the sound is created by vibrating air. The instrument itself does not vibrate.
StringInstrument
A chordophone, i.e. an instrument where the sound is created by the vibration of strings.
PercussionInstrument
An idiophone, i.e. an instrument where the sound is produced by the body of the instrument vibrating, or a drum (most membranophones) where the sound is produced by a stretched membrane which is struck or rubbed.
ElectronicInstrument
An electrophone, i.e. an instrument where the sound is created with electricity.
OtherInstrument
An instrument which doesn’t fit in the categories above.
Family
A grouping of related but different instruments, like the different violin-like instruments.
Ensemble
A standard grouping of instruments often played together, like a string quartet.
UnrecognizedInstrumentType
Any instrument_type that does not yet have a corresponding variant in this enum.
If you ever see a InstrumentType::UnrecognizedInstrumentType
in the wild, let us know and file an issue/pull request!
Trait Implementations§
source§impl Clone for InstrumentType
impl Clone for InstrumentType
source§fn clone(&self) -> InstrumentType
fn clone(&self) -> InstrumentType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InstrumentType
impl Debug for InstrumentType
source§impl<'de> Deserialize<'de> for InstrumentType
impl<'de> Deserialize<'de> for InstrumentType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq<InstrumentType> for InstrumentType
impl PartialEq<InstrumentType> for InstrumentType
source§fn eq(&self, other: &InstrumentType) -> bool
fn eq(&self, other: &InstrumentType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InstrumentType
impl Serialize for InstrumentType
impl Eq for InstrumentType
impl StructuralEq for InstrumentType
impl StructuralPartialEq for InstrumentType
Auto Trait Implementations§
impl RefUnwindSafe for InstrumentType
impl Send for InstrumentType
impl Sync for InstrumentType
impl Unpin for InstrumentType
impl UnwindSafe for InstrumentType
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.