pub struct ValueDef {
pub name: String,
pub pattern: String,
pub options: ValueOptions,
/* private fields */
}Expand description
A Value definition from the template header.
Fields§
§name: StringName of the value (used as column header).
pattern: StringOriginal regex pattern from template.
options: ValueOptionsOptions applied to this value.
Implementations§
Source§impl ValueDef
impl ValueDef
Sourcepub const MAX_NAME_LEN: usize = 48
pub const MAX_NAME_LEN: usize = 48
Maximum allowed length for a value name.
Sourcepub fn parse(line: &str, line_num: usize) -> Result<Self, TemplateError>
pub fn parse(line: &str, line_num: usize) -> Result<Self, TemplateError>
Parse a Value line: Value [Options] Name (regex)
Sourcepub fn has_option(&self, opt: ValueOption) -> bool
pub fn has_option(&self, opt: ValueOption) -> bool
Check if this value has a specific option.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ValueDef
impl RefUnwindSafe for ValueDef
impl Send for ValueDef
impl Sync for ValueDef
impl Unpin for ValueDef
impl UnwindSafe for ValueDef
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