pub enum TapeElement {
}Expand description
We decode JSON to a flattened tape representation, allowing for efficient traversal of the JSON data
This approach is inspired by simdjson
Uses u32 for offsets to ensure TapeElement is 64-bits. A future
iteration may increase this to a custom u56 type.
Variants§
StartObject(u32)
The start of an object, i.e. {
Contains the offset of the corresponding Self::EndObject
EndObject(u32)
The end of an object, i.e. }
Contains the offset of the corresponding Self::StartObject
StartList(u32)
The start of a list , i.e. [
Contains the offset of the corresponding Self::EndList
EndList(u32)
The end of a list , i.e. ]
Contains the offset of the corresponding Self::StartList
String(u32)
A string value
Contains the offset into the Tape string data
Number(u32)
A numeric value
Contains the offset into the Tape string data
I64(i32)
The high bits of a i64
Followed by Self::I32 containing the low bits
I32(i32)
A 32-bit signed integer
May be preceded by Self::I64 containing high bits
F64(u32)
The high bits of a 64-bit float
Followed by Self::F32 containing the low bits
F32(u32)
A 32-bit float or the low-bits of a 64-bit float if preceded by Self::F64
True
A true literal
False
A false literal
Null
A null literal
Trait Implementations§
Source§impl Clone for TapeElement
impl Clone for TapeElement
Source§fn clone(&self) -> TapeElement
fn clone(&self) -> TapeElement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TapeElement
impl Debug for TapeElement
Source§impl PartialEq for TapeElement
impl PartialEq for TapeElement
impl Copy for TapeElement
impl Eq for TapeElement
impl StructuralPartialEq for TapeElement
Auto Trait Implementations§
impl Freeze for TapeElement
impl RefUnwindSafe for TapeElement
impl Send for TapeElement
impl Sync for TapeElement
impl Unpin for TapeElement
impl UnwindSafe for TapeElement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.