pub struct ContentCatalog {
descriptors: &'static [SpecDescriptor],
item_dependencies: &'static [ResolveDependencies],
expansion_trait_dependencies: &'static [ResolveDependencies],
}Expand description
Deterministic engine-content catalog injected through one link-time registration.
Fields§
§descriptors: &'static [SpecDescriptor]§item_dependencies: &'static [ResolveDependencies]§expansion_trait_dependencies: &'static [ResolveDependencies]Implementations§
Source§impl ContentCatalog
impl ContentCatalog
Sourcepub const fn new(
descriptors: &'static [SpecDescriptor],
item_dependencies: &'static [ResolveDependencies],
expansion_trait_dependencies: &'static [ResolveDependencies],
) -> Self
pub const fn new( descriptors: &'static [SpecDescriptor], item_dependencies: &'static [ResolveDependencies], expansion_trait_dependencies: &'static [ResolveDependencies], ) -> Self
Create a catalog from static generated and handwritten declarations.
Sourcepub const fn descriptors(&self) -> &'static [SpecDescriptor]
pub const fn descriptors(&self) -> &'static [SpecDescriptor]
Descriptors in canonical deterministic generation order.
Sourcepub const fn item_dependencies(&self) -> &'static [ResolveDependencies]
pub const fn item_dependencies(&self) -> &'static [ResolveDependencies]
Item dependency declarations in deterministic manifest order.
Sourcepub const fn expansion_trait_dependencies(
&self,
) -> &'static [ResolveDependencies]
pub const fn expansion_trait_dependencies( &self, ) -> &'static [ResolveDependencies]
Expansion-trait dependency declarations in deterministic authored order.
Sourcepub fn descriptor(
&self,
spec_id: SpecId,
) -> Result<&'static SpecDescriptor, ContentCatalogError>
pub fn descriptor( &self, spec_id: SpecId, ) -> Result<&'static SpecDescriptor, ContentCatalogError>
Look up one specialization descriptor.
§Errors
Returns a typed error when the catalog is invalid or the specialization is absent.
Sourcepub fn item_resolve_ids(&self, item_id: u32) -> &'static [u32]
pub fn item_resolve_ids(&self, item_id: u32) -> &'static [u32]
Additional spell IDs required by an equipped item.
Sourcepub fn expansion_trait_resolve_ids(&self, spell_id: u32) -> &'static [u32]
pub fn expansion_trait_resolve_ids(&self, spell_id: u32) -> &'static [u32]
Additional spell IDs required by a selected expansion trait.
Trait Implementations§
Source§impl Debug for ContentCatalog
impl Debug for ContentCatalog
impl Collect for &'static ContentCatalog
Auto Trait Implementations§
impl Freeze for ContentCatalog
impl RefUnwindSafe for ContentCatalog
impl Send for ContentCatalog
impl Sync for ContentCatalog
impl Unpin for ContentCatalog
impl UnsafeUnpin for ContentCatalog
impl UnwindSafe for ContentCatalog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more