pub struct Jsons {
pub roots: Vec<JsonIdx>,
pub numbers: Vec<Number>,
pub strings: Lookbacks<Strings>,
pub arrays: Vecs<Vec<JsonIdx>>,
pub objects: Vecs<(Lookbacks<Strings>, Vec<JsonIdx>)>,
}
Expand description
Stand-in for Vec<Json>
.
This approach uses indexes
which contains discriminants, which should allow
an efficient representation of offset information. Unfortunately, both arrays
and objects
just list their intended offsets directly, rather than encode the
offsets using unary degree sequences, which seemed hard to thread through the
other abstractions. Their Vec<usize>
container can probably be made smarter,
in particular by an Option<usize>
container where None
indicates increment.
Stand-in for Vec<Json>
.
The roots
vector indicates the root of each stored Json
.
The (transitive) contents of each Json
are stored throughout,
at locations that may not necessarily be found in roots
.
Fields§
§roots: Vec<JsonIdx>
§numbers: Vec<Number>
§strings: Lookbacks<Strings>
§arrays: Vecs<Vec<JsonIdx>>
§objects: Vecs<(Lookbacks<Strings>, Vec<JsonIdx>)>
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Jsons
impl<'de> Deserialize<'de> for Jsons
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Jsons
Auto Trait Implementations§
impl Freeze for Jsons
impl RefUnwindSafe for Jsons
impl Send for Jsons
impl Sync for Jsons
impl Unpin for Jsons
impl UnwindSafe for Jsons
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)