pub struct RoxygenTag(/* private fields */);Implementations§
Source§impl RoxygenTag
impl RoxygenTag
Sourcepub fn at(&self) -> Option<SyntaxToken<RLanguage>>
pub fn at(&self) -> Option<SyntaxToken<RLanguage>>
The @ token.
Sourcepub fn name(&self) -> Option<SmolStr>
pub fn name(&self) -> Option<SmolStr>
The tag name (e.g. param, examples), without the leading @.
Sourcepub fn arg(&self) -> Option<SyntaxToken<RLanguage>>
pub fn arg(&self) -> Option<SyntaxToken<RLanguage>>
The name argument for arg-bearing tags (e.g. x in @param x ...).
Sourcepub fn text(&self) -> Option<SyntaxToken<RLanguage>>
pub fn text(&self) -> Option<SyntaxToken<RLanguage>>
The remaining prose content of the tag, if any.
Sourcepub fn value_text(&self) -> Option<String>
pub fn value_text(&self) -> Option<String>
The tag’s whole same-line value, with the roxygen markers dropped and
the ends trimmed: every token after the tag head (@name, plus the arg
token for an arg-bearing tag), joined.
RoxygenTag::text returns the first ROXYGEN_TEXT leaf alone,
which under @md is only part of the value: an intraword _ or * is
carved as an unresolved ROXYGEN_MD_DELIM, so @rdname missing_arg is
three leaves. Reach for this whenever the value is a name rather than
prose (@name, @rdname, @describeIn) — those tags never fold
continuation lines, so their node spans exactly one line.
Sourcepub fn is_examples(&self) -> bool
pub fn is_examples(&self) -> bool
Whether this is an @examples/@examplesIf tag (embedded R code).
Trait Implementations§
Source§impl AstNode for RoxygenTag
impl AstNode for RoxygenTag
Source§impl Clone for RoxygenTag
impl Clone for RoxygenTag
Source§fn clone(&self) -> RoxygenTag
fn clone(&self) -> RoxygenTag
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more