Trait serde::de::Deserialize
[−]
[src]
pub trait Deserialize: Sized {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer;
}
A data structure that can be deserialized from any data format supported by Serde.
Serde provides Deserialize
implementations for many Rust primitive and
standard library types. The complete list is here. All of these can
be deserialized using Serde out of the box.
Additionally, Serde provides a procedural macro called serde_derive
to
automatically generate Deserialize
implementations for structs and enums
in your program. See the codegen section of the manual for how to
use this.
In rare cases it may be necessary to implement Deserialize
manually for
some type in your program. See the Implementing
Deserialize
section of the manual for more about this.
Third-party crates may provide Deserialize
implementations for types that
they expose. For example the linked-hash-map
crate provides a
LinkedHashMap<K, V>
type that is deserializable by Serde because the crate
provides an implementation of Deserialize
for it.
Required Methods
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer
Deserialize this value from the given Serde deserializer.
See the Implementing Deserialize
section of the
manual for more information about how to implement this method.
Implementors
impl Deserialize for ByteBuf
impl Deserialize for ()
impl Deserialize for bool
impl Deserialize for isize
impl Deserialize for i8
impl Deserialize for i16
impl Deserialize for i32
impl Deserialize for i64
impl Deserialize for usize
impl Deserialize for u8
impl Deserialize for u16
impl Deserialize for u32
impl Deserialize for u64
impl Deserialize for f32
impl Deserialize for f64
impl Deserialize for char
impl Deserialize for String
impl<T> Deserialize for Option<T> where T: Deserialize
impl<T> Deserialize for PhantomData<T>
impl<T> Deserialize for BinaryHeap<T> where T: Deserialize + Ord
impl<T> Deserialize for BTreeSet<T> where T: Deserialize + Eq + Ord
impl<T> Deserialize for LinkedList<T> where T: Deserialize
impl<T, S> Deserialize for HashSet<T, S> where T: Deserialize + Eq + Hash,
S: BuildHasher + Defaultimpl<T> Deserialize for Vec<T> where T: Deserialize
impl<T> Deserialize for VecDeque<T> where T: Deserialize
impl<T> Deserialize for [T; 0] where T: Deserialize
impl<T> Deserialize for [T; 1] where T: Deserialize
impl<T> Deserialize for [T; 2] where T: Deserialize
impl<T> Deserialize for [T; 3] where T: Deserialize
impl<T> Deserialize for [T; 4] where T: Deserialize
impl<T> Deserialize for [T; 5] where T: Deserialize
impl<T> Deserialize for [T; 6] where T: Deserialize
impl<T> Deserialize for [T; 7] where T: Deserialize
impl<T> Deserialize for [T; 8] where T: Deserialize
impl<T> Deserialize for [T; 9] where T: Deserialize
impl<T> Deserialize for [T; 10] where T: Deserialize
impl<T> Deserialize for [T; 11] where T: Deserialize
impl<T> Deserialize for [T; 12] where T: Deserialize
impl<T> Deserialize for [T; 13] where T: Deserialize
impl<T> Deserialize for [T; 14] where T: Deserialize
impl<T> Deserialize for [T; 15] where T: Deserialize
impl<T> Deserialize for [T; 16] where T: Deserialize
impl<T> Deserialize for [T; 17] where T: Deserialize
impl<T> Deserialize for [T; 18] where T: Deserialize
impl<T> Deserialize for [T; 19] where T: Deserialize
impl<T> Deserialize for [T; 20] where T: Deserialize
impl<T> Deserialize for [T; 21] where T: Deserialize
impl<T> Deserialize for [T; 22] where T: Deserialize
impl<T> Deserialize for [T; 23] where T: Deserialize
impl<T> Deserialize for [T; 24] where T: Deserialize
impl<T> Deserialize for [T; 25] where T: Deserialize
impl<T> Deserialize for [T; 26] where T: Deserialize
impl<T> Deserialize for [T; 27] where T: Deserialize
impl<T> Deserialize for [T; 28] where T: Deserialize
impl<T> Deserialize for [T; 29] where T: Deserialize
impl<T> Deserialize for [T; 30] where T: Deserialize
impl<T> Deserialize for [T; 31] where T: Deserialize
impl<T> Deserialize for [T; 32] where T: Deserialize
impl<T0: Deserialize> Deserialize for (T0,)
impl<T0: Deserialize, T1: Deserialize> Deserialize for (T0, T1)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize> Deserialize for (T0, T1, T2)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize> Deserialize for (T0, T1, T2, T3)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize> Deserialize for (T0, T1, T2, T3, T4)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize, T8: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize, T8: Deserialize, T9: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize, T8: Deserialize, T9: Deserialize, T10: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize, T8: Deserialize, T9: Deserialize, T10: Deserialize, T11: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize, T8: Deserialize, T9: Deserialize, T10: Deserialize, T11: Deserialize, T12: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize, T8: Deserialize, T9: Deserialize, T10: Deserialize, T11: Deserialize, T12: Deserialize, T13: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize, T8: Deserialize, T9: Deserialize, T10: Deserialize, T11: Deserialize, T12: Deserialize, T13: Deserialize, T14: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
impl<T0: Deserialize, T1: Deserialize, T2: Deserialize, T3: Deserialize, T4: Deserialize, T5: Deserialize, T6: Deserialize, T7: Deserialize, T8: Deserialize, T9: Deserialize, T10: Deserialize, T11: Deserialize, T12: Deserialize, T13: Deserialize, T14: Deserialize, T15: Deserialize> Deserialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
impl<K, V> Deserialize for BTreeMap<K, V> where K: Deserialize + Ord,
V: Deserializeimpl<K, V, S> Deserialize for HashMap<K, V, S> where K: Deserialize + Eq + Hash,
V: Deserialize,
S: BuildHasher + Defaultimpl Deserialize for IpAddr
impl Deserialize for Ipv4Addr
impl Deserialize for Ipv6Addr
impl Deserialize for SocketAddr
impl Deserialize for SocketAddrV4
impl Deserialize for SocketAddrV6
impl Deserialize for PathBuf
impl<T: Deserialize> Deserialize for Box<T>
impl<T: Deserialize> Deserialize for Box<[T]>
impl Deserialize for Box<str>
impl<T: Deserialize> Deserialize for Arc<T>
impl<T: Deserialize> Deserialize for Rc<T>
impl<'a, T: ?Sized> Deserialize for Cow<'a, T> where T: ToOwned,
T::Owned: Deserializeimpl Deserialize for Duration
impl<T, E> Deserialize for Result<T, E> where T: Deserialize, E: Deserialize