Function genericDefaultHandlers

Source
pub fn genericDefaultHandlers<'a, T: 'static + StartMarker + Clone>() -> Handlers<'a, T>
Expand description

This function generates the default handler set.

Currently, the actually useful handlers consist of:

Invoke asDefined byNote
ififHandlerConditionally execute one of two branches, depending on the result of a test expression. Use as $(if {test} { true branch } { false branch }).
letletHandlerCreate and assign a variable. Does NOT interpolate during either definition or use.
varvarHandlerCreate and assign a variable. DOES interpolate during both definition and use.
concatconcatHandlerConcatenate two or more values together into a string. Calls to_string method on values that are not string literals.
arithmeticarithmeticHandlerYou have to specify the type of the number eg i8, usize, f64
naiveStringifiernaiveStringifierHandlerReturn a string representation of a do-with-in! value. Per the name: may not cover all cases.
string_to_identstring_to_identHandlerTurn a string into a named identifier, allowing dynamic identifier names.
logiclogicHandlerSublanguage: nesting with parenthesis; logic ops ⌜&⌝, ⌜|⌝, ⌜^⌝, ⌜=⌝, unary ⌜!⌝, ⌜true⌝, ⌜false⌝; numeric comparisons with numbers ⌜>⌝, ⌜>=⌝, ⌜=⌝, ⌜<=⌝, ⌜<⌝, ⌜!=⌝
mkmkHandlerA simple way to define new handlers at the use site
quotequoteIn the lisp sense; renders the argument inert
unquoteunquoteIn the lisp sense; renders the argument ert
runrunEvaluate block of code in place. Useful for pass-through arguments when building handlers, or to evaluate an unquoted array.
arrayarrayHandlerThis handler has a bunch of subcommands and options; it is where most of the functionality for dealing with the representation we use of arrays is.
importimportHandlerBasic file inclusion. Path to file is defined by a series of quoted segments, relative path can be used if file: hint is set in front matter.
withSigilwithSigilHandlerRedefine which sigil to use within the scope of the handler. Sigil can be one of $, %, #, or ~.
markermarkerHandlerEmbed data in one invocation of do_with_in! in a way that can be used in other invocations.
runMarkersrunMarkersHandlerLoad data into the environment from other invocations of do_with_in!.