Trait texlang_stdlib::conditional::Condition
source · pub trait Condition<S: HasComponent<Component>> {
const DOC: Option<&'static str> = None;
// Required method
fn evaluate(input: &mut ExpansionInput<S>) -> Result<bool, Box<Error>>;
// Provided method
fn build_if_command() -> BuiltIn<S> { ... }
}
Expand description
Logical condition used to build if
conditional commands.
This trait can be used to build new conditional commands outside of this module.
To do this, just create a new type (generally a ZST)
and implement the evaluate
method of the trait for the type.
A conditional command that uses the condition can then be obtained
using the build_if_command
method.
Provided Associated Constants§
Required Methods§
Provided Methods§
sourcefn build_if_command() -> BuiltIn<S>
fn build_if_command() -> BuiltIn<S>
Build an if
conditional command that uses this condition.