Struct spreadsheet_ods::validation::Validation
source · 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 copy 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
Auto Trait Implementations§
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