pub struct TemplateProperty {
Show 17 fields pub name: String, pub prompt: Option<String>, pub readonly: bool, pub regex: Option<String>, pub required: bool, pub templated: bool, pub value: Option<String>, pub cols: Option<u32>, pub max: Option<u32>, pub max_length: Option<u32>, pub min: Option<u32>, pub min_length: Option<u32>, pub options: Option<TemplateOptions>, pub placeholder: Option<String>, pub rows: Option<u32>, pub step: Option<u32>, pub type: Option<String>,
}
Expand description

Representation of a single Property in a HAL-FORMS Template.

Fields§

§name: String§prompt: Option<String>§readonly: bool§regex: Option<String>§required: bool§templated: bool§value: Option<String>§cols: Option<u32>§max: Option<u32>§max_length: Option<u32>§min: Option<u32>§min_length: Option<u32>§options: Option<TemplateOptions>§placeholder: Option<String>§rows: Option<u32>§step: Option<u32>§type: Option<String>

Implementations§

Examples found in repository?
src/hal/property.rs (line 98)
97
98
99
    pub fn readonly(self) -> Self {
        self.with_readonly(true)
    }
Examples found in repository?
src/hal/property.rs (line 120)
119
120
121
    pub fn required(self) -> Self {
        self.with_required(true)
    }

Trait Implementations§

Formats the value using the given formatter. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.