pub struct YamlBlockMapValue(/* private fields */);Expand description
The value side of a block-map entry: a scalar, a nested container, or empty.
Implementations§
Source§impl YamlBlockMapValue
impl YamlBlockMapValue
Sourcepub fn as_scalar(&self) -> Option<YamlScalar>
pub fn as_scalar(&self) -> Option<YamlScalar>
The value as a scalar, or None if it is a container or empty.
pub fn as_block_map(&self) -> Option<YamlBlockMap>
pub fn as_block_sequence(&self) -> Option<YamlBlockSequence>
pub fn as_flow_map(&self) -> Option<YamlFlowMap>
pub fn as_flow_sequence(&self) -> Option<YamlFlowSequence>
Sourcepub fn tag(&self) -> Option<SyntaxToken>
pub fn tag(&self) -> Option<SyntaxToken>
The explicit YAML_TAG token decorating this value (e.g. !expr),
if any. Used by the hashpipe formatter to preserve chunk-option tags.
Trait Implementations§
Source§impl AstNode for YamlBlockMapValue
impl AstNode for YamlBlockMapValue
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 YamlBlockMapValue
impl Clone for YamlBlockMapValue
Source§fn clone(&self) -> YamlBlockMapValue
fn clone(&self) -> YamlBlockMapValue
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 YamlBlockMapValue
impl Debug for YamlBlockMapValue
impl Eq for YamlBlockMapValue
Source§impl Hash for YamlBlockMapValue
impl Hash for YamlBlockMapValue
Source§impl PartialEq for YamlBlockMapValue
impl PartialEq for YamlBlockMapValue
Source§fn eq(&self, other: &YamlBlockMapValue) -> bool
fn eq(&self, other: &YamlBlockMapValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for YamlBlockMapValue
Auto Trait Implementations§
impl !RefUnwindSafe for YamlBlockMapValue
impl !Send for YamlBlockMapValue
impl !Sync for YamlBlockMapValue
impl !UnwindSafe for YamlBlockMapValue
impl Freeze for YamlBlockMapValue
impl Unpin for YamlBlockMapValue
impl UnsafeUnpin for YamlBlockMapValue
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