pub struct TemplateVariable { /* private fields */ }Expand description
One variable of a template’s declared set, merged down its chain.
Built only by loading a template, so items is present exactly when type is list,
a default is a value of the variable’s type, and required is never true beside one.
Implementations§
Source§impl TemplateVariable
impl TemplateVariable
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
What the variable is for.
Sourcepub fn kind(&self) -> VariableType
pub fn kind(&self) -> VariableType
What the variable holds.
Sourcepub fn declared_in(&self) -> &str
pub fn declared_in(&self) -> &str
The chain file whose declaration this is.
Sourcepub fn multi_line(&self) -> bool
pub fn multi_line(&self) -> bool
Whether a value of this variable is written over several lines: text, list and
object.
Trait Implementations§
Source§impl Clone for TemplateVariable
impl Clone for TemplateVariable
Source§impl Debug for TemplateVariable
impl Debug for TemplateVariable
Source§impl JsonSchema for TemplateVariable
impl JsonSchema for TemplateVariable
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 TemplateVariable
impl PartialEq for TemplateVariable
Source§impl Serialize for TemplateVariable
impl Serialize for TemplateVariable
impl StructuralPartialEq for TemplateVariable
Auto Trait Implementations§
impl Freeze for TemplateVariable
impl RefUnwindSafe for TemplateVariable
impl Send for TemplateVariable
impl Sync for TemplateVariable
impl Unpin for TemplateVariable
impl UnsafeUnpin for TemplateVariable
impl UnwindSafe for TemplateVariable
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