pub struct ParsedYamlRegion { /* private fields */ }Implementations§
Source§impl ParsedYamlRegion
impl ParsedYamlRegion
pub fn id(&self) -> &str
pub fn kind(&self) -> &YamlRegionKind
pub fn is_frontmatter(&self) -> bool
pub fn is_hashpipe(&self) -> bool
Sourcepub fn root(&self) -> Option<YamlAstRoot<'_>>
pub fn root(&self) -> Option<YamlAstRoot<'_>>
The embedded YAML document root, when the parser embedded a valid
subtree. The host content node carries YAML_DOCUMENT children directly,
which YamlAstRoot walks.
pub fn root_kind(&self) -> Option<YamlAstRootKind>
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Whether the region’s YAML is well-formed — i.e. the parser embedded a structured subtree rather than falling back to opaque tokens. This is the parser’s own verdict, so it cannot diverge from the syntax-error channel.
pub fn host_range(&self) -> Range<usize>
pub fn content_range(&self) -> Range<usize>
pub fn region_range(&self) -> Range<usize>
pub fn to_region(&self) -> YamlRegion
pub fn content(&self) -> &str
pub fn document_shape_summary(&self) -> Option<String>
pub fn to_snapshot(&self) -> ParsedYamlRegionSnapshot
Trait Implementations§
Source§impl Clone for ParsedYamlRegion
impl Clone for ParsedYamlRegion
Source§fn clone(&self) -> ParsedYamlRegion
fn clone(&self) -> ParsedYamlRegion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ParsedYamlRegion
impl !Send for ParsedYamlRegion
impl !Sync for ParsedYamlRegion
impl !UnwindSafe for ParsedYamlRegion
impl Freeze for ParsedYamlRegion
impl Unpin for ParsedYamlRegion
impl UnsafeUnpin for ParsedYamlRegion
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