pub struct OutputPolicy { /* private fields */ }Expand description
Which files of one component’s build output are immutable, keyed by path
relative to its out_dir — the single statement of the shape → rule
mapping that finalize_component_output (bundle path) and yubaba’s
r2_publish (R2 path) both apply, so the two cannot drift.
For a mesofact build (out_dir/html/ exists) html/<rel> is matched
against the declared patterns, hydrate/<rel> by
is_content_hashed_hydrate_output, and everything else (manifest.json,
tag-index.json, server/) is never immutable — each is rewritten in
place by the next build. For any other output, <rel> is matched against
the declared patterns directly.
Implementations§
Source§impl OutputPolicy
impl OutputPolicy
Sourcepub fn load(project_root: &Path, out_dir: &Path) -> Result<Self, BundleError>
pub fn load(project_root: &Path, out_dir: &Path) -> Result<Self, BundleError>
The policy for the component whose project root is project_root and
whose build output is out_dir (see declared_immutable).
Sourcepub fn is_immutable(&self, out_rel: &str) -> bool
pub fn is_immutable(&self, out_rel: &str) -> bool
out_rel is forward-slashed and relative to the component’s out_dir.