pub struct AddonState {
pub patch_mode: PatchMode,
pub addons: Vec<InstalledAddonRecord>,
}Expand description
Persisted addon state stored under .elemental/addons.json.
Fields§
§patch_mode: PatchModeInstance-wide upper-bound patch mode policy (Virtual by default).
addons: Vec<InstalledAddonRecord>Ordered list of addons installed on the instance.
Implementations§
Source§impl AddonState
impl AddonState
Sourcepub fn upsert(&mut self, record: InstalledAddonRecord)
pub fn upsert(&mut self, record: InstalledAddonRecord)
Inserts or replaces an addon record in installation order.
Sourcepub fn validate_modes(&self) -> Result<()>
pub fn validate_modes(&self) -> Result<()>
Validates that every Elemental-managed addon’s patch mode obeys self.patch_mode.
Sourcepub fn resolve_named_patches(&self) -> Result<Vec<NamedMetadataPatch>>
pub fn resolve_named_patches(&self) -> Result<Vec<NamedMetadataPatch>>
Resolves all stored NamedMetadataPatch entries with their effective patch modes.
Trait Implementations§
Source§impl Clone for AddonState
impl Clone for AddonState
Source§impl Debug for AddonState
impl Debug for AddonState
Source§impl Default for AddonState
impl Default for AddonState
Source§impl<'de> Deserialize<'de> for AddonState
impl<'de> Deserialize<'de> for AddonState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for AddonState
impl Freeze for AddonState
impl Move for AddonState
impl RefUnwindSafe for AddonState
impl Send for AddonState
impl Sync for AddonState
impl Unpin for AddonState
impl UnsafeUnpin for AddonState
impl UnwindSafe for AddonStatewhere
RawVecInner: UnwindSafe,
HashMap<String, PistonMetaLibrariesDownloadsArtifact>: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
HashMap<String, String>: UnwindSafe,
HashMap<String, bool>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more