pub struct HookStore { /* private fields */ }Expand description
The slots lthooks keeps a hook’s code in, named once (a hook read at every \selectfont keeps its own).
Implementations§
Source§impl HookStore
impl HookStore
pub fn new(hook: &str) -> Self
Sourcepub fn from_tokens(prop: Token, toplevel: Token, next: Token) -> Self
pub fn from_tokens(prop: Token, toplevel: Token, next: Token) -> Self
Build from already-pinned literal tokens (e.g. T_CS!("...")), safe
across arena::reset() because pin! re-interns automatically.
Sourcepub fn has_code(&self) -> bool
pub fn has_code(&self) -> bool
lthooks’ \hook_if_empty:nTF (latex.ltx:6436-6448) read from its storage, no expansion: the labelled code
(\g__hook_<hook>_code_prop not \c_empty_prop), the document’s (\__hook_toplevel <hook>) and the next-use
code (\__hook_next <hook>) — a slot holds code when it is a macro with a non-empty body
(\__hook_cs_if_empty:c, :5688).
Auto Trait Implementations§
impl Freeze for HookStore
impl RefUnwindSafe for HookStore
impl Send for HookStore
impl Sync for HookStore
impl Unpin for HookStore
impl UnsafeUnpin for HookStore
impl UnwindSafe for HookStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more