pub struct OptionField {
pub name: String,
pub ty: OptionType,
pub description: String,
pub required: bool,
pub default: Option<Value>,
pub choices: Vec<String>,
pub min: Option<f64>,
pub max: Option<f64>,
}Expand description
One option a plugin takes.
Fields§
§name: String§ty: OptionType§description: String§required: bool§default: Option<Value>§choices: Vec<String>The only values a string option may take.
min: Option<f64>Bounds for integer and number, inclusive.
max: Option<f64>Implementations§
Trait Implementations§
Source§impl Clone for OptionField
impl Clone for OptionField
Source§impl Debug for OptionField
impl Debug for OptionField
Source§impl<'de> Deserialize<'de> for OptionField
impl<'de> Deserialize<'de> for OptionField
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 JsonSchema for OptionField
impl JsonSchema for OptionField
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for OptionField
impl PartialEq for OptionField
Source§impl Serialize for OptionField
impl Serialize for OptionField
impl StructuralPartialEq for OptionField
Auto Trait Implementations§
impl Freeze for OptionField
impl RefUnwindSafe for OptionField
impl Send for OptionField
impl Sync for OptionField
impl Unpin for OptionField
impl UnsafeUnpin for OptionField
impl UnwindSafe for OptionField
Blanket Implementations§
impl<T> Allocation for T
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