Skip to main content

Module state

Module state 

Source

Re-exports§

pub use crate::addon::InstalledAddonRecord;

Structs§

AddonModify
In-memory draft for modifying an instance’s addon order and patch modes with zero-I/O PatchTrace previewing before committing changes to disk.
AddonState
Persisted addon state stored under .elemental/addons.json.

Functions§

load_addon_state
Loads .elemental/addons.json for an instance, returning default state when absent.
normalize_managed_file_path
Normalizes a managed file path relative to instance_root, rejecting path escapes.
remove_addon_from_instance
Removes an installed addon record, deletes its managed files, and resyncs metadata patches.
reorder_instance_addons
Reorders installed addons on instance and resyncs metadata patches.
save_addon_state
Persists .elemental/addons.json, removing the file if state is completely empty default.
set_addon_patch_mode
Updates an individual addon’s AddonPatchMode preference and resyncs metadata.
set_instance_patch_mode
Switches an instance’s PatchMode policy (Virtual <-> Physical) and resyncs metadata.
sync_instance_patches
Applies all AddonState metadata patches according to scoped instance & addon policies.
trace_instance_patches
Replays all active metadata patches against the clean baseline without modifying disk.