pub trait ReflectionAdapter<T: Database> {
type InvalidAdapter: ReflectionAdapterUninitialized<T>;
// Required methods
fn disconnect(
self,
) -> impl Future<Output = Result<Self::InvalidAdapter, ReflectionAdapterError>> + Send;
fn set_database_name(
&mut self,
database_name: &str,
) -> impl Future<Output = Result<(), ReflectionAdapterError>>;
fn get_database_name(&self) -> &str;
fn list_database_names(
&self,
) -> impl Future<Output = Result<Vec<String>, ReflectionAdapterError>> + Send;
fn list_table_names(
&self,
) -> impl Future<Output = Result<Vec<String>, ReflectionAdapterError>> + Send;
fn get_table_reflection(
&self,
table_name: &str,
) -> impl Future<Output = Result<Table, ReflectionAdapterError>> + Send;
fn get_reflection(
&self,
) -> impl Future<Output = Result<Database, ReflectionAdapterError>> + Send;
}
Required Associated Types§
Required Methods§
fn disconnect( self, ) -> impl Future<Output = Result<Self::InvalidAdapter, ReflectionAdapterError>> + Send
fn set_database_name( &mut self, database_name: &str, ) -> impl Future<Output = Result<(), ReflectionAdapterError>>
fn get_database_name(&self) -> &str
fn list_database_names( &self, ) -> impl Future<Output = Result<Vec<String>, ReflectionAdapterError>> + Send
fn list_table_names( &self, ) -> impl Future<Output = Result<Vec<String>, ReflectionAdapterError>> + Send
fn get_table_reflection( &self, table_name: &str, ) -> impl Future<Output = Result<Table, ReflectionAdapterError>> + Send
fn get_reflection( &self, ) -> impl Future<Output = Result<Database, ReflectionAdapterError>> + Send
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.