pub struct IValue(/* private fields */);Expand description
An interned JSON value.
Implementations§
Source§impl IValue
impl IValue
Sourcepub fn from(interners: &Jinterners, source: Value) -> Self
pub fn from(interners: &Jinterners, source: Value) -> Self
Interns the given serde_json::Value into the given Jinterners
arena.
Sourcepub fn from_ref(interners: &Jinterners, source: &Value) -> Self
pub fn from_ref(interners: &Jinterners, source: &Value) -> Self
Interns the given serde_json::Value into the given Jinterners
arena.
Sourcepub fn lookup(&self, interners: &Jinterners) -> Value
pub fn lookup(&self, interners: &Jinterners) -> Value
Retrieves the corresponding serde_json::Value inside the given
Jinterners arena.
Sourcepub fn lookup_ref<'a>(&self, interners: &'a Jinterners) -> ValueRef<'a>
pub fn lookup_ref<'a>(&self, interners: &'a Jinterners) -> ValueRef<'a>
Performs a shallow lookup of this value inside the given Jinterners
arena.
Contrary to lookup(), this function doesn’t create a
deep copy of the value, and is therefore likely more efficient if
you only need to query specific object field(s) or array element(s).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IValue
impl<'de> Deserialize<'de> for IValue
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
Source§impl GetSize for IValue
impl GetSize for IValue
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
Determines how many bytes this object occupies inside the heap while using a
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker. Read moreimpl Copy for IValue
impl Eq for IValue
impl StructuralPartialEq for IValue
Auto Trait Implementations§
impl Freeze for IValue
impl RefUnwindSafe for IValue
impl Send for IValue
impl Sync for IValue
impl Unpin for IValue
impl UnwindSafe for IValue
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.