pub struct LabelDef {
pub name: SmolStr,
pub range: TextRange,
pub key_range: TextRange,
pub referenced: bool,
}Expand description
A \label{key} definition site.
Fields§
§name: SmolStr§range: TextRangeRange of the \label{key} command — the control word through its key
group — for diagnostics / go-to-def. Excludes any second group the
greedy parser may have over-attached (\label’s arity is unknown at parse
time; see builder::label_range).
key_range: TextRangeRange of just the key text inside the braces (sec:intro in
\label{sec:intro}), trimmed of surrounding whitespace. The precise span a
rename rewrites — narrower than range, which spans the whole
command.
referenced: boolSet by the resolve pass when any reference in this file uses name.
Per-file only — a label referenced solely from an \input-ed file looks
unreferenced here until the (deferred) cross-file resolver lands.
Trait Implementations§
impl Eq for LabelDef
impl StructuralPartialEq for LabelDef
Auto Trait Implementations§
impl Freeze for LabelDef
impl RefUnwindSafe for LabelDef
impl Send for LabelDef
impl Sync for LabelDef
impl Unpin for LabelDef
impl UnsafeUnpin for LabelDef
impl UnwindSafe for LabelDef
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