Skip to main content

ComposerConnectionAsync

Trait ComposerConnectionAsync 

Source
pub trait ComposerConnectionAsync {
    type Value;
    type Statement;
    type Error: From<Error>;

    // Required method
    fn compose(
        &self,
        composer: &Composer,
        template: &Template,
        values: BTreeMap<String, Vec<Self::Value>>,
    ) -> impl Future<Output = Result<(Self::Statement, Vec<Self::Value>), Self::Error>> + Send;
}
Expand description

Async version of ComposerConnection for async database drivers (e.g. tokio-postgres, mysql_async).

Required Associated Types§

Source

type Value

The database-specific value type for bind parameters.

Source

type Statement

The composed SQL string.

Source

type Error: From<Error>

The error type for this driver.

Required Methods§

Source

fn compose( &self, composer: &Composer, template: &Template, values: BTreeMap<String, Vec<Self::Value>>, ) -> impl Future<Output = Result<(Self::Statement, Vec<Self::Value>), Self::Error>> + Send

Compose a template with bind values asynchronously.

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.

Implementors§