Skip to main content

Root

Trait Root 

Source
pub trait Root: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn discover(&self) -> Result<Vec<RawUnit>, RegistryError>;
}
Expand description

A source of transform directories. Implement this to add a new kind of root — a git repo an HTTP endpoint, an in-browser buffer, or anything else — without touching the registry core.

Required Methods§

Source

fn name(&self) -> &str

A stable name for precedence/diagnostics (e.g. “provided”, “meridian”).

Source

fn discover(&self) -> Result<Vec<RawUnit>, RegistryError>

Enumerate the transform directories this root provides.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§