pub enum FieldKind {
Color,
Bool,
Enum {
variants: Vec<&'static str>,
},
Number {
min: f64,
max: f64,
step: f64,
},
Range {
min: f64,
max: f64,
step: f64,
},
Scalar {
step: f64,
},
Text {
read_only: bool,
},
Vec3 {
step: f64,
},
Reference {
filter: Vec<String>,
multiple: bool,
},
Button {
label: String,
},
}Expand description
The kind of one settings field — the closed set of widget shapes the generic form renderer knows how to emit. Plain data, NO egui dependency: the schema lives in the engine, the renderer (brep-app / a later brep-ui) walks it.
Variants§
Color
An sRGB color (#rrggbb) → a color picker button.
Bool
A boolean toggle → a checkbox.
Enum
A closed choice → a combo box. variants are the JSON string values
(exactly what apply_json accepts / to_json emits).
Number
A bounded number → a slider / drag-value honoring min/max/step.
Range
A 0..1 (or otherwise fractional) number → a slider honoring the bounds.
Scalar
An UNBOUNDED number (feature params carry no min/max) → a drag value.
Text
A free-text string → a single-line text edit. read_only marks an
identity field (a feature id) that is shown but not editable here (a
rename must cascade to references — a later slice).
Vec3
A 3-vector (position / rotationEuler / scale) → three drag values.
Reference
A reference-selection field (solid / face / edge / … picked in the 3D
view). The schema-driven form renders a DISABLED placeholder here — the
real engine-native picker is the NEXT slice (#42). filter is the
selection filter (e.g. ["SOLID"]), multiple whether it takes a list.
Button
An ACTION button (schema "type":"button") → a clickable button. It binds
to no value; a click is surfaced to the caller by the field key (e.g.
editSketch), which the host acts on. label is the button caption.
Trait Implementations§
impl StructuralPartialEq for FieldKind
Auto Trait Implementations§
impl Freeze for FieldKind
impl RefUnwindSafe for FieldKind
impl Send for FieldKind
impl Sync for FieldKind
impl Unpin for FieldKind
impl UnsafeUnpin for FieldKind
impl UnwindSafe for FieldKind
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more