pub struct JsonObject {
pub fields: Vec<JsonField>,
pub span: Range<usize>,
}Expand description
Represents a JSON object.
Fields§
§fields: Vec<JsonField>The fields (key-value pairs) of the object.
span: Range<usize>The source range of the object.
Implementations§
Source§impl JsonObject
impl JsonObject
Sourcepub fn get(&self, key: &str) -> Option<&JsonValueNode>
pub fn get(&self, key: &str) -> Option<&JsonValueNode>
Returns the value associated with the given key, if it exists.
Trait Implementations§
Source§impl AsDocument for JsonObject
impl AsDocument for JsonObject
Source§impl Clone for JsonObject
impl Clone for JsonObject
Source§fn clone(&self) -> JsonObject
fn clone(&self) -> JsonObject
Returns a duplicate of the value. Read more
1.0.0 · 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 JsonObject
impl Debug for JsonObject
Source§impl<'de> Deserialize<'de> for JsonObject
impl<'de> Deserialize<'de> for JsonObject
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 PartialEq for JsonObject
impl PartialEq for JsonObject
Source§impl Serialize for JsonObject
impl Serialize for JsonObject
Source§impl ToSource for JsonObject
impl ToSource for JsonObject
Source§fn to_source(&self, buffer: &mut SourceBuffer)
fn to_source(&self, buffer: &mut SourceBuffer)
Writes the source code representation of this type to the provided buffer.
Source§fn to_source_string(&self) -> String
fn to_source_string(&self) -> String
Converts this type to a source code string.
impl StructuralPartialEq for JsonObject
Auto Trait Implementations§
impl Freeze for JsonObject
impl RefUnwindSafe for JsonObject
impl Send for JsonObject
impl Sync for JsonObject
impl Unpin for JsonObject
impl UnsafeUnpin for JsonObject
impl UnwindSafe for JsonObject
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