#[repr(C)]pub struct JsonInternal {
pub string_value: AzString,
pub number_value: f64,
pub bool_value: bool,
}Expand description
Internal storage for JSON values.
This is a C-FFI-compatible tagged-union-via-struct: all fields always exist,
but only the field(s) corresponding to JsonType in the parent Json are
meaningful. For compound types (Array, Object) the serialized JSON is
stored in string_value and re-parsed on each access — this trades repeated
parsing cost for a flat, FFI-safe layout with no interior pointers.
Fields§
§string_value: AzStringFor strings and serialized objects/arrays
number_value: f64For numbers
bool_value: boolFor booleans
Trait Implementations§
Source§impl Clone for JsonInternal
impl Clone for JsonInternal
Source§fn clone(&self) -> JsonInternal
fn clone(&self) -> JsonInternal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonInternal
impl Debug for JsonInternal
Source§impl Default for JsonInternal
impl Default for JsonInternal
Source§impl PartialEq for JsonInternal
impl PartialEq for JsonInternal
Source§fn eq(&self, other: &JsonInternal) -> bool
fn eq(&self, other: &JsonInternal) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JsonInternal
Auto Trait Implementations§
impl Freeze for JsonInternal
impl RefUnwindSafe for JsonInternal
impl Send for JsonInternal
impl Sync for JsonInternal
impl Unpin for JsonInternal
impl UnsafeUnpin for JsonInternal
impl UnwindSafe for JsonInternal
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