pub enum Node<'input> {
String(&'input str),
Object {
len: usize,
count: usize,
},
Array {
len: usize,
count: usize,
},
Static(StaticNode),
}
Expand description
Tape Node
Variants§
String(&'input str)
A string, located inside the input slice
Object
An Object
with the given size
starts here.
the following values are keys and values, alternating
however values can be nested and have a length themselves.
Fields
Array
An array with a given size starts here. The next size
elements belong to it - values can be nested and have a
size
of their own.
Fields
Static(StaticNode)
A static value that is interned into the tape, it can be directly taken and isn’t nested.
Implementations§
Trait Implementations§
impl<'input> Copy for Node<'input>
impl<'input> StructuralPartialEq for Node<'input>
Auto Trait Implementations§
impl<'input> Freeze for Node<'input>
impl<'input> RefUnwindSafe for Node<'input>
impl<'input> Send for Node<'input>
impl<'input> Sync for Node<'input>
impl<'input> Unpin for Node<'input>
impl<'input> UnwindSafe for Node<'input>
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