Struct mysql::Serialized[][src]

pub struct Serialized<T>(pub T);

Use it to pass T: Serialize as JSON to a prepared statement.

This example is not tested
#[derive(Serialize)]
struct SerializableStruct {
    // ...
}

conn.prep_exec("INSERT INTO table (json_column) VALUES (?)",
               (Serialized(SerializableStruct),));

Trait Implementations

impl<T> PartialOrd<Serialized<T>> for Serialized<T> where
    T: PartialOrd<T>, 
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T> Hash for Serialized<T> where
    T: Hash
[src]

Feeds this value into the given [Hasher]. Read more

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Debug for Serialized<T> where
    T: Debug
[src]

Formats the value using the given formatter. Read more

impl<T> Ord for Serialized<T> where
    T: Ord
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<T> From<Serialized<T>> for Value where
    T: Serialize
[src]

Performs the conversion.

impl<T> Copy for Serialized<T> where
    T: Copy
[src]

impl<T> Eq for Serialized<T> where
    T: Eq
[src]

impl<T> PartialEq<Serialized<T>> for Serialized<T> where
    T: PartialEq<T>, 
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

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

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