DeserializeIgnoredFields

Trait DeserializeIgnoredFields 

Source
pub trait DeserializeIgnoredFields<'de>: Default + Debug {
    type Key: Deserialize<'de>;
    type Value: Deserialize<'de>;

    // Required method
    fn insert<E: Error>(
        &mut self,
        key: Self::Key,
        value: Self::Value,
    ) -> Result<(), E>;
}
Expand description

Trait for types that can collect ignored fields during deserialization.

Required Associated Types§

Source

type Key: Deserialize<'de>

The type of the key for the ignored fields.

Source

type Value: Deserialize<'de>

The type of the value of ignored fields.

Required Methods§

Source

fn insert<E: Error>( &mut self, key: Self::Key, value: Self::Value, ) -> Result<(), E>

Insert an ignored field.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'de> DeserializeIgnoredFields<'de> for Map<String, Value>

Available on crate feature serde_json only.
Source§

type Key = String

Source§

type Value = Value

Source§

fn insert<E: Error>( &mut self, key: Self::Key, value: Self::Value, ) -> Result<(), E>

Source§

impl<'de> DeserializeIgnoredFields<'de> for Mapping

Available on crate feature serde_yaml only.
Source§

type Key = Value

Source§

type Value = Value

Source§

fn insert<E: Error>( &mut self, key: Self::Key, value: Self::Value, ) -> Result<(), E>

Source§

impl<'de> DeserializeIgnoredFields<'de> for Mapping

Available on crate feature serde_yml only.
Source§

type Key = Value

Source§

type Value = Value

Source§

fn insert<E: Error>( &mut self, key: Self::Key, value: Self::Value, ) -> Result<(), E>

Source§

impl<'de> DeserializeIgnoredFields<'de> for Table

Available on crate feature serde_toml only.
Source§

type Key = String

Source§

type Value = Value

Source§

fn insert<E: Error>( &mut self, key: Self::Key, value: Self::Value, ) -> Result<(), E>

Implementors§