pub struct RdOptionList<'a> { /* private fields */ }Expand description
A parsed, borrowed Rd option list and its non-fatal diagnostics.
Implementations§
Source§impl<'a> RdOptionList<'a>
impl<'a> RdOptionList<'a>
Sourcepub fn parse(nodes: &'a [RdNode], path: RdPath) -> Result<Self, RdOptionError>
pub fn parse(nodes: &'a [RdNode], path: RdPath) -> Result<Self, RdOptionError>
Parses plain string leaves as a comma-separated scalar option list.
R’s parse_Rd() represents a \\RdOpts body as a VERB leaf while
\\Sexpr’s Rd_option content is a TEXT leaf. Both are plain string
leaves, so both kinds are concatenated in source order without
normalization.
path is the path of the option-content container supplied by the
caller. A future \\Sexpr view passes base_path.with_option(); a
future \\RdOpts view passes its own tagged-node path whose children
are the option text. Pair positions are reported by pair_index, not
by adding path segments.
Sourcepub fn pairs(&self) -> &[RdOptionPair<'a>]
pub fn pairs(&self) -> &[RdOptionPair<'a>]
Returns all parsed pairs in source order.
Sourcepub fn diagnostics(&self) -> &[RdOptionError]
pub fn diagnostics(&self) -> &[RdOptionError]
Returns non-fatal diagnostics, in occurrence order.
Sourcepub fn typed(&self) -> RdSexprOptionOverrides
pub fn typed(&self) -> RdSexprOptionOverrides
Resolves valid typed values, using the last valid occurrence per key.
Trait Implementations§
Source§impl<'a> Clone for RdOptionList<'a>
impl<'a> Clone for RdOptionList<'a>
Source§fn clone(&self) -> RdOptionList<'a>
fn clone(&self) -> RdOptionList<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more