ByUuid

Trait ByUuid 

Source
pub trait ByUuid: BaseModel {
    // Required method
    fn by_uuid<'life0, 'async_trait>(
        database: &'life0 Database,
        uuid: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Self, DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn by_uuid_cached<'life0, 'async_trait>(
        database: &'life0 Database,
        uuid: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn by_uuid_optional<'life0, 'async_trait>(
        database: &'life0 Database,
        uuid: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self>, DatabaseError>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn by_uuid_optional_cached<'life0, 'async_trait>(
        database: &'life0 Database,
        uuid: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn get_fetchable(uuid: Uuid) -> Fetchable<Self> { ... }
    fn get_fetchable_from_row(
        row: &PgRow,
        column: impl AsRef<str>,
    ) -> Option<Fetchable<Self>> { ... }
}

Required Methods§

Source

fn by_uuid<'life0, 'async_trait>( database: &'life0 Database, uuid: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Self, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn by_uuid_cached<'life0, 'async_trait>( database: &'life0 Database, uuid: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Source

fn by_uuid_optional<'life0, 'async_trait>( database: &'life0 Database, uuid: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<Self>, DatabaseError>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Source

fn by_uuid_optional_cached<'life0, 'async_trait>( database: &'life0 Database, uuid: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Source

fn get_fetchable(uuid: Uuid) -> Fetchable<Self>

Source

fn get_fetchable_from_row( row: &PgRow, column: impl AsRef<str>, ) -> Option<Fetchable<Self>>

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§