pub struct Tag { /* private fields */ }Implementations§
Source§impl Tag
impl Tag
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
The tag’s own text: the leading # sigil dropped, surrounding
source whitespace trimmed, and a recognized inline escape’s
backslash stripped (§8d.6, issue #2045) — parity with
markup::escape’s stripping in ordinary content. tag()’s raw
free-text scan (parser::content::tag) never builds an ESCAPE
sub-node the way the shared content engine does, so there is no
node-level place to skip the backslash the way push_escape does
downstream; this accessor is that place instead — the single
materialization point every consumer of “the tag’s text” should go
through, mirroring SceneTitle::text/CueName::text.
Trait Implementations§
Source§impl AstNode for Tag
impl AstNode for Tag
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true for a node with a SyntaxKind this type can wrap.Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
Try to cast a generic
SyntaxNode into this typed wrapper.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
Access the underlying
SyntaxNode.impl Eq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl !RefUnwindSafe for Tag
impl !Send for Tag
impl !Sync for Tag
impl !UnwindSafe for Tag
impl Freeze for Tag
impl Unpin for Tag
impl UnsafeUnpin for Tag
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