pub struct Validation { /* private fields */ }
Expand description
Cell content validations.
This defines a validity constraint via the contained condition. It can be applied to a cell by setting the validation name.
Implementations§
Source§impl Validation
impl Validation
Sourcepub fn validation_ref(&self) -> ValidationRef
pub fn validation_ref(&self) -> ValidationRef
Creates a reference struct for this one.
Sourcepub fn set_condition(&mut self, cond: Condition)
pub fn set_condition(&mut self, cond: Condition)
Sets the condition that is checked for new values.
Sourcepub fn set_base_cell(&mut self, base: CellRef)
pub fn set_base_cell(&mut self, base: CellRef)
Base-cell for the validation. Relative CellReferences in the condition are relative to this cell. They are moved with the actual cell this condition is applied to.
Sourcepub fn set_allow_empty(&mut self, allow: bool)
pub fn set_allow_empty(&mut self, allow: bool)
Empty ok?
Sourcepub fn allow_empty(&self) -> bool
pub fn allow_empty(&self) -> bool
Empty ok?
Sourcepub fn set_display(&mut self, display: ValidationDisplay)
pub fn set_display(&mut self, display: ValidationDisplay)
Display list of choices.
Sourcepub fn display(&self) -> ValidationDisplay
pub fn display(&self) -> ValidationDisplay
Display list of choices.
Sourcepub fn set_err(&mut self, err: Option<ValidationError>)
pub fn set_err(&mut self, err: Option<ValidationError>)
Error message.
Sourcepub fn err(&self) -> Option<&ValidationError>
pub fn err(&self) -> Option<&ValidationError>
Error message.
Sourcepub fn set_help(&mut self, help: Option<ValidationHelp>)
pub fn set_help(&mut self, help: Option<ValidationHelp>)
Help message.
Sourcepub fn help(&self) -> Option<&ValidationHelp>
pub fn help(&self) -> Option<&ValidationHelp>
Help message.
Trait Implementations§
Source§impl Clone for Validation
impl Clone for Validation
Source§fn clone(&self) -> Validation
fn clone(&self) -> Validation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Validation
impl Debug for Validation
Source§impl Default for Validation
impl Default for Validation
Source§fn default() -> Validation
fn default() -> Validation
Returns the “default value” for a type. Read more
Source§impl GetSize for Validation
impl GetSize for Validation
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
Determines how many bytes this object occupies inside the heap while using a
tracker
. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker
. Read moreAuto Trait Implementations§
impl Freeze for Validation
impl RefUnwindSafe for Validation
impl Send for Validation
impl Sync for Validation
impl Unpin for Validation
impl UnwindSafe for Validation
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