Skip to main content

LibCatalog

Trait LibCatalog 

Source
pub trait LibCatalog {
    // Required method
    fn resolve(&self, name: &str) -> Option<&dyn Lib>;
}
Expand description

A resolver from a recipe requires name to a loadable library.

A recipe’s requires = [...] list names the libs its setup needs (numbers/complex, codec/lisp, organ/binding, …). The runner asks the catalog to resolve each name and loads the returned lib into the eval Cx before decode+eval. A name the catalog does not carry stays unresolved, and the recipe becomes a descriptor whose reason is the unresolved require.

Required Methods§

Source

fn resolve(&self, name: &str) -> Option<&dyn Lib>

Resolve a cookbook require name to a loadable library, or None when this catalog does not carry it.

A require matches either the lib’s fully qualified cookbook name (numbers/cas) or its unqualified tail (cas), mirroring crate::missing_requires.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§