Struct datastore_mysql::MySqlStore
source · [−]pub struct MySqlStore { /* private fields */ }
Expand description
A pooled Store
for the MySQL database.
Trait Implementations
sourceimpl Clone for MySqlStore
impl Clone for MySqlStore
sourcefn clone(&self) -> MySqlStore
fn clone(&self) -> MySqlStore
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MySqlStore
impl Debug for MySqlStore
sourceimpl Read<MySqlStore> for bool
impl Read<MySqlStore> for bool
sourceimpl Read<MySqlStore> for i8
impl Read<MySqlStore> for i8
sourceimpl Read<MySqlStore> for f64
impl Read<MySqlStore> for f64
sourceimpl Read<MySqlStore> for Vec<u8>
impl Read<MySqlStore> for Vec<u8>
sourceimpl Read<MySqlStore> for String
impl Read<MySqlStore> for String
sourceimpl Read<MySqlStore> for i16
impl Read<MySqlStore> for i16
sourceimpl Read<MySqlStore> for i32
impl Read<MySqlStore> for i32
sourceimpl Read<MySqlStore> for i64
impl Read<MySqlStore> for i64
sourceimpl Read<MySqlStore> for u8
impl Read<MySqlStore> for u8
sourceimpl Read<MySqlStore> for u16
impl Read<MySqlStore> for u16
sourceimpl Read<MySqlStore> for u32
impl Read<MySqlStore> for u32
sourceimpl Read<MySqlStore> for u64
impl Read<MySqlStore> for u64
sourceimpl Read<MySqlStore> for f32
impl Read<MySqlStore> for f32
sourceimpl Store for MySqlStore
impl Store for MySqlStore
type DataStore = MySqlStore
type DataStore = MySqlStore
The inner store used by this store. This is mainly useful for wrapping stores while
keeping the same requirements for the types. For most stores this should be Self
. Read more
type Error = Error
type Error = Error
The Error type returned by the methods of this store.
sourcefn connect<'life0, 'async_trait>(
uri: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn connect<'life0, 'async_trait>(
uri: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Connects to the store using the given uri. Read more
sourcefn create<'life0, 'async_trait, T, D>(
&'life0 self,
descriptor: D
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self> + Send + Sync + 'static,
D: DataDescriptor<T, Self> + Send + Sync,
T: 'async_trait,
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn create<'life0, 'async_trait, T, D>(
&'life0 self,
descriptor: D
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self> + Send + Sync + 'static,
D: DataDescriptor<T, Self> + Send + Sync,
T: 'async_trait,
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
sourcefn delete<'life0, 'async_trait, T, D, Q>(
&'life0 self,
descriptor: D,
query: Q
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send,
Q: DataQuery<T, Self::DataStore> + Send,
T: 'async_trait,
D: 'async_trait,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'async_trait, T, D, Q>(
&'life0 self,
descriptor: D,
query: Q
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send,
Q: DataQuery<T, Self::DataStore> + Send,
T: 'async_trait,
D: 'async_trait,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Deletes all items T
matching the query Q
from the store. Read more
sourcefn get<'life0, 'async_trait, T, D, Q>(
&'life0 self,
descriptor: D,
query: Q
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send,
Q: DataQuery<T, Self::DataStore> + Send,
T: 'async_trait,
D: 'async_trait,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn get<'life0, 'async_trait, T, D, Q>(
&'life0 self,
descriptor: D,
query: Q
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send,
Q: DataQuery<T, Self::DataStore> + Send,
T: 'async_trait,
D: 'async_trait,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
sourcefn get_all<'life0, 'async_trait, T, D>(
&'life0 self,
descriptor: D
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send + Sync,
T: 'async_trait,
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn get_all<'life0, 'async_trait, T, D>(
&'life0 self,
descriptor: D
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send + Sync,
T: 'async_trait,
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
sourcefn get_one<'life0, 'async_trait, T, D, Q>(
&'life0 self,
descriptor: D,
query: Q
) -> Pin<Box<dyn Future<Output = Result<Option<T>, Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send,
Q: DataQuery<T, Self::DataStore> + Send,
T: 'async_trait,
D: 'async_trait,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn get_one<'life0, 'async_trait, T, D, Q>(
&'life0 self,
descriptor: D,
query: Q
) -> Pin<Box<dyn Future<Output = Result<Option<T>, Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send,
Q: DataQuery<T, Self::DataStore> + Send,
T: 'async_trait,
D: 'async_trait,
Q: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Returns an item T
matching the query Q
from store. If no matching item is found None
is returned. Read more
sourcefn insert<'life0, 'async_trait, T, D>(
&'life0 self,
descriptor: D,
data: T
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send,
T: 'async_trait,
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn insert<'life0, 'async_trait, T, D>(
&'life0 self,
descriptor: D,
data: T
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
T: StoreData<Self::DataStore> + Send + Sync + 'static,
D: DataDescriptor<T, Self::DataStore> + Send,
T: 'async_trait,
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Inserts a new item T
into the store. Read more
sourceimpl Write<MySqlStore> for bool
impl Write<MySqlStore> for bool
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for i8
impl Write<MySqlStore> for i8
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for f64
impl Write<MySqlStore> for f64
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for [u8]
impl Write<MySqlStore> for [u8]
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for Vec<u8>
impl Write<MySqlStore> for Vec<u8>
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for str
impl Write<MySqlStore> for str
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for String
impl Write<MySqlStore> for String
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for i16
impl Write<MySqlStore> for i16
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for i32
impl Write<MySqlStore> for i32
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for i64
impl Write<MySqlStore> for i64
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for u8
impl Write<MySqlStore> for u8
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for u16
impl Write<MySqlStore> for u16
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for u32
impl Write<MySqlStore> for u32
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for u64
impl Write<MySqlStore> for u64
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
sourceimpl Write<MySqlStore> for f32
impl Write<MySqlStore> for f32
fn write<W>(&self, writer: &mut W) -> Result<(), W::Error> where
W: Writer<MySqlStore>,
fn write_type<W>(writer: &mut W) -> Result<(), W::Error> where
W: TypeWriter<MySqlStore>,
Auto Trait Implementations
impl !RefUnwindSafe for MySqlStore
impl Send for MySqlStore
impl Sync for MySqlStore
impl Unpin for MySqlStore
impl !UnwindSafe for MySqlStore
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<S> StoreExt<S> for S where
S: Store,
impl<S> StoreExt<S> for S where
S: Store,
sourcefn descriptor<T>(&self) -> <T as StoreData<<S as Store>::DataStore>>::Descriptor where
T: StoreData<<S as Store>::DataStore>,
<T as StoreData<<S as Store>::DataStore>>::Descriptor: Default,
fn descriptor<T>(&self) -> <T as StoreData<<S as Store>::DataStore>>::Descriptor where
T: StoreData<<S as Store>::DataStore>,
<T as StoreData<<S as Store>::DataStore>>::Descriptor: Default,
Creates a new DataDescriptor
for the StoreData
type T
if T::Descriptor
implements Default
. Read more