Struct MySqlStore

Source
pub struct MySqlStore { /* private fields */ }
Expand description

A pooled Store for the MySQL database.

Trait Implementations§

Source§

impl Clone for MySqlStore

Source§

fn clone(&self) -> MySqlStore

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MySqlStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Read<MySqlStore> for String

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for Vec<u8>

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for bool

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for f32

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for f64

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for i16

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for i32

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for i64

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for i8

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for u16

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for u32

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for u64

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Read<MySqlStore> for u8

Source§

fn read<R>(reader: &mut R) -> Result<Self, R::Error>
where R: Reader<MySqlStore>,

Source§

impl Store for MySqlStore

Source§

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.
Source§

type Error = Error

The Error type returned by the methods of this store.
Source§

fn connect<'life0, 'async_trait>( uri: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Connects to the store using the given uri. Read more
Source§

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 + 'async_trait, D: DataDescriptor<T, Self> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Initializes the store for storing data of the type T. If create was not called before calling delete, get, get_all, get_one or insert on the store, the operation might fail. Read more
Source§

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 + 'async_trait, D: DataDescriptor<T, Self::DataStore> + Send + 'async_trait, Q: DataQuery<T, Self::DataStore> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Deletes all items T matching the query Q from the store. Read more
Source§

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 + 'async_trait, D: DataDescriptor<T, Self::DataStore> + Send + 'async_trait, Q: DataQuery<T, Self::DataStore> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Returns all items T matching the query Q from the store. If no matching items are found an empty Vec is returned. Read more
Source§

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 + 'async_trait, D: DataDescriptor<T, Self::DataStore> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Returns all items T from the store. If no items are found an empty Vec is returned. Read more
Source§

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 + 'async_trait, D: DataDescriptor<T, Self::DataStore> + Send + 'async_trait, Q: DataQuery<T, Self::DataStore> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Returns an item T matching the query Q from store. If no matching item is found None is returned. Read more
Source§

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 + 'async_trait, D: DataDescriptor<T, Self::DataStore> + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Inserts a new item T into the store. Read more
Source§

impl Write<MySqlStore> for [u8]

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for String

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for Vec<u8>

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for bool

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for f32

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for f64

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for i16

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for i32

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for i64

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for i8

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for str

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for u16

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for u32

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for u64

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Source§

impl Write<MySqlStore> for u8

Source§

fn write<W>(&self, writer: &mut W) -> Result<(), W::Error>
where W: Writer<MySqlStore>,

Source§

fn write_type<W>(writer: &mut W) -> Result<(), W::Error>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<S> StoreExt<S> for S
where S: Store,

Source§

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.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,