pub struct Instruments {
pub instruments: Vec<Instrument>,
}Expand description
A thin wrapper around a Vec<Instrument> with Add/Subtract operations.
Fields§
§instruments: Vec<Instrument>A list of instruments.
Implementations§
Source§impl Instruments
impl Instruments
Sourcepub fn all() -> Instruments
pub fn all() -> Instruments
All instruments.
Sourcepub fn piano() -> Instruments
pub fn piano() -> Instruments
GM1 piano instruments.
Sourcepub fn tonal_percussive() -> Instruments
pub fn tonal_percussive() -> Instruments
GM1 tonal percussive instruments.
Sourcepub fn organ() -> Instruments
pub fn organ() -> Instruments
GM1 organ instruments.
Sourcepub fn guitar() -> Instruments
pub fn guitar() -> Instruments
GM1 guitar instruments.
Sourcepub fn bass() -> Instruments
pub fn bass() -> Instruments
GM1 bass instruments.
Sourcepub fn strings() -> Instruments
pub fn strings() -> Instruments
GM1 string instruments.
Sourcepub fn ensemble() -> Instruments
pub fn ensemble() -> Instruments
GM1 ensemble instruments.
Sourcepub fn brass() -> Instruments
pub fn brass() -> Instruments
GM1 brass instruments.
Sourcepub fn reed() -> Instruments
pub fn reed() -> Instruments
GM1 reed instruments.
Sourcepub fn pipe() -> Instruments
pub fn pipe() -> Instruments
GM1 pipe instruments.
Sourcepub fn synth_lead() -> Instruments
pub fn synth_lead() -> Instruments
GM1 synth lead instruments.
Sourcepub fn synth_pad() -> Instruments
pub fn synth_pad() -> Instruments
GM1 synth pad instruments.
Sourcepub fn synth_fx() -> Instruments
pub fn synth_fx() -> Instruments
GM1 synth FX instruments.
Sourcepub fn ethnic() -> Instruments
pub fn ethnic() -> Instruments
GM1 ethnic instruments.
Sourcepub fn percussive() -> Instruments
pub fn percussive() -> Instruments
GM1 percussive instruments.
Sourcepub fn sound_fx() -> Instruments
pub fn sound_fx() -> Instruments
GM1 sound FX instruments.
Sourcepub fn melodic() -> Instruments
pub fn melodic() -> Instruments
Returns “melodic” instruments which have a clear tone, and are not overly percussive.
Trait Implementations§
Source§impl Add<Instrument> for Instruments
##Example
impl Add<Instrument> for Instruments
##Example
let pianos = Instruments { instruments: vec![Instrument::AcousticGrandPiano] }
+ Instrument::BrightAcousticPiano;
assert_eq!(pianos, Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] });Source§type Output = Instruments
type Output = Instruments
The resulting type after applying the
+ operator.Source§impl Add<Instruments> for Instrument
##Example
impl Add<Instruments> for Instrument
##Example
let pianos = Instrument::AcousticGrandPiano
+ Instruments { instruments: vec![Instrument::BrightAcousticPiano] };
assert_eq!(pianos, Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] });Source§type Output = Instruments
type Output = Instruments
The resulting type after applying the
+ operator.Source§impl Add for Instruments
##Example
impl Add for Instruments
##Example
let pianos = Instruments { instruments: vec![Instrument::AcousticGrandPiano] }
+ Instruments { instruments: vec![Instrument::BrightAcousticPiano] };
assert_eq!(pianos, Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] });Source§impl Clone for Instruments
impl Clone for Instruments
Source§fn clone(&self) -> Instruments
fn clone(&self) -> Instruments
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 Instruments
impl Debug for Instruments
Source§impl From<Instruments> for Vec<Instrument>
##Example
impl From<Instruments> for Vec<Instrument>
##Example
let instruments = Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] };
let vec_instruments: Vec<Instrument> = instruments.into();
assert_eq!(
vec_instruments,
vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano]
);Source§fn from(value: Instruments) -> Self
fn from(value: Instruments) -> Self
Converts to this type from the input type.
Source§impl IntoIterator for Instruments
impl IntoIterator for Instruments
Source§impl PartialEq for Instruments
impl PartialEq for Instruments
Source§impl Sub<Instrument> for Instruments
##Example
impl Sub<Instrument> for Instruments
##Example
let no_violins = Instruments { instruments: vec![Instrument::Violin, Instrument::Cello] }
- Instrument::Violin;
assert_eq!(no_violins, Instruments { instruments: vec![Instrument::Cello] });
let instruments = Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] };Source§type Output = Instruments
type Output = Instruments
The resulting type after applying the
- operator.Source§impl Sub for Instruments
##Example
impl Sub for Instruments
##Example
let no_violins = Instruments { instruments: vec![Instrument::Violin, Instrument::Cello] }
- Instruments { instruments: vec![Instrument::Violin] };
assert_eq!(no_violins, Instruments { instruments: vec![Instrument::Cello] });impl StructuralPartialEq for Instruments
Auto Trait Implementations§
impl Freeze for Instruments
impl RefUnwindSafe for Instruments
impl Send for Instruments
impl Sync for Instruments
impl Unpin for Instruments
impl UnwindSafe for Instruments
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