pub struct MystDirective(/* private fields */);Expand description
A MyST directive (```{name} or, with colon_fence, :::{name}).
Implementations§
Source§impl MystDirective
impl MystDirective
Sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
Returns the bare directive name (braces stripped): {note} -> note.
Sourcepub fn argument(&self) -> Option<String>
pub fn argument(&self) -> Option<String>
Returns the trimmed argument following the name on the opener line, if
any (e.g. ```{code-block} python -> python).
Sourcepub fn options(&self) -> Vec<MystDirectiveOption>
pub fn options(&self) -> Vec<MystDirectiveOption>
Returns the directive’s leading :key: value option lines.
Trait Implementations§
Source§impl AstNode for MystDirective
impl AstNode for MystDirective
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 MystDirective
impl !Send for MystDirective
impl !Sync for MystDirective
impl !UnwindSafe for MystDirective
impl Freeze for MystDirective
impl Unpin for MystDirective
impl UnsafeUnpin for MystDirective
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