pub struct JsonObject { /* private fields */ }
Expand description
定义一个可序列化和反序列化的 JSON 对象结构体。
该结构体封装了一个 HashMap
,用于存储键值对,并支持多种操作接口。
Implementations§
Source§impl JsonObject
impl JsonObject
Sourcepub fn parse_object<T: DeserializeOwned>(
json_str: &str,
) -> Result<T, JsonObjectError>
pub fn parse_object<T: DeserializeOwned>( json_str: &str, ) -> Result<T, JsonObjectError>
Trait Implementations§
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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsonObject
impl Debug for JsonObject
Source§impl Default for JsonObject
实现 Default
特性以提供默认的 JsonObject
实例。
impl Default for JsonObject
实现 Default
特性以提供默认的 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
Auto Trait Implementations§
impl Freeze for JsonObject
impl RefUnwindSafe for JsonObject
impl Send for JsonObject
impl Sync for JsonObject
impl Unpin 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