Struct mysql_async::Deserialized
[−]
[src]
pub struct Deserialized<T>(pub T);
Use it to parse T: Deserialize
from Value
.
⚠Be careful when using this code, it's not being tested!
#[derive(Deserialize)] struct DeserializableStruct { // ... } // ... let (Deserialized(val),): (Deserialized<DeserializableStruct>,) = from_row(row_with_single_json_column);
Trait Implementations
impl<T> Ord for Deserialized<T> where
T: Ord,
[src]
T: Ord,
fn cmp(&self, __arg_0: &Deserialized<T>) -> Ordering
[src]
impl<T> Copy for Deserialized<T> where
T: Copy,
[src]
T: Copy,
impl<T> Hash for Deserialized<T> where
T: Hash,
[src]
T: Hash,
fn hash<__HT>(&self, __arg_0: &mut __HT) where
__HT: Hasher,
[src]
__HT: Hasher,
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> Clone for Deserialized<T> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Deserialized<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> PartialEq<Deserialized<T>> for Deserialized<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,
fn eq(&self, __arg_0: &Deserialized<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: &Deserialized<T>) -> bool
[src]
This method tests for !=
.
impl<T> Debug for Deserialized<T> where
T: Debug,
[src]
T: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl<T> Eq for Deserialized<T> where
T: Eq,
[src]
T: Eq,
impl<T> FromValue for Deserialized<T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
type Intermediate = DeserializedIr<T>
fn from_value(v: Value) -> Self
[src]
Will panic if could not convert v
to Self
.
fn from_value_opt(v: Value) -> Result<Self, FromValueError>
[src]
Will return Err(Error::FromValueError(v))
if could not convert v
to Self
.
fn get_intermediate(v: Value) -> Result<Self::Intermediate, FromValueError>
[src]
Will return Err(Error::FromValueError(v))
if v
is not convertible to Self
.
impl<T> PartialOrd<Deserialized<T>> for Deserialized<T> where
T: PartialOrd<T>,
[src]
T: PartialOrd<T>,