pub struct StandInLoadGuard { /* private fields */ }Expand description
RAII guard: while a binding that stands in for an author’s file loads (binding::content::input_definitions),
every name assigned is recorded as that binding’s (state::State::stand_in_meanings), whatever made it — its
DefMacro!s, its Let!s and RawTeX, the bindings it requires — so the paper’s copy read after it only provides
them (state::note_copy_provides_assignment). The names its own code assigns, not a file it loads
(StandInLoadGuard::suspend: OmniBus, natbib, a nested stand-in’s own), are also its command set
(state::State::stand_in_last_load), which the copy must define to be the file the binding stands in for
(binding::content copy_is_the_stood_in_file).
Implementations§
Source§impl StandInLoadGuard
impl StandInLoadGuard
Sourcepub fn new() -> Self
pub fn new() -> Self
A stand-in binding the code running now requests (binding::content::input’s .tex route): it joins the command
set of a stand-in binding loading it when that is the binding’s own code.
Sourcepub fn loaded_by(from_own_code: bool) -> Self
pub fn loaded_by(from_own_code: bool) -> Self
A stand-in binding loads, requested by a stand-in binding’s own code when from_own_code
(binding::content::input_definitions, stand_in_loader_own_code): its names join that binding’s command set
at its end (state::end_stand_in_load) — the diagrams binding’s diagrams.tex (hep-ph9609379) —, and not when a
file the outer binding loads requested it: OmniBus’s RequirePackage!("aas_macros") (omnibus_cls.rs:71) under
asme2ej (2309.12017), nature-pre (2102.01782, 2111.09589), cimart (2412.00032).
Sourcepub fn suspend() -> Self
pub fn suspend() -> Self
A file a stand-in binding loads (binding::content::input_definitions): its names are the binding’s to own, but
not the binding’s command set, until the guard drops.
Sourcepub fn suspend_for(class: bool) -> Self
pub fn suspend_for(class: bool) -> Self
StandInLoadGuard::suspend for a file that is a class (class, a .cls) or not: a class the binding’s own
code loads is its base class (stand_in_base_class), and so is every class that class loads; a package any of
them loads is not (the bindings a binding requires stay its own).