Module libspa::pod::deserialize
source · Expand description
This module deals with deserializing raw SPA pods into rust types.
A raw pod can be deserialized into any implementor of the PodDeserialize
trait
by using PodDeserializer::deserialize_from
.
The crate provides a number of implementors of this trait either directly,
or through FixedSizedPod
.
You can also implement the PodDeserialize
trait on another type yourself. See the traits documentation for more
information on how to do that.
Structs§
- This struct handles deserializing arrays.
- A visitor producing
bool
for boolean values. - A visitor producing [
&[u8]
] for bytes values. - A visitor producing
Choice
for boolean choice values. - A visitor producing
Choice
for double floating choice values. - A visitor producing
Choice
for fd choice values. - A visitor producing
Choice
for floating choice values. - A visitor producing
Choice
for fraction choice values. - A visitor producing
Choice
for id choice values. - A visitor producing
Choice
for integer choice values. - A visitor producing
Choice
for long integer choice values. - A visitor producing
Choice
for rectangle choice values. - This struct is returned by
PodDeserialize
implementors on deserialization success. - A visitor producing
f64
for double values. - A visitor producing
Fd
for file descriptor values. - A visitor producing
f32
for float values. - A visitor producing
Fraction
for fraction values. - A visitor producing
Id
for ID values. - A visitor producing
i32
for integer values. - A visitor producing
i64
for long values. - A visitor producing
()
for none values. - This struct handles deserializing objects.
- This struct is responsible for deserializing a raw pod into a
PodDeserialize
implementor. - A visitor producing pointers for fd pointer values.
- A visitor producing
Rectangle
for rectangle values. - A visitor producing
&str
for string values. - This struct handles deserializing structs.
- A visitor producing
Value
for all type of values. - A visitor producing
Vec
for array values.
Enums§
- Represent an error raised when deserializing a pod
Traits§
- Implementors of this trait can be deserialized from the raw SPA Pod format using a
PodDeserializer
- - This trait represents a visitor is “driven” by the deserializer to construct an instance of your type.