pub struct LoaderRegistry { /* private fields */ }Expand description
A registry of LibLoaders plus catalog-resolvable library sources.
Implementations§
Source§impl LoaderRegistry
impl LoaderRegistry
Sourcepub fn with_loader(self, loader: impl LibLoader + 'static) -> Self
pub fn with_loader(self, loader: impl LibLoader + 'static) -> Self
Adds a loader, builder-style.
Sourcepub fn add_loader(&mut self, loader: impl LibLoader + 'static)
pub fn add_loader(&mut self, loader: impl LibLoader + 'static)
Adds a loader.
Sourcepub fn with_source(self, symbol: Symbol, source: CatalogSource) -> Self
pub fn with_source(self, symbol: Symbol, source: CatalogSource) -> Self
Registers a catalog source for a library symbol, builder-style.
Sourcepub fn add_source(&mut self, symbol: Symbol, source: CatalogSource)
pub fn add_source(&mut self, symbol: Symbol, source: CatalogSource)
Registers a catalog source for a library symbol.
Sourcepub fn load_lib(&self, cx: &mut Cx, source: LibSource) -> Result<Box<dyn Lib>>
pub fn load_lib(&self, cx: &mut Cx, source: LibSource) -> Result<Box<dyn Lib>>
Loads a library, resolving catalog symbols and dispatching to the first accepting loader.
Sourcepub fn load_and_register(&self, cx: &mut Cx, source: LibSource) -> Result<LibId>
pub fn load_and_register(&self, cx: &mut Cx, source: LibSource) -> Result<LibId>
Loads a library and registers it into the registry, returning its id.
Sourcepub fn resolve_source_spec(&self, source: &LibSourceSpec) -> LibSourceSpec
pub fn resolve_source_spec(&self, source: &LibSourceSpec) -> LibSourceSpec
Resolves a data-only source spec through this registry’s catalog.
Sourcepub fn load_and_register_with_receipt(
&self,
cx: &mut Cx,
source: LibSourceSpec,
) -> Result<LibBootReceipt>
pub fn load_and_register_with_receipt( &self, cx: &mut Cx, source: LibSourceSpec, ) -> Result<LibBootReceipt>
Loads a data-only source and returns the boot receipt for the committed library.
Sourcepub fn replay_boot_receipts(
&self,
cx: &mut Cx,
receipts: &[LibBootReceipt],
) -> Result<Vec<LibBootReceipt>>
pub fn replay_boot_receipts( &self, cx: &mut Cx, receipts: &[LibBootReceipt], ) -> Result<Vec<LibBootReceipt>>
Replays load-order boot receipts, verifying that each replayed library produces the same receipt data.
Sourcepub fn replay_boot_state(
&self,
cx: &mut Cx,
state: &RegistryBootState,
) -> Result<Vec<LibBootReceipt>>
pub fn replay_boot_state( &self, cx: &mut Cx, state: &RegistryBootState, ) -> Result<Vec<LibBootReceipt>>
Replays a registry boot state and returns the receipts produced by the replay.
Sourcepub fn inspect_manifest(
&self,
cx: &mut Cx,
source: LibSource,
) -> Result<LibManifest>
pub fn inspect_manifest( &self, cx: &mut Cx, source: LibSource, ) -> Result<LibManifest>
Inspects a source’s manifest without loading it, resolving catalog symbols first.