Struct tinychain::collection::CollectionVisitor [−][src]
pub struct CollectionVisitor { /* fields omitted */ }
Expand description
A de::Visitor
used to deserialize a Collection
.
Implementations
pub async fn visit_map_value<A: MapAccess>(
self,
class: CollectionType,
access: &mut A
) -> Result<Collection, A::Error>
Trait Implementations
type Value = Collection
type Value = Collection
The type which this Visitor
is responsible for decoding.
Format a message stating what data this Visitor
expects to receive. Read more
The input contains a key-value map. The default implementation fails with a type error. Read more
The input contains a boolean. Read more
The input contains an i8
. Read more
The input contains an i16
. Read more
The input contains an i32
. Read more
The input contains an i64
. Read more
The input contains a u8
. Read more
The input contains a u16
. Read more
The input contains a u32
. Read more
The input contains a u64
. Read more
The input contains an f32
. Read more
The input contains an f64
. Read more
fn visit_array_bool<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<bool>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<bool> + 'async_trait,
fn visit_array_bool<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<bool>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<bool> + 'async_trait,
The input contains an array of bool
s. Read more
fn visit_array_i8<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<i8>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<i8> + 'async_trait,
fn visit_array_i8<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<i8>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<i8> + 'async_trait,
The input contains an array of i8
s. Read more
fn visit_array_i16<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<i16>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<i16> + 'async_trait,
fn visit_array_i16<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<i16>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<i16> + 'async_trait,
The input contains an array of i16
s. Read more
fn visit_array_i32<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<i32>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<i32> + 'async_trait,
fn visit_array_i32<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<i32>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<i32> + 'async_trait,
The input contains an array of i32
s. Read more
fn visit_array_i64<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<i64>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<i64> + 'async_trait,
fn visit_array_i64<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<i64>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<i64> + 'async_trait,
The input contains an array of i64
s. Read more
fn visit_array_u8<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<u8>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<u8> + 'async_trait,
fn visit_array_u8<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<u8>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<u8> + 'async_trait,
The input contains an array of u8
s. Read more
fn visit_array_u16<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<u16>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<u16> + 'async_trait,
fn visit_array_u16<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<u16>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<u16> + 'async_trait,
The input contains an array of u16
s. Read more
fn visit_array_u32<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<u32>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<u32> + 'async_trait,
fn visit_array_u32<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<u32>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<u32> + 'async_trait,
The input contains an array of u32
s. Read more
fn visit_array_u64<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<u64>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<u64> + 'async_trait,
fn visit_array_u64<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<u64>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<u64> + 'async_trait,
The input contains an array of u64
s. Read more
fn visit_array_f32<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<f32>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<f32> + 'async_trait,
fn visit_array_f32<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<f32>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<f32> + 'async_trait,
The input contains an array of f32
s. Read more
fn visit_array_f64<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<f64>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<f64> + 'async_trait,
fn visit_array_f64<'async_trait, A>(
self,
_array: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as ArrayAccess<f64>>::Error>> + Send + 'async_trait, Global>> where
Self: 'async_trait,
A: ArrayAccess<f64> + 'async_trait,
The input contains an array of f64
s. Read more
The input contains a string and ownership of the string is being given
to the Visitor
. Read more
The input contains a byte array and ownership of the byte array is being
given to the Visitor
. Read more
The input contains a unit ()
. Read more
The input contains an optional that is absent. The default implementation fails with a type error. Read more
The input contains an optional that is present. The default implementation fails with a type error. Read more
The input contains a sequence of elements. The default implementation fails with a type error. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CollectionVisitor
impl Send for CollectionVisitor
impl Sync for CollectionVisitor
impl Unpin for CollectionVisitor
impl !UnwindSafe for CollectionVisitor
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Returns true
if self
can be cast into the target type T
.
Test if value
can be cast into Self
.
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
Test if self
can be cast into T
.
Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.