Skip to main content

FetchablePlan

Trait FetchablePlan 

Source
pub trait FetchablePlan<C: QueryContext, Row> {
    // Required methods
    fn fetch_one<'e, 'life0, 'async_trait, E>(
        &'life0 self,
        exec: E,
    ) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + Send + 'async_trait>>
       where E: Executor<'e, Database = Postgres> + 'async_trait,
             Self: 'async_trait,
             'e: 'async_trait,
             'life0: 'async_trait;
    fn fetch_all<'e, 'life0, 'async_trait, E>(
        &'life0 self,
        exec: E,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + Send + 'async_trait>>
       where E: Executor<'e, Database = Postgres> + 'async_trait,
             Self: 'async_trait,
             'e: 'async_trait,
             'life0: 'async_trait;
    fn fetch_optional<'e, 'life0, 'async_trait, E>(
        &'life0 self,
        exec: E,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + Send + 'async_trait>>
       where E: Executor<'e, Database = Postgres> + 'async_trait,
             Self: 'async_trait,
             'e: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn fetch_one<'e, 'life0, 'async_trait, E>( &'life0 self, exec: E, ) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + Send + 'async_trait>>
where E: Executor<'e, Database = Postgres> + 'async_trait, Self: 'async_trait, 'e: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_all<'e, 'life0, 'async_trait, E>( &'life0 self, exec: E, ) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + Send + 'async_trait>>
where E: Executor<'e, Database = Postgres> + 'async_trait, Self: 'async_trait, 'e: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_optional<'e, 'life0, 'async_trait, E>( &'life0 self, exec: E, ) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + Send + 'async_trait>>
where E: Executor<'e, Database = Postgres> + 'async_trait, Self: 'async_trait, 'e: 'async_trait, 'life0: 'async_trait,

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§

Source§

impl<'a, C, Row> FetchablePlan<C, Row> for DeleteQueryPlan<'a, C, Row>
where C: QueryContext, C::Model: Deletable, Row: Send + Sync + Unpin + for<'r> FromRow<'r, PgRow>,

Source§

impl<'a, C, Row> FetchablePlan<C, Row> for InsertQueryPlan<'a, C, Row>
where C: QueryContext, C::Model: Creatable, Row: Send + Sync + Unpin + for<'r> FromRow<'r, PgRow>,

Source§

impl<'a, C, Row> FetchablePlan<C, Row> for ReadQueryPlan<'a, C, Row>
where C: QueryContext, Row: Send + Sync + Unpin + for<'r> FromRow<'r, PgRow>,

Source§

impl<'a, C, Row> FetchablePlan<C, Row> for UpdateQueryPlan<'a, C, Row>
where C: QueryContext, C::Model: Updatable, Row: Send + Sync + Unpin + for<'r> FromRow<'r, PgRow>,