pub trait ArrayVisitor<'de, T>: Sized {
type Output;
// Required method
fn visit<A>(
self,
vec: A,
) -> Result<Self::Output, <A as ArrayAccess<'de>>::Error>
where A: ArrayAccess<'de, Element = T>;
// Provided method
fn validate<A>(self, vec: A) -> Result<(), <A as ArrayAccess<'de>>::Error>
where A: ArrayAccess<'de, Element = T> { ... }
}Expand description
A visitor walking through a Deserializer for arrays.
Required Associated Types§
Required Methods§
Sourcefn visit<A>(
self,
vec: A,
) -> Result<Self::Output, <A as ArrayAccess<'de>>::Error>where
A: ArrayAccess<'de, Element = T>,
fn visit<A>(
self,
vec: A,
) -> Result<Self::Output, <A as ArrayAccess<'de>>::Error>where
A: ArrayAccess<'de, Element = T>,
The input contains an array, deserialize it.
Provided Methods§
Sourcefn validate<A>(self, vec: A) -> Result<(), <A as ArrayAccess<'de>>::Error>where
A: ArrayAccess<'de, Element = T>,
fn validate<A>(self, vec: A) -> Result<(), <A as ArrayAccess<'de>>::Error>where
A: ArrayAccess<'de, Element = T>,
The input contains an array, but just validate it, don’t deserialize.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".