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§
Sourcefn get_by_u32(&self, id: u32) -> Option<Arc<DecodedEntity>>
fn get_by_u32(&self, id: u32) -> Option<Arc<DecodedEntity>>
Get entity by raw u32 ID
Sourcefn get_or_err(&self, id: EntityId) -> Result<Arc<DecodedEntity>>
fn get_or_err(&self, id: EntityId) -> Result<Arc<DecodedEntity>>
Get entity or return error
Sourcefn resolve_ref_or_err(
&self,
entity_id: EntityId,
attr_index: usize,
attr: &AttributeValue,
) -> Result<Arc<DecodedEntity>>
fn resolve_ref_or_err( &self, entity_id: EntityId, attr_index: usize, attr: &AttributeValue, ) -> Result<Arc<DecodedEntity>>
Resolve reference or return error