pub trait Deserializer<'de> {
type Error: Error;
const FLAT_CLASSES: bool;
// Required methods
fn src_namespace(&self) -> &str;
fn dst_namespaces(&self) -> impl Iterator<Item = &str>;
fn deserialize_any<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>
where V: Visitor<'de>;
// Provided methods
fn deserialize_class<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>
where V: Visitor<'de> { ... }
fn deserialize_field<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>
where V: Visitor<'de> { ... }
fn deserialize_method<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>
where V: Visitor<'de> { ... }
fn deserialize_method_arg<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>
where V: Visitor<'de> { ... }
fn deserialize_method_var<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>
where V: Visitor<'de> { ... }
fn size_hint(&self) -> (usize, Option<usize>) { ... }
}Expand description
Deserializer of a mapping file.
Required Associated Constants§
Sourceconst FLAT_CLASSES: bool
const FLAT_CLASSES: bool
Whether inner classes should be flattened.
Required Associated Types§
Required Methods§
Sourcefn src_namespace(&self) -> &str
fn src_namespace(&self) -> &str
Returns the source namespace of this mapping.
Sourcefn dst_namespaces(&self) -> impl Iterator<Item = &str>
fn dst_namespaces(&self) -> impl Iterator<Item = &str>
Returns the destination namespaces of this mapping.
Provided Methods§
Sourcefn deserialize_class<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>where
V: Visitor<'de>,
fn deserialize_class<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>where
V: Visitor<'de>,
Hints the deserializer to deserialize a class.
Sourcefn deserialize_field<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>where
V: Visitor<'de>,
fn deserialize_field<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>where
V: Visitor<'de>,
Hints the deserializer to deserialize a field.
Sourcefn deserialize_method<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>where
V: Visitor<'de>,
fn deserialize_method<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>where
V: Visitor<'de>,
Hints the deserializer to deserialize a method.
Sourcefn deserialize_method_arg<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>where
V: Visitor<'de>,
fn deserialize_method_arg<V>(
&mut self,
visitor: V,
) -> Result<Option<V::Value>, Self::Error>where
V: Visitor<'de>,
Hints the deserializer to deserialize a method argument.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".