Skip to main content

FieldBound

Struct FieldBound 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: &'static str

The 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: f64

The 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: f64

The 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 str

The unit, for a caller’s schema; empty where the quantity is dimensionless.

§policy: TuningPolicy

How the loop moves an accepted value into effect.

§log_slider: bool

Whether the range spans enough decades that a caller should draw it logarithmically.

§reject_non_positive: bool

Whether 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 str

Which 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: bool

Whether 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

Source§

fn clone(&self) -> FieldBound

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FieldBound

Source§

impl Debug for FieldBound

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FieldBound

Source§

fn eq(&self, other: &FieldBound) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FieldBound

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.