Trait mysql_async::prelude::AsQuery
source · pub trait AsQuery: Send + Sync {
// Required method
fn as_query(&self) -> Cow<'_, [u8]>;
}
Expand description
Types that can be treated as a MySQL query.
This trait is implemented by all “string-ish” standard library types, like String
, &str
,
Cow<str>
, but also all types that can be treated as a slice of bytes (such as Vec<u8>
and
&[u8]
), since MySQL does not require queries to be valid UTF-8.