[]Struct c3p0_mysql::mysql::Deserialized

pub struct Deserialized<T>(pub T);

Use it to parse T: Deserialize from Value.

This example is not tested
#[derive(Deserialize)]
struct DeserializableStruct {
    // ...
}
// ...
let (Deserialized(val),): (Deserialized<DeserializableStruct>,)
    = from_row(row_with_single_json_column);

Trait Implementations

impl<T> Copy for Deserialized<T> where
    T: Copy

impl<T> Clone for Deserialized<T> where
    T: Clone

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T> Eq for Deserialized<T> where
    T: Eq

impl<T> PartialEq<Deserialized<T>> for Deserialized<T> where
    T: PartialEq<T>, 

impl<T> PartialOrd<Deserialized<T>> for Deserialized<T> where
    T: PartialOrd<T>, 

impl<T> FromValue for Deserialized<T> where
    T: DeserializeOwned

type Intermediate = DeserializedIr<T>

fn from_value(v: Value) -> Self

Will panic if could not convert v to Self.

fn from_value_opt(v: Value) -> Result<Self, FromValueError>

Will return Err(Error::FromValueError(v)) if could not convert v to Self.

fn get_intermediate(v: Value) -> Result<Self::Intermediate, FromValueError>

Will return Err(Error::FromValueError(v)) if v is not convertible to Self.

impl<T> Hash for Deserialized<T> where
    T: Hash

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T> Debug for Deserialized<T> where
    T: Debug

impl<T> Ord for Deserialized<T> where
    T: Ord

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<T> ConvIr<Deserialized<T>> for DeserializedIr<T> where
    T: DeserializeOwned

Auto Trait Implementations

impl<T> Send for Deserialized<T> where
    T: Send

impl<T> Unpin for Deserialized<T> where
    T: Unpin

impl<T> Sync for Deserialized<T> where
    T: Sync

impl<T> UnwindSafe for Deserialized<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Deserialized<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, Ir> FromRow for T where
    Ir: ConvIr<T>,
    T: FromValue<Intermediate = Ir>, 

impl<T> Same<T> for T

type Output = T

Should always be Self