pub struct VariantMetadata {
pub abbreviation: &'static str,
pub name: &'static str,
pub position: u8,
pub output_suffix: &'static str,
pub stride: u8,
pub reserved: bool,
pub required_params: &'static [&'static str],
pub channel_format: ChannelFormat,
pub output_columns: OutputColumns,
pub documentation: &'static str,
}Expand description
Complete variant metadata Note: Only Serialize is derived since static references can’t be deserialized
Fields§
§abbreviation: &'static str§name: &'static str§position: u8§output_suffix: &'static str§stride: u8§reserved: bool§required_params: &'static [&'static str]§channel_format: ChannelFormat§output_columns: OutputColumns§documentation: &'static strImplementations§
Source§impl VariantMetadata
impl VariantMetadata
Sourcepub fn from_abbrev(abbrev: &str) -> Option<&'static VariantMetadata>
pub fn from_abbrev(abbrev: &str) -> Option<&'static VariantMetadata>
Look up variant by abbreviation
Sourcepub fn from_suffix(suffix: &str) -> Option<&'static VariantMetadata>
pub fn from_suffix(suffix: &str) -> Option<&'static VariantMetadata>
Look up variant by output suffix
Sourcepub fn from_position(pos: u8) -> Option<&'static VariantMetadata>
pub fn from_position(pos: u8) -> Option<&'static VariantMetadata>
Look up variant by position
Sourcepub fn active_variants() -> impl Iterator<Item = &'static VariantMetadata>
pub fn active_variants() -> impl Iterator<Item = &'static VariantMetadata>
Get all non-reserved variants
Trait Implementations§
Source§impl Clone for VariantMetadata
impl Clone for VariantMetadata
Source§fn clone(&self) -> VariantMetadata
fn clone(&self) -> VariantMetadata
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 VariantMetadata
impl Debug for VariantMetadata
Auto Trait Implementations§
impl Freeze for VariantMetadata
impl RefUnwindSafe for VariantMetadata
impl Send for VariantMetadata
impl Sync for VariantMetadata
impl Unpin for VariantMetadata
impl UnwindSafe for VariantMetadata
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