Skip to main content

LinkStrategy

Trait LinkStrategy 

Source
pub trait LinkStrategy {
    // Required methods
    fn name(&self) -> &str;
    fn probe(&self, dir: &Path) -> bool;
    fn link(&self, src: &Path, dst: &Path) -> VtaResult<()>;
}
Expand description

A way to materialize an environment view from the store (docs/09-store.md §link-strategies).

Required Methods§

Source

fn name(&self) -> &str

The strategy name, e.g. "reflink", "hardlink", "symlink", "copy".

Source

fn probe(&self, dir: &Path) -> bool

Whether this strategy is usable for the given target directory.

Link src to dst.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§