pub struct FieldSpec {
pub name: String,
pub placement: &'static str,
pub width: u32,
pub legal: fn() -> Vec<String>,
pub control: ControlKind,
}Expand description
What a field is, without an instance of the panel to read it from.
Fields§
§name: StringThe field’s full registry path, e.g. center_panel.transpose.
placement: &'static str§width: u32Width of the field in bits.
legal: fn() -> Vec<String>Every value the field’s type accepts, rendered as set_field spells them. Empty for a field too wide to enumerate — see ENUMERABLE_BITS.
control: ControlKindWhich panel control this field is, from its type’s
CONTROL.
Implementations§
Source§impl FieldSpec
impl FieldSpec
Sourcepub fn morph_parent(&self) -> Option<String>
pub fn morph_parent(&self) -> Option<String>
The full path of the parameter this field morphs, for a ControlKind::Morph
that names one.
The kind carries the parent’s sibling name, since that is all the declaring body knows; the path is this field’s path with its last segment replaced, so a nested body’s prefix rides along.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldSpec
impl RefUnwindSafe for FieldSpec
impl Send for FieldSpec
impl Sync for FieldSpec
impl Unpin for FieldSpec
impl UnsafeUnpin for FieldSpec
impl UnwindSafe for FieldSpec
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