pub enum NodeValue {
Hole(Option<Identifier>),
Primitive(PrimitiveValue),
Array(NodeArray),
Map(NodeMap),
Tuple(NodeTuple),
}Variants§
Hole(Option<Identifier>)
A hole represents an uninitialized or placeholder value.
Optionally includes a label for identification (e.g., !todo, !wip).
Primitive(PrimitiveValue)
Array(NodeArray)
Map(NodeMap)
Tuple(NodeTuple)
Implementations§
Source§impl NodeValue
impl NodeValue
Sourcepub fn labeled_hole(label: Identifier) -> Self
pub fn labeled_hole(label: Identifier) -> Self
Creates a labeled hole.
pub fn empty_map() -> Self
pub fn empty_array() -> Self
pub fn empty_tuple() -> Self
pub fn value_kind(&self) -> Option<ValueKind>
Trait Implementations§
Source§impl From<PrimitiveValue> for NodeValue
impl From<PrimitiveValue> for NodeValue
Source§fn from(p: PrimitiveValue) -> Self
fn from(p: PrimitiveValue) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for NodeValue
Auto Trait Implementations§
impl Freeze for NodeValue
impl RefUnwindSafe for NodeValue
impl Send for NodeValue
impl Sync for NodeValue
impl Unpin for NodeValue
impl UnwindSafe for NodeValue
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