pub struct OptionDescriptor {
pub key: String,
pub label: String,
pub help: String,
pub kind: OptionKind,
pub unit: Option<String>,
}Expand description
Description of one option a block accepts (spec §3.2.1).
Resolved by an engine against a model, because permissible values and correct defaults are often properties of the model in hand — which constituents exist, and what unit system the file declares. A consumer displays what it is given and computes nothing.
Fields§
§key: StringField name in the block’s options object.
label: StringHuman-facing control label.
help: StringOne or two sentences explaining what the option does.
kind: OptionKindValue shape and bounds.
unit: Option<String>Display unit text, or None. Display only — never a unit system.
Trait Implementations§
Source§impl Clone for OptionDescriptor
impl Clone for OptionDescriptor
Source§fn clone(&self) -> OptionDescriptor
fn clone(&self) -> OptionDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptionDescriptor
impl Debug for OptionDescriptor
Source§impl<'de> Deserialize<'de> for OptionDescriptor
impl<'de> Deserialize<'de> for OptionDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OptionDescriptor
impl PartialEq for OptionDescriptor
Source§impl Serialize for OptionDescriptor
impl Serialize for OptionDescriptor
impl StructuralPartialEq for OptionDescriptor
Auto Trait Implementations§
impl Freeze for OptionDescriptor
impl RefUnwindSafe for OptionDescriptor
impl Send for OptionDescriptor
impl Sync for OptionDescriptor
impl Unpin for OptionDescriptor
impl UnsafeUnpin for OptionDescriptor
impl UnwindSafe for OptionDescriptor
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