pub struct UpdateBuilder { /* private fields */ }Expand description
Builder for a restart Update.
Configure the inner ReleaseUpdate backend and an optional guard
environment variable, then call build to produce a
Box<dyn ReleaseUpdate> that re-executes the process after a successful
update.
Implementations§
Source§impl UpdateBuilder
impl UpdateBuilder
Sourcepub fn release_update(
&mut self,
release_update: Box<dyn ReleaseUpdate>,
) -> &mut Self
pub fn release_update( &mut self, release_update: Box<dyn ReleaseUpdate>, ) -> &mut Self
Set the release update implementation to wrap. Required.
Sourcepub fn guard_env(&mut self, env: &str) -> &mut Self
pub fn guard_env(&mut self, env: &str) -> &mut Self
Set the guard environment variable name used to prevent restart loops.
Defaults to RESTART_GUARD.
Sourcepub fn build(&mut self) -> Result<Box<dyn ReleaseUpdate>>
pub fn build(&mut self) -> Result<Box<dyn ReleaseUpdate>>
Confirm config and create a ready-to-use Update.
- Errors:
- Config -
release_updatewas not provided
- Config -
Trait Implementations§
Source§impl Default for UpdateBuilder
impl Default for UpdateBuilder
Source§fn default() -> UpdateBuilder
fn default() -> UpdateBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for UpdateBuilder
impl !Send for UpdateBuilder
impl !Sync for UpdateBuilder
impl !UnwindSafe for UpdateBuilder
impl Freeze for UpdateBuilder
impl Unpin for UpdateBuilder
impl UnsafeUnpin for UpdateBuilder
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