pub struct InstalledAddonRecord {
pub id: String,
pub name: String,
pub version: Option<String>,
pub origin: AddonOrigin,
pub patch_mode: AddonPatchMode,
pub patch_mode_support: PatchModeSupport,
pub requires_runtime_hook: bool,
pub managed_files: Vec<String>,
pub metadata_patch: Option<MetadataPatch>,
}Expand description
Persisted state record for a single addon installed on an instance.
Fields§
§id: StringMachine-readable addon identifier.
name: StringHuman-readable addon display name.
version: Option<String>Installed addon version, when recorded.
origin: AddonOriginOrigin indicating whether Elemental or an external launcher installed the addon.
patch_mode: AddonPatchModePer-addon patch mode preference.
patch_mode_support: PatchModeSupportPatch mode capabilities declared by the addon when installed.
requires_runtime_hook: boolWhether this addon requires a launch-time hook via Addon::augment_launch.
managed_files: Vec<String>Instance-relative paths of files managed by this addon.
metadata_patch: Option<MetadataPatch>Stored metadata patch applied in PatchMode::Virtual or PatchMode::Physical.
Implementations§
Source§impl InstalledAddonRecord
impl InstalledAddonRecord
Sourcepub fn effective_patch_mode(
&self,
instance_policy: PatchMode,
) -> Result<PatchMode>
pub fn effective_patch_mode( &self, instance_policy: PatchMode, ) -> Result<PatchMode>
Computes the effective PatchMode constrained by instance_policy.
Sourcepub fn to_installed(&self, instance_policy: PatchMode) -> InstalledAddon
pub fn to_installed(&self, instance_policy: PatchMode) -> InstalledAddon
Converts this persisted record into a public InstalledAddon summary.
Trait Implementations§
Source§impl Clone for InstalledAddonRecord
impl Clone for InstalledAddonRecord
Source§impl Debug for InstalledAddonRecord
impl Debug for InstalledAddonRecord
Source§impl<'de> Deserialize<'de> for InstalledAddonRecord
impl<'de> Deserialize<'de> for InstalledAddonRecord
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 InstalledAddonRecord
impl Freeze for InstalledAddonRecordwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<PistonMetaLibraries>: Freeze,
PhantomData<PistonMetaGenericArgument>: Freeze,
impl Move for InstalledAddonRecord
impl RefUnwindSafe for InstalledAddonRecord
impl Send for InstalledAddonRecord
impl Sync for InstalledAddonRecord
impl Unpin for InstalledAddonRecord
impl UnsafeUnpin for InstalledAddonRecordwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<PistonMetaLibraries>: UnsafeUnpin,
PhantomData<PistonMetaGenericArgument>: UnsafeUnpin,
impl UnwindSafe for InstalledAddonRecordwhere
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