pub struct CitationRef {
pub name: SmolStr,
pub command: SmolStr,
pub range: TextRange,
pub key_range: TextRange,
}Expand description
A citation use site — one per key. A \cite{a,b} produces two
CitationRefs. Citations are always cross-file: cite keys live in .bib
files, so there is no in-file resolution (no resolved flag); the
undefined-citation lint resolves them against the project’s bibliography via
project::citations::ResolvedCitations (in the badness crate).
Fields§
§name: SmolStrThe cite key, as authored.
command: SmolStrThe citation command that introduced it, sans backslash (cite,
parencite, nocite, …) — informational, for diagnostics.
range: TextRangeRange of the enclosing command (shared by keys split from one \cite{a,b},
like LabelRef::range).
key_range: TextRangeRange of just this key inside the braces (b in \cite{a,b}), trimmed of
surrounding whitespace — the precise span a rename rewrites.
Trait Implementations§
Source§impl Clone for CitationRef
impl Clone for CitationRef
Source§fn clone(&self) -> CitationRef
fn clone(&self) -> CitationRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CitationRef
impl Debug for CitationRef
impl Eq for CitationRef
Source§impl PartialEq for CitationRef
impl PartialEq for CitationRef
impl StructuralPartialEq for CitationRef
Auto Trait Implementations§
impl Freeze for CitationRef
impl RefUnwindSafe for CitationRef
impl Send for CitationRef
impl Sync for CitationRef
impl Unpin for CitationRef
impl UnsafeUnpin for CitationRef
impl UnwindSafe for CitationRef
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