pub enum ProgramCategory {
Show 23 variants
Acoustic,
Bass,
Wind,
Fantasy,
Fx,
Lead,
Organ,
Pad,
Pluck,
String,
Synth,
Vocal,
User,
None_,
Grand,
Upright,
EPiano1,
EPiano2,
Clavinet,
Harpsi,
Arpeggio,
Undefined,
Unknown(u8),
}Expand description
The program category byte the Stage 2 and 3 keep in the header’s aux word.
Reported by public documentation; not confirmed on hardware. The gaps are real: no name is known for the values between these.
Variants§
Acoustic
Bass
Wind
Fantasy
Fx
Lead
Organ
Pad
Pluck
String
Synth
Vocal
User
None_
Grand
Upright
EPiano1
EPiano2
Clavinet
Harpsi
Arpeggio
Undefined
Unknown(u8)
A stored value with no known meaning.
Implementations§
Source§impl ProgramCategory
impl ProgramCategory
Sourcepub fn of(header: &Header) -> Option<ProgramCategory>
pub fn of(header: &Header) -> Option<ProgramCategory>
The category a Stage 2 or 3 header names, or None where the aux word carries
no category id at all or one too wide for this byte-sized table.
The whole id is examined: a value above 0xff names no category here rather than
being truncated into one.
Trait Implementations§
Source§impl Clone for ProgramCategory
impl Clone for ProgramCategory
Source§fn clone(&self) -> ProgramCategory
fn clone(&self) -> ProgramCategory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ProgramCategory
Source§impl Debug for ProgramCategory
Named variants as their names; an unknown as unknown (raw). ⚠️ The corpus
tripwires match the lowercase spelling — a derived Unknown(raw) slips past
them.
impl Debug for ProgramCategory
Named variants as their names; an unknown as unknown (raw). ⚠️ The corpus
tripwires match the lowercase spelling — a derived Unknown(raw) slips past
them.
Source§impl Default for ProgramCategory
impl Default for ProgramCategory
Source§impl Display for ProgramCategory
impl Display for ProgramCategory
impl Eq for ProgramCategory
Source§impl Hash for ProgramCategory
impl Hash for ProgramCategory
Source§impl Ord for ProgramCategory
impl Ord for ProgramCategory
Source§fn cmp(&self, other: &ProgramCategory) -> Ordering
fn cmp(&self, other: &ProgramCategory) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl Packed for ProgramCategory
impl Packed for ProgramCategory
Source§const MAX_BITS: u32 = 8
const MAX_BITS: u32 = 8
Bits the widest value of this type occupies. Used to check statically that it
fits its slot.
Source§const DECODE_BITS: u32 = u8::BITS
const DECODE_BITS: u32 = u8::BITS
Widest slot this type can decode without losing bits on re-encoding. Read more
Source§const CONTROL: ControlKind = crate::fields::ControlKind::Selector
const CONTROL: ControlKind = crate::fields::ControlKind::Selector
Which panel control this value is, for a caller building an interface over the
field registry. Read more
Source§type Error = !
type Error = !
Why a bit pattern is not a valid value.
Infallible when every pattern is.Source§impl PartialEq for ProgramCategory
impl PartialEq for ProgramCategory
Source§impl PartialOrd for ProgramCategory
impl PartialOrd for ProgramCategory
impl StructuralPartialEq for ProgramCategory
Auto Trait Implementations§
impl Freeze for ProgramCategory
impl RefUnwindSafe for ProgramCategory
impl Send for ProgramCategory
impl Sync for ProgramCategory
impl Unpin for ProgramCategory
impl UnsafeUnpin for ProgramCategory
impl UnwindSafe for ProgramCategory
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.