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 as | Defined by | Note |
|---|---|---|
| if | ifHandler | Conditionally execute one of two branches, depending on the result of a test expression. Use as $(if {test} { true branch } { false branch }). |
| let | letHandler | Create and assign a variable. Does NOT interpolate during either definition or use. |
| var | varHandler | Create and assign a variable. DOES interpolate during both definition and use. |
| concat | concatHandler | Concatenate two or more values together into a string. Calls to_string method on values that are not string literals. |
| arithmetic | arithmeticHandler | You have to specify the type of the number eg i8, usize, f64 |
| naiveStringifier | naiveStringifierHandler | Return a string representation of a do-with-in! value. Per the name: may not cover all cases. |
| string_to_ident | string_to_identHandler | Turn a string into a named identifier, allowing dynamic identifier names. |
| logic | logicHandler | Sublanguage: nesting with parenthesis; logic ops ⌜&⌝, ⌜|⌝, ⌜^⌝, ⌜=⌝, unary ⌜!⌝, ⌜true⌝, ⌜false⌝; numeric comparisons with numbers ⌜>⌝, ⌜>=⌝, ⌜=⌝, ⌜<=⌝, ⌜<⌝, ⌜!=⌝ |
| mk | mkHandler | A simple way to define new handlers at the use site |
| quote | quote | In the lisp sense; renders the argument inert |
| unquote | unquote | In the lisp sense; renders the argument ert |
| run | run | Evaluate block of code in place. Useful for pass-through arguments when building handlers, or to evaluate an unquoted array. |
| array | arrayHandler | This 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. |
| import | importHandler | Basic 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. |
| withSigil | withSigilHandler | Redefine which sigil to use within the scope of the handler. Sigil can be one of $, %, #, or ~. |
| marker | markerHandler | Embed data in one invocation of do_with_in! in a way that can be used in other invocations. |
| runMarkers | runMarkersHandler | Load data into the environment from other invocations of do_with_in!. |