Function runMarkersHandler

Source
pub fn runMarkersHandler<T: StartMarker + Clone>(
    c: Configuration<T>,
    v: Variables<'_, T>,
    data: Option<TokenStream>,
    t: TokenStream,
) -> Result<(Variables<'_, T>, TokenStream), (Variables<'_, T>, TokenStream)>
Expand description

Loads data into the environment from other invocations of do_with_in!.

Call as $(runMarkers $path) to run all markers in the file at $path. To run a specific named marker, call $(runMarkers $path => "name of marker to run").

If $path is empty, it will try to point to the current file (there are limitations here until some RFCs land).

See markerHandler for details on creating named and unnamed markers.

Markers evaluate to nothing when run normally; the markers’ embedded code is run, and the environment is captured, when run via runMarkers. This gives you a way to (for example) set variables or define new handlers in one part of your source file, and use them in other invocations of do_with_in! within the same source file.