pub struct MappingItem<'a> {
pub span: Span,
pub key: Option<MappingKey<'a>>,
pub value: Option<MappingValue<'a>>,
}Expand description
One key: value pair in a block or flow mapping.
Fields§
§span: Span§key: Option<MappingKey<'a>>None when the source has neither a ? indicator nor key content (: value).
value: Option<MappingValue<'a>>None when the source has no : (? key alone, or a lone key in a flow mapping).
Implementations§
Source§impl<'a> MappingItem<'a>
impl<'a> MappingItem<'a>
Sourcepub fn key_content(&self) -> Option<&Node<'a>>
pub fn key_content(&self) -> Option<&Node<'a>>
The key’s content node, when both the key and its content exist.
Sourcepub fn value_content(&self) -> Option<&Node<'a>>
pub fn value_content(&self) -> Option<&Node<'a>>
The value’s content node, when both the value and its content exist.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MappingItem<'a>
impl<'a> !Send for MappingItem<'a>
impl<'a> !Sync for MappingItem<'a>
impl<'a> !UnwindSafe for MappingItem<'a>
impl<'a> Freeze for MappingItem<'a>
impl<'a> Unpin for MappingItem<'a>
impl<'a> UnsafeUnpin for MappingItem<'a>
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