pub trait Table:
From<Row>
+ Sync
+ Send {
// Required methods
fn key(&self) -> Key<Self>;
fn fetch_by_key<'life0, 'async_trait, C>(
key: Key<Self>,
client: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait;
fn fetch_where<'life0, 'life1, 'async_trait, C>(
client: &'life0 C,
where_clause: WhereClause<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_by_key<'life0, 'async_trait, C>(
key: Key<Self>,
client: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait;
fn insert<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn upsert<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_table<'life0, 'async_trait, C>(
client: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
'life0: 'async_trait;
fn bulk_insert_opt<'life0, 'life1, 'async_trait, C>(
client: &'life0 C,
values: &'life1 [Self],
options: InsertOptions,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn delete<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn bulk_insert<'life0, 'life1, 'async_trait, C>(
client: &'life0 C,
values: &'life1 [Self],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Required Methods§
fn key(&self) -> Key<Self>
fn fetch_by_key<'life0, 'async_trait, C>(
key: Key<Self>,
client: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_where<'life0, 'life1, 'async_trait, C>(
client: &'life0 C,
where_clause: WhereClause<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_by_key<'life0, 'async_trait, C>(
key: Key<Self>,
client: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
fn insert<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_table<'life0, 'async_trait, C>(
client: &'life0 C,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
'life0: 'async_trait,
fn bulk_insert_opt<'life0, 'life1, 'async_trait, C>(
client: &'life0 C,
values: &'life1 [Self],
options: InsertOptions,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn delete<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 C,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bulk_insert<'life0, 'life1, 'async_trait, C>(
client: &'life0 C,
values: &'life1 [Self],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
C: 'async_trait + GenericClient + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.