pub struct ParameterDef {Show 17 fields
pub name: String,
pub label: String,
pub description: String,
pub param_type: ParameterType,
pub default: Option<Value>,
pub constraints: Option<Constraints>,
pub placeholder: Option<String>,
pub visible_when: Option<ParamCondition>,
pub required_when: Option<ParamCondition>,
pub surfaceable: bool,
pub run_option: bool,
pub group: Option<String>,
pub suffix: Option<String>,
pub control: Option<String>,
pub accept: Option<Vec<String>>,
pub presets: Option<Vec<PresetEntry>>,
pub inverted: Option<bool>,
}Expand description
A complete definition of one parameter a node accepts. Provides everything the engine (validation) and UI (control rendering) need.
Fields§
§name: String§label: String§description: String§param_type: ParameterTypeValue type — determines what UI control to render.
default: Option<Value>§constraints: Option<Constraints>§placeholder: Option<String>§visible_when: Option<ParamCondition>§required_when: Option<ParamCondition>§surfaceable: boolWhether this param can be surfaced in container config panels.
run_option: boolWhether someone running a recipe sets this param: the run screen
shows it when the recipe declares no fields. False for params that
are the program itself (a shell command and its args), which only the
author sets; authoring surfaces go by surfaceable. Native-only: no
browser node needs it, so it stays out of the catalog.
group: Option<String>§suffix: Option<String>§control: Option<String>Override control identifier (e.g., "slider", "select", "file").
accept: Option<Vec<String>>§presets: Option<Vec<PresetEntry>>§inverted: Option<bool>Flip the semantic of a boolean control.
Trait Implementations§
Source§impl Clone for ParameterDef
impl Clone for ParameterDef
Source§impl Debug for ParameterDef
impl Debug for ParameterDef
Source§impl Default for ParameterDef
impl Default for ParameterDef
Source§impl PartialEq for ParameterDef
impl PartialEq for ParameterDef
Source§impl Serialize for ParameterDef
impl Serialize for ParameterDef
impl StructuralPartialEq for ParameterDef
Auto Trait Implementations§
impl Freeze for ParameterDef
impl RefUnwindSafe for ParameterDef
impl Send for ParameterDef
impl Sync for ParameterDef
impl Unpin for ParameterDef
impl UnsafeUnpin for ParameterDef
impl UnwindSafe for ParameterDef
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