LoaderInfoProvider

Trait LoaderInfoProvider 

Source
pub trait LoaderInfoProvider: Send + Sync {
    // Required methods
    fn resolved_load_handle(
        &self,
        artifact_ref: &ArtifactRef,
    ) -> Option<Arc<ResolvedLoadHandle>>;
    fn artifact_id(&self, load: LoadHandle) -> Option<ArtifactId>;
}
Expand description

Provides information about mappings between ArtifactId and LoadHandle. Intended to be used for Handle serde.

Required Methods§

Source

fn resolved_load_handle( &self, artifact_ref: &ArtifactRef, ) -> Option<Arc<ResolvedLoadHandle>>

Returns the load handle for the artifact with the given UUID, if present.

This will only return Some(..) if there has been a previous call to [crate::loader::Loader::add_ref].

§Parameters
  • id: UUID of the artifact.
Source

fn artifact_id(&self, load: LoadHandle) -> Option<ArtifactId>

Returns the ArtifactId for the given LoadHandle, if present.

§Parameters
  • load_handle: ID allocated by Loader to track loading of the artifact.

Implementors§