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§
Sourcefn build_actions(
&self,
manifest: &Manifest,
stack_dir: &Path,
chain: &[PathBuf],
) -> Result<Vec<Box<dyn Action>>, BuildError>
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…).
Sourcefn open_cache(&self, stack_dir: &Path) -> Result<Box<dyn Cache>, BuildError>
fn open_cache(&self, stack_dir: &Path) -> Result<Box<dyn Cache>, BuildError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".