pub struct VariableV1 {
pub description: Option<String>,
pub required: bool,
pub default: Option<String>,
pub secret: bool,
}
Expand description
The name of the application variable.
Fields§
§description: Option<String>
A brief description of the variable.
Example: description = "This is a variable"
Learn more: https://spinframework.dev/variables#adding-variables-to-your-applications
required: bool
Whether a value must be supplied at runtime. If not specified, required defaults
to false
, and default
must be provided.
Example: required = true
Learn more: https://spinframework.dev/variables#adding-variables-to-your-applications
default: Option<String>
The value of the variable if no value is supplied at runtime. If specified,
the value must be a string. If not specified, required`` must be
true`.
Example: default = "default value"
Learn more: https://spinframework.dev/variables#adding-variables-to-your-applications
secret: bool
If set, this variable should be treated as sensitive.
Example: secret = true
Learn more: https://spinframework.dev/variables#adding-variables-to-your-applications
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Variable
impl<'de> Deserialize<'de> for Variable
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>,
Source§impl JsonSchema for Variable
impl JsonSchema for Variable
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more