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§
Source§impl TemplateProperty
impl TemplateProperty
pub fn new<S>(name: S) -> Selfwhere
S: ToString,
pub fn with_prompt<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn readonly(self) -> Self
pub fn with_readonly(self, value: bool) -> Self
pub fn with_regex<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn required(self) -> Self
pub fn with_required(self, value: bool) -> Self
pub fn templated(self) -> Self
pub fn with_value<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_cols<S>(self, value: S) -> Self
pub fn with_max<S>(self, value: S) -> Self
pub fn with_max_length<S>(self, value: S) -> Self
pub fn with_min<S>(self, value: S) -> Self
pub fn with_min_length<S>(self, value: S) -> Self
pub fn with_options<O>(self, option: O) -> Selfwhere
O: Into<TemplateOptions>,
pub fn with_placeholder<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_rows<S>(self, value: S) -> Self
pub fn with_step<S>(self, value: S) -> Self
pub fn with_type<S>(self, value: S) -> Selfwhere
S: ToString,
Trait Implementations§
Source§impl Debug for TemplateProperty
impl Debug for TemplateProperty
Auto Trait Implementations§
impl Freeze for TemplateProperty
impl RefUnwindSafe for TemplateProperty
impl Send for TemplateProperty
impl Sync for TemplateProperty
impl Unpin for TemplateProperty
impl UnwindSafe for TemplateProperty
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