Struct mysql_async::Serialized
[−]
[src]
pub struct Serialized<T>(pub T);
Use it to pass T: Serialize
as JSON to a prepared statement.
⚠Be careful when using this code, it's not being tested!
#[derive(Serialize)] struct SerializableStruct { // ... } conn.prep_exec("INSERT INTO table (json_column) VALUES (?)", (Serialized(SerializableStruct),));
Trait Implementations
impl<T> Ord for Serialized<T> where
T: Ord,
[src]
T: Ord,
fn cmp(&self, __arg_0: &Serialized<T>) -> Ordering
[src]
impl<T> Hash for Serialized<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> Copy for Serialized<T> where
T: Copy,
[src]
T: Copy,
impl<T> Clone for Serialized<T> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Serialized<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<Serialized<T>> for Serialized<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,
fn eq(&self, __arg_0: &Serialized<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: &Serialized<T>) -> bool
[src]
This method tests for !=
.
impl<T> Debug for Serialized<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 Serialized<T> where
T: Eq,
[src]
T: Eq,
impl<T> PartialOrd<Serialized<T>> for Serialized<T> where
T: PartialOrd<T>,
[src]
T: PartialOrd<T>,