Struct serde_value::ValueVisitor
source · [−]pub struct ValueVisitor;
Trait Implementations
sourceimpl<'de> Visitor<'de> for ValueVisitor
impl<'de> Visitor<'de> for ValueVisitor
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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 more
sourcefn visit_unit<E>(self) -> Result<Value, E>
fn visit_unit<E>(self) -> Result<Value, E>
The input contains a unit ()
. Read more
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 RefUnwindSafe for ValueVisitor
impl Send for ValueVisitor
impl Sync for ValueVisitor
impl Unpin for ValueVisitor
impl UnwindSafe for ValueVisitor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more