pub struct ReferenceDefinition(/* private fields */);Implementations§
Source§impl ReferenceDefinition
impl ReferenceDefinition
Sourcepub fn url(&self) -> Option<String>
pub fn url(&self) -> Option<String>
Extracts the destination URL, with <…> angle brackets stripped.
Reads the structured REFERENCE_URL node emitted by the parser rather
than re-parsing the post-] tail.
Sourcepub fn title(&self) -> Option<String>
pub fn title(&self) -> Option<String>
Extracts the title with its surrounding "/'/() delimiters stripped,
or None when the definition has no title.
Reads the structured REFERENCE_TITLE node.
Sourcepub fn destination(&self) -> Option<String>
pub fn destination(&self) -> Option<String>
Raw destination text, including any <…> angle brackets (but no
trailing title). Retained for back-compat with consumers that strip
brackets / whitespace themselves (LSP document links, hover); prefer
url for the angle-stripped destination.
Sourcepub fn label_value_range(&self) -> Option<TextRange>
pub fn label_value_range(&self) -> Option<TextRange>
Returns the text range for the definition label value.
Trait Implementations§
Source§impl AstNode for ReferenceDefinition
impl AstNode for ReferenceDefinition
type Language = PanacheLanguage
fn can_cast(kind: SyntaxKind) -> bool
fn cast(syntax: SyntaxNode) -> Option<Self>
fn syntax(&self) -> &SyntaxNode
fn clone_for_update(&self) -> Selfwhere
Self: Sized,
fn clone_subtree(&self) -> Selfwhere
Self: Sized,
Auto Trait Implementations§
impl !RefUnwindSafe for ReferenceDefinition
impl !Send for ReferenceDefinition
impl !Sync for ReferenceDefinition
impl !UnwindSafe for ReferenceDefinition
impl Freeze for ReferenceDefinition
impl Unpin for ReferenceDefinition
impl UnsafeUnpin for ReferenceDefinition
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