Struct libspa::pod::deserialize::ChoiceFloatVisitor
source · pub struct ChoiceFloatVisitor;
Expand description
A visitor producing Choice
for floating choice values.
Trait Implementations§
source§impl<'de> Visitor<'de> for ChoiceFloatVisitor
impl<'de> Visitor<'de> for ChoiceFloatVisitor
§type ArrayElem = Infallible
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
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]>>
fn visit_pointer( &self, _type: u32, _pointer: *const c_void ) -> Result<Self::Value, DeserializeError<&'de [u8]>>
The input contains a pointer.
Auto Trait Implementations§
impl RefUnwindSafe for ChoiceFloatVisitor
impl Send for ChoiceFloatVisitor
impl Sync for ChoiceFloatVisitor
impl Unpin for ChoiceFloatVisitor
impl UnwindSafe for ChoiceFloatVisitor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more