Enum tpnote_lib::config::AssertPrecondition
source · pub enum AssertPrecondition {
IsDefined,
IsNotEmptyString,
IsString,
IsNumber,
IsBool,
IsNotCompound,
IsValidSortTag,
IsTpnoteExtension,
NoOperation,
}Expand description
Describes a set of tests, that assert template variable tera:Value
properties.
Variants§
IsDefined
IsDefined: Assert that the variable is defined in the template.
IsNotEmptyString
IsNotEmptyString: In addition to IsString, the condition asserts,
that the string -or all substrings-) are not empty.
IsString
IsString: Assert, that if the variable is defined, its type -or all
subtypes- are Value::String.
IsNumber
IsNumber: Assert, that if the variable is defined, its type -or all
subtypes- are Value::Number.
IsBool
IsBool: Assert, that if the variable is defined, its type -or all
subtypes- are Value::Bool.
IsNotCompound
IsNotCompound: Assert, that if the variable is defined, its type is
not Value::Array or Value::Object.
IsValidSortTag
IsValidSortTag: Assert, that if the variable is defined, the value’s
string representation contains solely characters of the
filename.sort_tag.extra_chars set, digits or lowercase letters.
The number of lowercase letters in a row is limited by
tpnote_lib::config::FILENAME_SORT_TAG_LETTERS_IN_SUCCESSION_MAX.
IsTpnoteExtension
IsTpnoteExtension: Assert, that if the variable is defined,
the values string representation is registered in one of the
filename.extension_* configuration file variables.
NoOperation
NoOperation (default): A test that is always satisfied. For internal
use only.
Trait Implementations§
source§impl Clone for AssertPrecondition
impl Clone for AssertPrecondition
source§fn clone(&self) -> AssertPrecondition
fn clone(&self) -> AssertPrecondition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for AssertPrecondition
impl Debug for AssertPrecondition
source§impl Default for AssertPrecondition
impl Default for AssertPrecondition
source§fn default() -> AssertPrecondition
fn default() -> AssertPrecondition
source§impl<'de> Deserialize<'de> for AssertPrecondition
impl<'de> Deserialize<'de> for AssertPrecondition
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for AssertPrecondition
impl Hash for AssertPrecondition
source§impl PartialEq for AssertPrecondition
impl PartialEq for AssertPrecondition
source§fn eq(&self, other: &AssertPrecondition) -> bool
fn eq(&self, other: &AssertPrecondition) -> bool
self and other values to be equal, and is used
by ==.source§impl Serialize for AssertPrecondition
impl Serialize for AssertPrecondition
impl Copy for AssertPrecondition
impl Eq for AssertPrecondition
impl StructuralEq for AssertPrecondition
impl StructuralPartialEq for AssertPrecondition
Auto Trait Implementations§
impl RefUnwindSafe for AssertPrecondition
impl Send for AssertPrecondition
impl Sync for AssertPrecondition
impl Unpin for AssertPrecondition
impl UnwindSafe for AssertPrecondition
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.