pub struct ColorDef {
pub name: SmolStr,
pub kind: ColorDefKind,
pub range: TextRange,
pub key_range: TextRange,
}Expand description
A color-name definition site (\definecolor{name}{model}{spec},
\colorlet{name}{base}, …). The definition-side analog of LabelDef,
collected so color-name completion can offer document-defined colors
alongside the built-in list; the reference side (\textcolor{name}{…}) is
classified directly off the CST by completion and carries no stored record.
Fields§
§name: SmolStrThe color name, as authored (the first {…} group).
kind: ColorDefKind§range: TextRangeRange of the command through its name group (like LabelDef::range) —
the navigation target for a future go-to-definition.
key_range: TextRangeRange of just the trimmed name text inside the braces — the precise span a future rename would rewrite.
Trait Implementations§
impl Eq for ColorDef
impl StructuralPartialEq for ColorDef
Auto Trait Implementations§
impl Freeze for ColorDef
impl RefUnwindSafe for ColorDef
impl Send for ColorDef
impl Sync for ColorDef
impl Unpin for ColorDef
impl UnsafeUnpin for ColorDef
impl UnwindSafe for ColorDef
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