pub trait TableSchemaProvider:
Copy
+ Into<Table>
+ 'static {
// Required methods
fn all() -> &'static [Self];
fn create_statement(&self) -> String;
fn name(&self) -> &'static str;
fn populate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ApiResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn print(self, path: Option<PathBuf>);
fn rows<R, P>(
&self,
query: &str,
params: P,
path: Option<&PathBuf>,
) -> ApiResult<Vec<R>>
where P: Params,
for<'row> R: Row + From<&'row BackendRow<'row>>;
}Expand description
Table schema provider for database operations
Required Methods§
Sourcefn create_statement(&self) -> String
fn create_statement(&self) -> String
Returns the CREATE TABLE SQL statement for this table
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".