pub enum TypeSpecificInfo {
Enum {
default: u32,
values: Vec<String>,
},
Numeric {
default: f32,
valid_range: RangeInclusive<f32>,
units: Option<String>,
},
Switch {
default: bool,
},
}
Expand description
Contains information specific to a certain type of parameter.
This is an owning version of TypeSpecificInfoRef
.
§Examples
let enum_info = TypeSpecificInfo::Enum {
default: 0,
values: vec!["A".to_string(), "B".to_string(), "C".to_string()],
};
let numeric_info = TypeSpecificInfo::Numeric {
default: 0.0,
valid_range: 0.0..=1.0,
units: None,
};
let switch_info = TypeSpecificInfo::Switch {
default: false,
};
Variants§
Enum
Information specific to an enum parameter.
Fields
Numeric
Information specific to a numeric parameter.
Fields
§
valid_range: RangeInclusive<f32>
The valid range of the parameter.
Switch
Information specific to a switch parameter.
Trait Implementations§
Source§impl Clone for TypeSpecificInfo
impl Clone for TypeSpecificInfo
Source§fn clone(&self) -> TypeSpecificInfo
fn clone(&self) -> TypeSpecificInfo
Returns a copy 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 TypeSpecificInfo
impl Debug for TypeSpecificInfo
Source§impl<'a> From<&'a TypeSpecificInfo> for TypeSpecificInfoRef<'a, String>
impl<'a> From<&'a TypeSpecificInfo> for TypeSpecificInfoRef<'a, String>
Source§fn from(v: &'a TypeSpecificInfo) -> Self
fn from(v: &'a TypeSpecificInfo) -> Self
Converts to this type from the input type.
Source§impl<'a, S: AsRef<str>> From<&'a TypeSpecificInfoRef<'a, S>> for TypeSpecificInfo
impl<'a, S: AsRef<str>> From<&'a TypeSpecificInfoRef<'a, S>> for TypeSpecificInfo
Source§fn from(v: &'a TypeSpecificInfoRef<'a, S>) -> Self
fn from(v: &'a TypeSpecificInfoRef<'a, S>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TypeSpecificInfo
impl PartialEq for TypeSpecificInfo
impl StructuralPartialEq for TypeSpecificInfo
Auto Trait Implementations§
impl Freeze for TypeSpecificInfo
impl RefUnwindSafe for TypeSpecificInfo
impl Send for TypeSpecificInfo
impl Sync for TypeSpecificInfo
impl Unpin for TypeSpecificInfo
impl UnwindSafe for TypeSpecificInfo
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more