pub struct ParamDescriptor {
pub id: &'static str,
pub label: &'static str,
pub kind: ParamKind,
pub apply: ParamApply,
pub format: ParamFormat,
}Expand description
A parameter a model declares.
Fields§
§id: &'static strStable name that --set and a spec file match on, and that results record.
label: &'static strName the Parameters panel shows.
kind: ParamKindType, bounds and default.
apply: ParamApplyWhether an edit reaches the running simulation or waits for a rebuild.
format: ParamFormatDisplay format of the value.
Implementations§
Source§impl ParamDescriptor
impl ParamDescriptor
Sourcepub fn on_reload(self) -> Self
pub fn on_reload(self) -> Self
Marks the parameter ParamApply::OnReload. A parameter is live by default.
Sourcepub fn percent(self) -> Self
pub fn percent(self) -> Self
Marks the parameter as a fraction displayed as a percentage, ParamFormat::Percent.
Trait Implementations§
Source§impl Clone for ParamDescriptor
impl Clone for ParamDescriptor
Auto Trait Implementations§
impl Freeze for ParamDescriptor
impl RefUnwindSafe for ParamDescriptor
impl Send for ParamDescriptor
impl Sync for ParamDescriptor
impl Unpin for ParamDescriptor
impl UnsafeUnpin for ParamDescriptor
impl UnwindSafe for ParamDescriptor
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