pub struct Heading(/* private fields */);Implementations§
Source§impl Heading
impl Heading
Sourcepub fn content(&self) -> Option<HeadingContent>
pub fn content(&self) -> Option<HeadingContent>
Returns the heading content node if present.
Sourcepub fn text_range(&self) -> TextRange
pub fn text_range(&self) -> TextRange
Returns the heading text range.
Sourcepub fn title_or(&self, placeholder: &str) -> String
pub fn title_or(&self, placeholder: &str) -> String
Returns heading text, or a placeholder when empty.
Sourcepub fn atx_marker_range(&self) -> Option<TextRange>
pub fn atx_marker_range(&self) -> Option<TextRange>
Returns the text range of the ATX marker token (e.g. ###), if this is an ATX heading.
Trait Implementations§
Source§impl AstNode for Heading
impl AstNode for Heading
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 Freeze for Heading
impl !RefUnwindSafe for Heading
impl !Send for Heading
impl !Sync for Heading
impl Unpin for Heading
impl UnsafeUnpin for Heading
impl !UnwindSafe for Heading
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