Trait alkahest::Deserialize
source · pub trait Deserialize<'de, F: Formula + ?Sized> {
// Required methods
fn deserialize(
deserializer: Deserializer<'de>
) -> Result<Self, DeserializeError>
where Self: Sized;
fn deserialize_in_place(
&mut self,
deserializer: Deserializer<'de>
) -> Result<(), DeserializeError>;
}
Expand description
Trait for types that can be deserialized
from raw bytes with specified F:
Formula
.
Required Methods§
sourcefn deserialize(
deserializer: Deserializer<'de>
) -> Result<Self, DeserializeError>where
Self: Sized,
fn deserialize( deserializer: Deserializer<'de> ) -> Result<Self, DeserializeError>where Self: Sized,
Deserializes value provided deserializer. Returns deserialized value and the number of bytes consumed from the and of input.
The value appears at the end of the slice. And referenced values are addressed from the beginning of the slice.
Errors
Returns DeserializeError
if deserialization fails.
sourcefn deserialize_in_place(
&mut self,
deserializer: Deserializer<'de>
) -> Result<(), DeserializeError>
fn deserialize_in_place( &mut self, deserializer: Deserializer<'de> ) -> Result<(), DeserializeError>
Deserializes value in-place provided deserializer.
Overwrites self
with data from the input
.
The value appears at the end of the slice. And referenced values are addressed from the beginning of the slice.
Errors
Returns DeserializeError
if deserialization fails.