Struct serde_value::ValueVisitor
source · pub struct ValueVisitor;
Trait Implementations§
source§impl<'de> Visitor<'de> for ValueVisitor
impl<'de> Visitor<'de> for ValueVisitor
source§fn expecting(&self, fmt: &mut Formatter<'_>) -> Result
fn expecting(&self, fmt: &mut Formatter<'_>) -> Result
Format a message stating what data this Visitor expects to receive. Read more
source§fn visit_bool<E>(self, value: bool) -> Result<Value, E>
fn visit_bool<E>(self, value: bool) -> Result<Value, E>
The input contains a boolean. Read more
source§fn visit_str<E>(self, value: &str) -> Result<Value, E>
fn visit_str<E>(self, value: &str) -> Result<Value, E>
The input contains a string. The lifetime of the string is ephemeral and
it may be destroyed after this method returns. Read more
source§fn visit_string<E>(self, value: String) -> Result<Value, E>
fn visit_string<E>(self, value: String) -> Result<Value, E>
The input contains a string and ownership of the string is being given
to the
Visitor
. Read moresource§fn visit_none<E>(self) -> Result<Value, E>
fn visit_none<E>(self) -> Result<Value, E>
The input contains an optional that is absent. Read more
source§fn visit_some<D: Deserializer<'de>>(self, d: D) -> Result<Value, D::Error>
fn visit_some<D: Deserializer<'de>>(self, d: D) -> Result<Value, D::Error>
The input contains an optional that is present. Read more
source§fn visit_newtype_struct<D: Deserializer<'de>>(
self,
d: D,
) -> Result<Value, D::Error>
fn visit_newtype_struct<D: Deserializer<'de>>( self, d: D, ) -> Result<Value, D::Error>
The input contains a newtype struct. Read more
source§fn visit_seq<V: SeqAccess<'de>>(self, visitor: V) -> Result<Value, V::Error>
fn visit_seq<V: SeqAccess<'de>>(self, visitor: V) -> Result<Value, V::Error>
The input contains a sequence of elements. Read more
source§fn visit_map<V: MapAccess<'de>>(self, visitor: V) -> Result<Value, V::Error>
fn visit_map<V: MapAccess<'de>>(self, visitor: V) -> Result<Value, V::Error>
The input contains a key-value map. Read more
source§fn visit_bytes<E>(self, v: &[u8]) -> Result<Value, E>
fn visit_bytes<E>(self, v: &[u8]) -> Result<Value, E>
The input contains a byte array. The lifetime of the byte array is
ephemeral and it may be destroyed after this method returns. Read more
source§fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Value, E>
fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Value, E>
The input contains a byte array and ownership of the byte array is being
given to the
Visitor
. Read moresource§fn visit_i128<E>(self, v: i128) -> Result<Self::Value, E>where
E: Error,
fn visit_i128<E>(self, v: i128) -> Result<Self::Value, E>where
E: Error,
The input contains a
i128
. Read moresource§fn visit_u128<E>(self, v: u128) -> Result<Self::Value, E>where
E: Error,
fn visit_u128<E>(self, v: u128) -> Result<Self::Value, E>where
E: Error,
The input contains a
u128
. Read moresource§fn visit_borrowed_str<E>(self, v: &'de str) -> Result<Self::Value, E>where
E: Error,
fn visit_borrowed_str<E>(self, v: &'de str) -> Result<Self::Value, E>where
E: Error,
The input contains a string that lives at least as long as the
Deserializer
. Read moresource§fn visit_borrowed_bytes<E>(self, v: &'de [u8]) -> Result<Self::Value, E>where
E: Error,
fn visit_borrowed_bytes<E>(self, v: &'de [u8]) -> Result<Self::Value, E>where
E: Error,
The input contains a byte array that lives at least as long as the
Deserializer
. Read moresource§fn visit_enum<A>(
self,
data: A,
) -> Result<Self::Value, <A as EnumAccess<'de>>::Error>where
A: EnumAccess<'de>,
fn visit_enum<A>(
self,
data: A,
) -> Result<Self::Value, <A as EnumAccess<'de>>::Error>where
A: EnumAccess<'de>,
The input contains an enum. Read more
Auto Trait Implementations§
impl Freeze for ValueVisitor
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