Struct url_serde::Serde
[−]
[src]
pub struct Serde<T>(pub T);
A convenience wrapper to be used as a type parameter, for example when
a Vec<T>
or an HashMap<K, V>
need to be passed to serde.
Methods
impl<'de, T> Serde<T> where
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
[src]
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
pub fn into_inner(self) -> T
[src]
Consumes this wrapper, returning the inner value.
Trait Implementations
impl<T: Clone> Clone for Serde<T>
[src]
fn clone(&self) -> Serde<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Eq> Eq for Serde<T>
[src]
impl<T: Hash> Hash for Serde<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: PartialEq> PartialEq for Serde<T>
[src]
fn eq(&self, __arg_0: &Serde<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Serde<T>) -> bool
[src]
This method tests for !=
.
impl<'de, T> Debug for Serde<T> where
T: Debug,
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
[src]
T: Debug,
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl<'de, T> Deref for Serde<T> where
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
[src]
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
Dereferences the value.
impl<'de, T> DerefMut for Serde<T> where
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
[src]
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
impl<'de, T: PartialEq> PartialEq<T> for Serde<T> where
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
[src]
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
fn eq(&self, other: &T) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'de, T> Deserialize<'de> for Serde<T> where
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
[src]
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'de, T> Serialize for Serde<T> where
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,
[src]
De<T>: Deserialize<'de>,
Ser<'a, T>: Serialize,