pub struct AutoApplyUpgrader { /* private fields */ }Expand description
Auto-apply upgrader with archive support.
Implementations§
Source§impl AutoApplyUpgrader
impl AutoApplyUpgrader
Sourcepub fn current_version(&self) -> &Version
pub fn current_version(&self) -> &Version
Get the current version.
Sourcepub fn current_binary_path() -> Result<PathBuf>
pub fn current_binary_path() -> Result<PathBuf>
Get the path to the currently running binary.
§Errors
Returns an error if the binary path cannot be determined.
Sourcepub async fn apply_upgrade(&self, info: &UpgradeInfo) -> Result<UpgradeResult>
pub async fn apply_upgrade(&self, info: &UpgradeInfo) -> Result<UpgradeResult>
Perform the complete auto-apply upgrade workflow.
§Arguments
info- Upgrade information from the monitor
§Returns
Returns UpgradeResult::Success and triggers a restart on success.
Returns UpgradeResult::RolledBack if any step fails.
§Errors
Returns an error only for critical failures where rollback also fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AutoApplyUpgrader
impl !RefUnwindSafe for AutoApplyUpgrader
impl Send for AutoApplyUpgrader
impl Sync for AutoApplyUpgrader
impl Unpin for AutoApplyUpgrader
impl UnsafeUnpin for AutoApplyUpgrader
impl !UnwindSafe for AutoApplyUpgrader
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more