#[non_exhaustive]pub struct FieldBound {Show 13 fields
pub name: &'static str,
pub index: Option<usize>,
pub min: f64,
pub max: f64,
pub unit: &'static str,
pub policy: TuningPolicy,
pub log_slider: bool,
pub reject_non_positive: bool,
pub group: &'static str,
pub danger: Option<TuningDanger>,
pub slider_max: Option<f64>,
pub off_at: Option<f64>,
pub norm: bool,
}Expand description
One scalar of LiveTuning: what it is called, what it means, and how far it may go.
Read, never built, outside this crate: #[non_exhaustive] so that the fields
a later parameter needs can be added without a major version.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: &'static strThe field’s name, as a caller’s schema and an update name it.
index: Option<usize>The element, for the array fields; None for the scalars.
min: f64The smallest value left in force. Anything below it is clamped up to it, negatives
included — the values that are refused instead of clamped are the ones
reject_non_positive marks. joint_damping has a second,
higher floor that depends on the spring it damps
(LiveTuning::joint_damping_floor).
max: f64The largest value left in force for an update that carries this field; anything above
it is then clamped down to it. A field an update does not carry is never lowered, so a
value seeded above this survives until someone moves it; LiveTuning::apply_update is
the authority on both.
unit: &'static strThe unit, for a caller’s schema; empty where the quantity is dimensionless.
policy: TuningPolicyHow the loop moves an accepted value into effect.
log_slider: boolWhether the range spans enough decades that a caller should draw it logarithmically.
reject_non_positive: boolWhether a value of zero or less is rejected rather than clamped up to min. Set
where zero is not a soft version of the parameter but a different thing entirely, so
that clamping would silently change the meaning of the request.
group: &'static strWhich set of controls this one belongs beside. Presentation, and here so that a publisher of this table needs no field list of its own: the moment one exists, a field added here is a field that table forgets.
danger: Option<TuningDanger>How much care moving this one wants, if any.
slider_max: Option<f64>A value below max that a slider may usefully stop at, where the top of
the range is reachable but rarely wanted; None draws the whole range. The bound is
still max: this narrows the slider, never the gate.
off_at: Option<f64>The value at which this parameter means “off” rather than “very small” or “very large”, for a caller that wants to say so beside the control: the cutoff that is the filter’s off switch, the gain that is the term’s.
norm: boolWhether this word is one axis of a budget expressed as a norm rather than per axis, so a caller shows the per-axis share beside it. The OTG’s first rule is why the difference matters.
Trait Implementations§
Source§impl Clone for FieldBound
impl Clone for FieldBound
Source§fn clone(&self) -> FieldBound
fn clone(&self) -> FieldBound
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FieldBound
Source§impl Debug for FieldBound
impl Debug for FieldBound
Source§impl PartialEq for FieldBound
impl PartialEq for FieldBound
Source§fn eq(&self, other: &FieldBound) -> bool
fn eq(&self, other: &FieldBound) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FieldBound
Auto Trait Implementations§
impl Freeze for FieldBound
impl RefUnwindSafe for FieldBound
impl Send for FieldBound
impl Sync for FieldBound
impl Unpin for FieldBound
impl UnsafeUnpin for FieldBound
impl UnwindSafe for FieldBound
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<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.