pub struct Node {
pub value: Value,
pub meta: Meta,
}Expand description
A value plus its Meta.
Fields§
§value: Value§meta: MetaImplementations§
Source§impl Node
impl Node
Sourcepub fn at_position(self, position: Option<Position>) -> Self
pub fn at_position(self, position: Option<Position>) -> Self
Builder: set the source position.
Sourcepub fn is_container(&self) -> bool
pub fn is_container(&self) -> bool
Whether this is a sequence or a map.
Sourcepub fn type_name(&self) -> &'static str
pub fn type_name(&self) -> &'static str
A short type name: null, bool, int, float, str, datetime,
seq or map.
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
The value as JSON. Non-finite floats become null and date-times
strings; metadata is dropped.
Trait Implementations§
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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