[−][src]Struct number_general::NumberVisitor
A structure for deserializing a Number
which implements
serde::de::Visitor
and destream::de::Visitor
.
Trait Implementations
impl Visitor for NumberVisitor
[src]
type Value = Number
The type which this Visitor
is responsible for decoding.
pub fn expecting(&self, f: &mut Formatter<'_>) -> Result
[src]
pub fn visit_bool<E: DestreamError>(self, b: bool) -> Result<Self::Value, E>
[src]
pub fn visit_i8<E: DestreamError>(self, i: i8) -> Result<Self::Value, E>
[src]
pub fn visit_i16<E: DestreamError>(self, i: i16) -> Result<Self::Value, E>
[src]
pub fn visit_i32<E: DestreamError>(self, i: i32) -> Result<Self::Value, E>
[src]
pub fn visit_i64<E: DestreamError>(self, i: i64) -> Result<Self::Value, E>
[src]
pub fn visit_u8<E: DestreamError>(self, u: u8) -> Result<Self::Value, E>
[src]
pub fn visit_u16<E: DestreamError>(self, u: u16) -> Result<Self::Value, E>
[src]
pub fn visit_u32<E: DestreamError>(self, u: u32) -> Result<Self::Value, E>
[src]
pub fn visit_u64<E: DestreamError>(self, u: u64) -> Result<Self::Value, E>
[src]
pub fn visit_f32<E: DestreamError>(self, f: f32) -> Result<Self::Value, E>
[src]
pub fn visit_f64<E: DestreamError>(self, f: f64) -> Result<Self::Value, E>
[src]
pub fn visit_seq<'async_trait, A: SeqAccess>(
self,
seq: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, A::Error>> + Send + 'async_trait>> where
A: 'async_trait,
Self: 'async_trait,
[src]
self,
seq: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, A::Error>> + Send + 'async_trait>> where
A: 'async_trait,
Self: 'async_trait,
pub fn visit_string<E>(self, v: String) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_byte_buf<E>(self, _v: Vec<u8, Global>) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_unit<E>(self) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_none<E>(self) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
#[must_use]pub fn visit_some<'life0, 'async_trait, D>(
self,
_decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <D as Decoder>::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
D: Decoder + 'async_trait,
[src]
self,
_decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <D as Decoder>::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
D: Decoder + 'async_trait,
#[must_use]pub fn visit_map<'async_trait, A>(
self,
_map: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as MapAccess>::Error>> + 'async_trait + Send, Global>> where
Self: 'async_trait,
A: MapAccess + 'async_trait,
[src]
self,
_map: A
) -> Pin<Box<dyn Future<Output = Result<Self::Value, <A as MapAccess>::Error>> + 'async_trait + Send, Global>> where
Self: 'async_trait,
A: MapAccess + 'async_trait,
impl<'de> Visitor<'de> for NumberVisitor
[src]
type Value = Number
The value produced by this visitor.
pub fn expecting(&self, f: &mut Formatter<'_>) -> Result
[src]
pub fn visit_bool<E: SerdeError>(self, b: bool) -> Result<Self::Value, E>
[src]
pub fn visit_i8<E: SerdeError>(self, i: i8) -> Result<Self::Value, E>
[src]
pub fn visit_i16<E: SerdeError>(self, i: i16) -> Result<Self::Value, E>
[src]
pub fn visit_i32<E: SerdeError>(self, i: i32) -> Result<Self::Value, E>
[src]
pub fn visit_i64<E: SerdeError>(self, i: i64) -> Result<Self::Value, E>
[src]
pub fn visit_u8<E: SerdeError>(self, u: u8) -> Result<Self::Value, E>
[src]
pub fn visit_u16<E: SerdeError>(self, u: u16) -> Result<Self::Value, E>
[src]
pub fn visit_u32<E: SerdeError>(self, u: u32) -> Result<Self::Value, E>
[src]
pub fn visit_u64<E>(self, u: u64) -> Result<Self::Value, E>
[src]
pub fn visit_f32<E>(self, f: f32) -> Result<Self::Value, E>
[src]
pub fn visit_f64<E>(self, f: f64) -> Result<Self::Value, E>
[src]
pub fn visit_seq<A: SeqAccess<'de>>(
self,
mut seq: A
) -> Result<Self::Value, A::Error>
[src]
self,
mut seq: A
) -> Result<Self::Value, A::Error>
pub fn visit_i128<E>(self, v: i128) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_u128<E>(self, v: u128) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_char<E>(self, v: char) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_str<E>(self, v: &str) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_borrowed_str<E>(self, v: &'de str) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_string<E>(self, v: String) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_borrowed_bytes<E>(self, v: &'de [u8]) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_byte_buf<E>(self, v: Vec<u8, Global>) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_none<E>(self) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_some<D>(
self,
deserializer: D
) -> Result<Self::Value, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
self,
deserializer: D
) -> Result<Self::Value, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn visit_unit<E>(self) -> Result<Self::Value, E> where
E: Error,
[src]
E: Error,
pub fn visit_newtype_struct<D>(
self,
deserializer: D
) -> Result<Self::Value, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
self,
deserializer: D
) -> Result<Self::Value, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn visit_map<A>(
self,
map: A
) -> Result<Self::Value, <A as MapAccess<'de>>::Error> where
A: MapAccess<'de>,
[src]
self,
map: A
) -> Result<Self::Value, <A as MapAccess<'de>>::Error> where
A: MapAccess<'de>,
pub fn visit_enum<A>(
self,
data: A
) -> Result<Self::Value, <A as EnumAccess<'de>>::Error> where
A: EnumAccess<'de>,
[src]
self,
data: A
) -> Result<Self::Value, <A as EnumAccess<'de>>::Error> where
A: EnumAccess<'de>,
Auto Trait Implementations
impl RefUnwindSafe for NumberVisitor
[src]
impl Send for NumberVisitor
[src]
impl Sync for NumberVisitor
[src]
impl Unpin for NumberVisitor
[src]
impl UnwindSafe for NumberVisitor
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<F, T> CastFrom<F> for T where
T: From<F>,
[src]
T: From<F>,
impl<T, F> CastInto<F> for T where
F: CastFrom<T>,
[src]
F: CastFrom<T>,
impl<V> Expected for V where
V: Visitor,
[src]
V: Visitor,
impl<'de, T> Expected for T where
T: Visitor<'de>,
[src]
T: Visitor<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F> Match for F
[src]
pub fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
[src]
T: TryCastFrom<Self>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]
T: CastFrom<F>,
pub fn can_cast_from(&F) -> bool
[src]
pub fn opt_cast_from(f: F) -> Option<T>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]
T: TryCastFrom<F>,
pub fn can_cast_into(&self) -> bool
[src]
pub fn opt_cast_into(self) -> Option<T>
[src]
pub fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
[src]
OnErr: FnOnce(&Self) -> Err,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,