pub struct EnumParam<E: ParamEnum> {
pub info: ParamInfo,
/* private fields */
}Expand description
An enum parameter.
Fields§
§info: ParamInfoImplementations§
Source§impl<E: ParamEnum> EnumParam<E>
impl<E: ParamEnum> EnumParam<E>
pub fn new(info: ParamInfo) -> Self
pub fn value(&self) -> E
pub fn set_value(&self, v: E)
pub fn set_index(&self, idx: u32)
pub fn index(&self) -> u32
pub fn id(&self) -> u32
Sourcepub fn format_by_index(&self, value: f64) -> String
pub fn format_by_index(&self, value: f64) -> String
Format a plain value (index as f64) to the variant name string.
Used by the #[derive(Params)] macro for default format_value on enum fields.
Auto Trait Implementations§
impl<E> !Freeze for EnumParam<E>
impl<E> RefUnwindSafe for EnumParam<E>where
E: RefUnwindSafe,
impl<E> Send for EnumParam<E>
impl<E> Sync for EnumParam<E>
impl<E> Unpin for EnumParam<E>where
E: Unpin,
impl<E> UnsafeUnpin for EnumParam<E>
impl<E> UnwindSafe for EnumParam<E>where
E: UnwindSafe,
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