Struct number_general::NumberVisitor[][src]

pub struct NumberVisitor;
Expand description

A struct for deserializing a Number which implements destream::de::Visitor and serde::de::Visitor.

Trait Implementations

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 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

The input contains a string and ownership of the string is being given to the Visitor. Read more

The input contains a sequence of elements. The default implementation fails with a type error. Read more

The input contains an array of bools. Read more

The input contains an array of i8s. Read more

The input contains an array of i16s. Read more

The input contains an array of i32s. Read more

The input contains an array of i64s. Read more

The input contains an array of u8s. Read more

The input contains an array of u16s. Read more

The input contains an array of u32s. Read more

The input contains an array of u64s. Read more

The input contains an array of f32s. Read more

The input contains an array of f64s. 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 key-value map. The default implementation fails with a type error. Read more

The value produced by this visitor.

Format a message stating what data this Visitor expects to receive. 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

The input contains a string. The lifetime of the string is ephemeral and it may be destroyed after this method returns. Read more

The input contains a sequence of elements. Read more

The input contains a i128. Read more

The input contains a u128. Read more

The input contains a char. Read more

The input contains a string that lives at least as long as the Deserializer. 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. The lifetime of the byte array is ephemeral and it may be destroyed after this method returns. Read more

The input contains a byte array that lives at least as long as the Deserializer. 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 an optional that is absent. Read more

The input contains an optional that is present. Read more

The input contains a unit (). Read more

The input contains a newtype struct. Read more

The input contains a key-value map. Read more

The input contains an enum. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Cast an instance of T into an instance of Self.

Cast an instance of Self into an instance of T.

Format an explanation of what data was being expected. Same signature as the Display and Debug traits. Read more

Performs the conversion.

Performs the conversion.

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.

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.

Returns Ok(T) if self can be cast into T, otherwise calls on_err.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.