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.

Required Methods§

source

fn as_query(&self) -> Cow<'_, [u8]>

Implementations on Foreign Types§

source§

impl AsQuery for &str

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for &String

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for &Vec<u8>

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for &[u8]

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for Cow<'_, str>

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for Cow<'_, [u8]>

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for Box<str>

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for Box<[u8]>

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for String

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for Arc<str>

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for Arc<[u8]>

source§

fn as_query(&self) -> Cow<'_, [u8]>

source§

impl AsQuery for Vec<u8>

source§

fn as_query(&self) -> Cow<'_, [u8]>

Implementors§