Skip to main content

FederationHooks

Trait FederationHooks 

Source
pub trait FederationHooks: Send + Sync {
    // Required methods
    fn build_actions(
        &self,
        manifest: &Manifest,
        stack_dir: &Path,
        chain: &[PathBuf],
    ) -> Result<Vec<Box<dyn Action>>, BuildError>;
    fn open_cache(&self, stack_dir: &Path) -> Result<Box<dyn Cache>, BuildError>;
}
Expand description

Environment injected by the host (CLI) — everything RepolithSync cannot construct without inverting the crate dependency graph.

Required Methods§

Source

fn build_actions( &self, manifest: &Manifest, stack_dir: &Path, chain: &[PathBuf], ) -> Result<Vec<Box<dyn Action>>, BuildError>

Turn a parsed child manifest into concrete actions.

chain already includes the child manifest’s canonical path (last element); implementations pass it through to any nested RepolithSync they construct so cycle detection stays airtight.

§Errors

Implementation-defined (missing node source, unknown kind wiring…).

Source

fn open_cache(&self, stack_dir: &Path) -> Result<Box<dyn Cache>, BuildError>

Open (or create) the child stack’s local cache.

§Errors

Backend-defined (I/O, schema migration…).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§