Skip to main content

EntityResolverExt

Trait EntityResolverExt 

Source
pub trait EntityResolverExt: EntityResolver {
    // Provided methods
    fn get_by_u32(&self, id: u32) -> Option<Arc<DecodedEntity>> { ... }
    fn exists(&self, id: EntityId) -> bool { ... }
    fn get_or_err(&self, id: EntityId) -> Result<Arc<DecodedEntity>> { ... }
    fn resolve_ref_or_err(
        &self,
        entity_id: EntityId,
        attr_index: usize,
        attr: &AttributeValue,
    ) -> Result<Arc<DecodedEntity>> { ... }
}
Expand description

Extension methods for EntityResolver

Provided Methods§

Source

fn get_by_u32(&self, id: u32) -> Option<Arc<DecodedEntity>>

Get entity by raw u32 ID

Source

fn exists(&self, id: EntityId) -> bool

Check if an entity exists

Source

fn get_or_err(&self, id: EntityId) -> Result<Arc<DecodedEntity>>

Get entity or return error

Source

fn resolve_ref_or_err( &self, entity_id: EntityId, attr_index: usize, attr: &AttributeValue, ) -> Result<Arc<DecodedEntity>>

Resolve reference or return error

Implementors§