pub enum Condition {
Show 23 variants
OneOfList(Vec<String>),
OneOfRange(String),
NumberBetween(f64, f64),
NumberNotBetween(f64, f64),
NumberGreater(f64),
NumberGreaterEq(f64),
NumberLess(f64),
NumberLessEq(f64),
NumberEq(f64),
NumberNotEq(f64),
TextContains(String),
TextNotContains(String),
TextStartsWith(String),
TextEndsWith(String),
TextEq(String),
DateAfter(DateValue),
DateBefore(DateValue),
DateOn(DateValue),
DateBetween(String, String),
Blank,
NotBlank,
Checkbox,
CustomFormula(String),
}Expand description
The condition shapes set-data-validation builds.
Each variant carries exactly what its condition needs; there is no “raw
condition type + values” escape hatch, following the same
no-passthrough discipline as format.rs::CellFormatFlags.
Variants§
OneOfList(Vec<String>)
A dropdown restricted to these exact values.
OneOfRange(String)
A dropdown sourced from a range of cells.
NumberBetween(f64, f64)
A number in [min, max] inclusive.
NumberNotBetween(f64, f64)
A number outside [min, max].
NumberGreater(f64)
A number strictly greater than this.
NumberGreaterEq(f64)
A number greater than or equal to this.
NumberLess(f64)
A number strictly less than this.
NumberLessEq(f64)
A number less than or equal to this.
NumberEq(f64)
A number equal to this.
NumberNotEq(f64)
A number not equal to this.
TextContains(String)
Text containing this substring.
TextNotContains(String)
Text not containing this substring.
TextStartsWith(String)
Text starting with this substring.
TextEndsWith(String)
Text ending with this substring.
TextEq(String)
Text equal to this.
DateAfter(DateValue)
A date after this one.
DateBefore(DateValue)
A date before this one.
DateOn(DateValue)
A date equal to this one.
DateBetween(String, String)
A date in [start, end] inclusive (absolute dates only).
Blank
The cell must be empty.
NotBlank
The cell must not be empty.
Checkbox
TRUE/FALSE only.
CustomFormula(String)
A custom formula that must evaluate truthy.
Trait Implementations§
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more