Struct libspa::pod::deserialize::ValueVisitor
source · pub struct ValueVisitor;
Expand description
A visitor producing Value
for all type of values.
Trait Implementations§
source§impl<'de> Visitor<'de> for ValueVisitor
impl<'de> Visitor<'de> for ValueVisitor
§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_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_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_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_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.
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.
Auto Trait Implementations§
impl RefUnwindSafe for ValueVisitor
impl Send for ValueVisitor
impl Sync for ValueVisitor
impl Unpin for ValueVisitor
impl UnwindSafe for ValueVisitor
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