Skip to main content

AsyncOrmSession

Trait AsyncOrmSession 

Source
pub trait AsyncOrmSession {
    type CommandOutput;
    type QueryOutput;
    type Error;

    // Required methods
    fn execute_document_async<'a>(
        &'a mut self,
        document: &'a IrDocument,
    ) -> OrmFuture<'a, Self::CommandOutput, Self::Error>;
    fn query_document_async<'a>(
        &'a mut self,
        document: &'a IrDocument,
    ) -> OrmFuture<'a, Self::QueryOutput, Self::Error>;
}
Expand description

Async execution boundary over the caller-owned connection/session.

The boxed future keeps this crate independent from a particular async runtime while preserving exactly the same IR and result ownership as the synchronous OrmSession.

Required Associated Types§

Required Methods§

Source

fn execute_document_async<'a>( &'a mut self, document: &'a IrDocument, ) -> OrmFuture<'a, Self::CommandOutput, Self::Error>

Source

fn query_document_async<'a>( &'a mut self, document: &'a IrDocument, ) -> OrmFuture<'a, Self::QueryOutput, Self::Error>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§