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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more