Trait entity::EntLoader[][src]

pub trait EntLoader {
    type Output: Ent;
    fn load_from_db(
        db: WeakDatabaseRc,
        id: Id
    ) -> DatabaseResult<Option<Self::Output>>; fn load_from_db_strict(
        db: WeakDatabaseRc,
        id: Id
    ) -> DatabaseResult<Self::Output> { ... }
fn load(id: Id) -> DatabaseResult<Option<Self::Output>> { ... }
fn load_strict(id: Id) -> DatabaseResult<Self::Output> { ... } }

Represents an interface to load some ent from a database

Associated Types

type Output: Ent[src]

The ent that will be loaded

Loading content...

Required methods

fn load_from_db(
    db: WeakDatabaseRc,
    id: Id
) -> DatabaseResult<Option<Self::Output>>
[src]

Retrieves the ent instance with the specified id from the provided database, returning none if ent not found

Loading content...

Provided methods

fn load_from_db_strict(
    db: WeakDatabaseRc,
    id: Id
) -> DatabaseResult<Self::Output>
[src]

Retrieves the ent instance with the specified id from the provided database, converting none into a missing ent error

fn load(id: Id) -> DatabaseResult<Option<Self::Output>>[src]

Retrieves the ent instance with the specified id from the global database, returning none if ent not found

fn load_strict(id: Id) -> DatabaseResult<Self::Output>[src]

Retrieves the ent instance with the specified id from the global database, converting none into a missing ent error

Loading content...

Implementors

Loading content...