pub struct LinkText(/* private fields */);Implementations§
Source§impl LinkText
impl LinkText
Sourcepub fn text_content(&self) -> String
pub fn text_content(&self) -> String
Returns the text content.
Sourcepub fn raw_label(&self) -> String
pub fn raw_label(&self) -> String
Returns the raw source text of the label (every byte between the brackets), used for CommonMark reference-label matching.
Unlike text_content, which collects only TEXT
tokens and therefore drops inline markup, this preserves the label
verbatim. That matters for shortcut/collapsed reference links whose
label parses as inline structure (e.g. a code span [`insta`]):
the reference definition stores its label as raw text, and the parser’s
refdef map matches on raw text, so usage-side label extraction must do
the same or the labels won’t compare equal.
Trait Implementations§
Source§impl AstNode for LinkText
impl AstNode for LinkText
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 LinkText
impl !Send for LinkText
impl !Sync for LinkText
impl !UnwindSafe for LinkText
impl Freeze for LinkText
impl Unpin for LinkText
impl UnsafeUnpin for LinkText
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