Skip to main content

PackFinders

Trait PackFinders 

pub trait PackFinders {
    // Required methods
    fn pack_type(&self) -> PackType;
    fn add_pack_finders(
        &mut self,
        pack: PackRegistration,
    ) -> Result<(), PackFinderError>;
}
Expand description

The typed builder handed to add_pack_finders, rebuilt for each discovery. Registration performs no resource reload and does not select optional packs.

Required Methods§

fn pack_type(&self) -> PackType

The kind of repository currently being discovered.

fn add_pack_finders( &mut self, pack: PackRegistration, ) -> Result<(), PackFinderError>

Add a bundled pack to this repository. A registration for the other pack type is ignored, allowing one hook implementation to describe both kinds. Refuses an invalid title with PackFinderError::Text, including components deeper than 512 nodes; a refusal leaves the repository unchanged.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§