Enum tpnote_lib::config::AssertPrecondition
source · pub enum AssertPrecondition {
IsDefined,
IsNotEmptyString,
IsString,
IsNumber,
IsBool,
IsNotCompound,
HasOnlySortTagChars,
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 addtion 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.
HasOnlySortTagChars
HasOnlySortTagChars: Assert, that if the variable is defined,
the values string representation contains solely characters of the
filename.sort_tag_chars set.
IsTpnoteExtension
IsTpnoteExtension: Assert, that if the variable is defined,
the values string representation is regeistered in one of the
filename.extension_* configuraion 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 FromStr for AssertPrecondition
impl FromStr for AssertPrecondition
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.