pub struct FieldDef {
pub key: String,
pub field_type: FieldType,
pub label: String,
pub options: Vec<String>,
pub default_value: Option<Value>,
pub min: Option<f64>,
pub max: Option<f64>,
}Expand description
Definition of an inline field rendered inside a node.
Fields§
§key: StringKey used to read/write the field value in Job.metadata.
field_type: FieldTypeWhat kind of control to render.
label: StringDisplay label.
options: Vec<String>Available options (for Select fields).
default_value: Option<Value>Default value (serialized as JSON).
min: Option<f64>Minimum value (for Slider fields).
max: Option<f64>Maximum value (for Slider fields).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FieldDef
impl<'de> Deserialize<'de> for FieldDef
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
Auto Trait Implementations§
impl Freeze for FieldDef
impl RefUnwindSafe for FieldDef
impl Send for FieldDef
impl Sync for FieldDef
impl Unpin for FieldDef
impl UnsafeUnpin for FieldDef
impl UnwindSafe for FieldDef
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