pub struct SymlinkFarm<S = Materialized> {
pub staging_dir: PathBuf,
pub links: HashMap<String, PathBuf>,
/* private fields */
}Expand description
A symlink farm mapping relative file paths to their source locations.
Uses a typestate pattern (Built → Materialized) to enforce at
compile time that materialize() must be called before deploy_to().
The PhantomData<S> marker is zero-sized and erased at runtime.
Fields§
§staging_dir: PathBufThe staging directory for this profile.
links: HashMap<String, PathBuf>Map of relative path -> absolute source path (winner after priority resolution).
Implementations§
Source§impl SymlinkFarm<Built>
impl SymlinkFarm<Built>
Sourcepub fn from_links(staging_dir: PathBuf, links: HashMap<String, PathBuf>) -> Self
pub fn from_links(staging_dir: PathBuf, links: HashMap<String, PathBuf>) -> Self
Construct a Built farm directly from a staging directory and link map.
Sourcepub fn build(
profile_name: &str,
resolved: &ResolvedLoadOrder,
mod_files: &HashMap<ModId, Vec<(String, PathBuf)>>,
overrides: Option<&[(String, PathBuf)]>,
hidden: Option<&HashSet<(String, String)>>,
) -> Result<Self>
pub fn build( profile_name: &str, resolved: &ResolvedLoadOrder, mod_files: &HashMap<ModId, Vec<(String, PathBuf)>>, overrides: Option<&[(String, PathBuf)]>, hidden: Option<&HashSet<(String, String)>>, ) -> Result<Self>
Build a symlink farm from a resolved load order and the content-addressed store.
mod_files maps each mod ID to its list of (relative_path, store_entry_path) pairs.
overrides (if provided) are layered on top — override files win over all mods.
hidden is a set of (mod_id, rel_path) pairs to exclude from the farm.
Sourcepub async fn materialize(self) -> Result<SymlinkFarm<Materialized>>
pub async fn materialize(self) -> Result<SymlinkFarm<Materialized>>
Materialize the symlink farm on disk, transitioning to Materialized state.
Trait Implementations§
Source§impl<S: Clone> Clone for SymlinkFarm<S>
impl<S: Clone> Clone for SymlinkFarm<S>
Source§fn clone(&self) -> SymlinkFarm<S>
fn clone(&self) -> SymlinkFarm<S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more