pub struct YamlDocument(/* private fields */);Expand description
A single YAML document inside the stream.
Implementations§
Source§impl YamlDocument
impl YamlDocument
pub fn block_map(&self) -> Option<YamlBlockMap>
pub fn block_sequence(&self) -> Option<YamlBlockSequence>
pub fn flow_map(&self) -> Option<YamlFlowMap>
pub fn flow_sequence(&self) -> Option<YamlFlowSequence>
Sourcepub fn scalar(&self) -> Option<YamlScalar>
pub fn scalar(&self) -> Option<YamlScalar>
A top-level bare scalar document ("just a string").
pub fn as_node(&self) -> Option<YamlNode>
Trait Implementations§
Source§impl AstNode for YamlDocument
impl AstNode for YamlDocument
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,
Source§impl Clone for YamlDocument
impl Clone for YamlDocument
Source§fn clone(&self) -> YamlDocument
fn clone(&self) -> YamlDocument
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 moreSource§impl Debug for YamlDocument
impl Debug for YamlDocument
impl Eq for YamlDocument
Source§impl Hash for YamlDocument
impl Hash for YamlDocument
Source§impl PartialEq for YamlDocument
impl PartialEq for YamlDocument
Source§fn eq(&self, other: &YamlDocument) -> bool
fn eq(&self, other: &YamlDocument) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for YamlDocument
Auto Trait Implementations§
impl !RefUnwindSafe for YamlDocument
impl !Send for YamlDocument
impl !Sync for YamlDocument
impl !UnwindSafe for YamlDocument
impl Freeze for YamlDocument
impl Unpin for YamlDocument
impl UnsafeUnpin for YamlDocument
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