pub struct ChoiceFloatVisitor;
Expand description

A visitor producing Choice for floating choice values.

Trait Implementations§

source§

impl<'de> Visitor<'de> for ChoiceFloatVisitor

§

type Value = Choice<f32>

The value produced by this visitor
§

type ArrayElem = Infallible

The element type Visitor::visit_array is expecting as input. Only used for visitors implementing this method, std::convert::Infallible can be used as a default.
source§

fn visit_choice_f32( &self, choice: Choice<f32> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a f32 choice.
source§

fn visit_none(&self) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a none.
source§

fn visit_bool( &self, _v: bool ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a bool.
source§

fn visit_int(&self, _v: i32) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an i32.
source§

fn visit_long( &self, _v: i64 ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an i64.
source§

fn visit_float( &self, _v: f32 ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an f32.
source§

fn visit_double( &self, _v: f64 ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an f64.
source§

fn visit_string( &self, _v: &'de str ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a string.
source§

fn visit_bytes( &self, _v: &'de [u8] ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a bytes array.
source§

fn visit_rectangle( &self, _v: Rectangle ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a Rectangle.
source§

fn visit_fraction( &self, _v: Fraction ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a Fraction.
source§

fn visit_id(&self, _v: Id) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an Id.
source§

fn visit_fd(&self, _v: Fd) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an Fd.
source§

fn visit_struct( &self, _struct_deserializer: &mut StructPodDeserializer<'de> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a structure.
source§

fn visit_array( &self, _elements: Vec<Self::ArrayElem> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an array.
source§

fn visit_object( &self, _object_deserializer: &mut ObjectPodDeserializer<'de> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an object.
source§

fn visit_choice_bool( &self, _choice: Choice<bool> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an i32 choice.
source§

fn visit_choice_i32( &self, _choice: Choice<i32> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an i32 choice.
source§

fn visit_choice_i64( &self, _choice: Choice<i64> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains an i64 choice.
source§

fn visit_choice_f64( &self, _choice: Choice<f64> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a f64 choice.
source§

fn visit_choice_id( &self, _choice: Choice<Id> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a Id choice.
source§

fn visit_choice_rectangle( &self, _choice: Choice<Rectangle> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a Rectangle choice.
source§

fn visit_choice_fraction( &self, _choice: Choice<Fraction> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a Fraction choice.
source§

fn visit_choice_fd( &self, _choice: Choice<Fd> ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a Fd choice.
source§

fn visit_pointer( &self, _type: u32, _pointer: *const c_void ) -> Result<Self::Value, DeserializeError<&'de [u8]>>

The input contains a pointer.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.