pub struct DuplicateKeyRejectingJsonValueSeed;Expand description
Serde seed that constructs a DuplicateKeyRejectingJsonValue.
Use this seed when the caller owns a deserializer and needs duplicate-key rejection without requiring an intermediate typed wrapper.
§Examples
use qubit_json::value::DuplicateKeyRejectingJsonValueSeed;
use serde::de::DeserializeSeed;
let mut deserializer = serde_json::Deserializer::from_str(r#"{"ok":true}"#);
let value = DuplicateKeyRejectingJsonValueSeed::new().deserialize(&mut deserializer)?;
assert_eq!(value.into_inner()["ok"], true);Implementations§
Trait Implementations§
Source§impl Clone for DuplicateKeyRejectingJsonValueSeed
impl Clone for DuplicateKeyRejectingJsonValueSeed
Source§fn clone(&self) -> DuplicateKeyRejectingJsonValueSeed
fn clone(&self) -> DuplicateKeyRejectingJsonValueSeed
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 moreimpl Copy for DuplicateKeyRejectingJsonValueSeed
Source§impl Default for DuplicateKeyRejectingJsonValueSeed
impl Default for DuplicateKeyRejectingJsonValueSeed
Source§fn default() -> DuplicateKeyRejectingJsonValueSeed
fn default() -> DuplicateKeyRejectingJsonValueSeed
Returns the “default value” for a type. Read more
Source§impl<'de> DeserializeSeed<'de> for DuplicateKeyRejectingJsonValueSeed
impl<'de> DeserializeSeed<'de> for DuplicateKeyRejectingJsonValueSeed
Source§fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>where
D: Deserializer<'de>,
Deserializes one JSON value with recursive duplicate-key rejection.
Source§type Value = DuplicateKeyRejectingJsonValue
type Value = DuplicateKeyRejectingJsonValue
The type produced by using this seed.
Auto Trait Implementations§
impl Freeze for DuplicateKeyRejectingJsonValueSeed
impl RefUnwindSafe for DuplicateKeyRejectingJsonValueSeed
impl Send for DuplicateKeyRejectingJsonValueSeed
impl Sync for DuplicateKeyRejectingJsonValueSeed
impl Unpin for DuplicateKeyRejectingJsonValueSeed
impl UnsafeUnpin for DuplicateKeyRejectingJsonValueSeed
impl UnwindSafe for DuplicateKeyRejectingJsonValueSeed
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