pub struct Definition {
pub kind: VariableType,
pub default: Option<Value>,
pub allowed: Option<Vec<Value>>,
pub description: Option<String>,
pub required: bool,
pub pattern: Option<String>,
pub max_length: Option<u32>,
}Fields§
§kind: VariableTypeThe value’s type. Dates are real calendar dates in YYYY-MM-DD form.
default: Option<Value>Used when no project, folder, report, Set, schedule or CLI value supplies this variable.
allowed: Option<Vec<Value>>Optional exact values accepted for this variable; required for the enum type.
description: Option<String>What this input means, including its units or reporting period.
required: boolWhether execution requires a value. A default satisfies this requirement.
pattern: Option<String>For string variables: a regular expression the whole value must match, e.g.
^[A-Z]{3}[0-9]{4}$ for a customer code. Anchors are implied.
max_length: Option<u32>For string variables: the most characters a value may have.
Implementations§
Trait Implementations§
Source§impl Clone for Definition
impl Clone for Definition
Source§impl Debug for Definition
impl Debug for Definition
Source§impl<'de> Deserialize<'de> for Definition
impl<'de> Deserialize<'de> for Definition
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 Definition
impl JsonSchema for Definition
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 moreAuto Trait Implementations§
impl Freeze for Definition
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnsafeUnpin for Definition
impl UnwindSafe for Definition
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