pub struct PatchRegistry { /* private fields */ }Expand description
Registry for managing patches
Implementations§
Source§impl PatchRegistry
impl PatchRegistry
pub fn new(expected_interface_version: Version, expected_type_hash: u64) -> Self
Sourcepub fn load(&self, path: &str) -> Result<()>
pub fn load(&self, path: &str) -> Result<()>
Load a patch from the specified path
This performs a transactional load with the following steps:
- Load the dynamic library
- Validate ABI/version compatibility
- Execute entry point (if present)
- On success, atomically swap the active patch
- On failure at any step, rollback and return error
Sourcepub fn rollback(&self) -> Result<()>
pub fn rollback(&self) -> Result<()>
Rollback to the previous patch
Restores the most recent patch from history. This is an atomic operation.
Sourcepub fn active_patch(&self) -> Option<PatchInfo>
pub fn active_patch(&self) -> Option<PatchInfo>
Get the currently active patch
Sourcepub fn history(&self) -> Vec<PatchRecord>
pub fn history(&self) -> Vec<PatchRecord>
Get the patch history
Auto Trait Implementations§
impl Freeze for PatchRegistry
impl RefUnwindSafe for PatchRegistry
impl Send for PatchRegistry
impl Sync for PatchRegistry
impl Unpin for PatchRegistry
impl UnwindSafe for PatchRegistry
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