Skip to main content

Driver

Trait Driver 

Source
pub trait Driver: Send + Sync {
    // Required methods
    fn connection(
        &self,
        options: Option<&HashMap<String, String>>,
    ) -> Arc<dyn Connection> ⓘ;
    fn command(&self, connection: Arc<dyn Connection>) -> Arc<dyn Command> ⓘ;
    fn transaction(
        &self,
        connection: Arc<dyn Connection>,
        isolation: IsolationLevel,
    ) -> Arc<dyn Transaction> ⓘ;
    fn row_type_converters(
        &self,
    ) -> HashMap<String, Box<dyn TypeConverter<Value, Value> + Send + Sync>>;

    // Provided methods
    fn column_type(&self, name: &str) -> Result<String> { ... }
    fn type_converter(&self) -> Option<&dyn Mapping<String, String>> { ... }
    fn statement_renderer(&self) -> Option<&StatementTextRenderer> { ... }
    fn information(&self) -> Option<&Information> { ... }
}

Required Methods§

Source

fn connection( &self, options: Option<&HashMap<String, String>>, ) -> Arc<dyn Connection> ⓘ

Source

fn command(&self, connection: Arc<dyn Connection>) -> Arc<dyn Command> ⓘ

Source

fn transaction( &self, connection: Arc<dyn Connection>, isolation: IsolationLevel, ) -> Arc<dyn Transaction> ⓘ

Source

fn row_type_converters( &self, ) -> HashMap<String, Box<dyn TypeConverter<Value, Value> + Send + Sync>>

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§