pub struct SerdeJson;Trait Implementations§
Source§impl Json for SerdeJson
impl Json for SerdeJson
type Node<'a> = &'a Value
Source§type PreparedKey = String
type PreparedKey = String
Property name prepared once at compile time, for repeated object lookups.
Source§type StringBuffer = Value
type StringBuffer = Value
Scratch storage for
Json::with_string_node, reusable across calls.fn prepare_key(key: &str) -> String
Source§impl<'a> Node<'a, SerdeJson> for &'a Value
impl<'a> Node<'a, SerdeJson> for &'a Value
type Object = &'a Map<String, Value>
type Array = &'a [Value]
type Number = &'a Number
fn as_object(&self) -> Option<&'a Map<String, Value>>
fn as_array(&self) -> Option<&'a [Value]>
fn as_string(&self) -> Option<Cow<'a, str>>
fn as_number(&self) -> Option<&'a Number>
fn as_boolean(&self) -> Option<bool>
fn is_null(&self) -> bool
Source§fn json_type(&self) -> JsonType
fn json_type(&self) -> JsonType
Numbers always report
JsonType::Number; integer-ness is a numeric property, not a type.Source§fn string_length(&self) -> Option<u64>
fn string_length(&self) -> Option<u64>
Length in Unicode code points.
Source§fn equals_value(&self, expected: &Value) -> bool
fn equals_value(&self, expected: &Value) -> bool
Equality against a
const/enum value; numbers compare mathematically.Source§fn to_value(&self) -> Cow<'a, Value>
fn to_value(&self) -> Cow<'a, Value>
For cold paths only: error construction, annotations, the
equals_value and
is_unique defaults (const/enum/uniqueItems), and serde-only custom keywords.Source§fn identity(&self) -> Option<NodeIdentity>
fn identity(&self) -> Option<NodeIdentity>
Source§fn is_number(&self) -> bool
fn is_number(&self) -> bool
Must agree with
as_number().is_some(); override where as_number has to construct.fn is_string(&self) -> bool
fn container_identity(&self) -> Option<NodeIdentity>
Auto Trait Implementations§
impl Freeze for SerdeJson
impl RefUnwindSafe for SerdeJson
impl Send for SerdeJson
impl Sync for SerdeJson
impl Unpin for SerdeJson
impl UnsafeUnpin for SerdeJson
impl UnwindSafe for SerdeJson
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