pub enum SettingOp {
Next,
Prev,
SetIndex(usize),
SetFraction(f32),
Rebind(InputKey),
RebindButton(GamepadButton),
}Expand description
What a “setting:*” action does to its value: cycle one step (for a stepper row), jump to an absolute option index (for a dropdown pick), set an absolute position in [0, 1] (for a slider row’s drag), or bind a key (for a key-rebind row).
Eq is intentionally not derived: SetFraction carries an f32.
Variants§
Next
Step the value one option forward.
Prev
Step the value one option back.
SetIndex(usize)
Jump straight to this option index (clamped to the option count). Sent once when the user picks an entry from an open dropdown list.
SetFraction(f32)
Set the value to this fraction of its range, 0.0..=1.0. Sent each frame while a slider is dragged.
Rebind(InputKey)
Bind the named action (the command’s setting) to this key. Sent once when the user presses a key while a rebind row is capturing.
RebindButton(GamepadButton)
Bind the named gamepad action (the command’s pad_* setting) to this
button. Sent once when the user presses a button while a gamepad rebind
row is capturing.
Trait Implementations§
impl Copy for SettingOp
impl StructuralPartialEq for SettingOp
Auto Trait Implementations§
impl Freeze for SettingOp
impl RefUnwindSafe for SettingOp
impl Send for SettingOp
impl Sync for SettingOp
impl Unpin for SettingOp
impl UnsafeUnpin for SettingOp
impl UnwindSafe for SettingOp
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().