pub struct SETUP;Expand description
Implementations§
Source§impl SETUP
impl SETUP
Sourcepub fn register_task_type<T: SetupTask>(&self)
pub fn register_task_type<T: SetupTask>(&self)
Register a custom task type.
Sourcepub fn install(
&self,
config: InstallConfig,
update: Option<UninstallConfig>,
) -> ResponseVar<Result<UninstallConfig, SetupError>>
pub fn install( &self, config: InstallConfig, update: Option<UninstallConfig>, ) -> ResponseVar<Result<UninstallConfig, SetupError>>
Enqueue a new install operation.
This will prepare and commit an install.
Returns a response var that updates once with the result of the operation. If
successful an UninstallConfig, this data can be (de)serialized and used with
to uninstall.
Sourcepub fn prepare_install(
&self,
config: InstallConfig,
update: Option<UninstallConfig>,
) -> ResponseVar<Result<PreparedInstallConfig, SetupError>>
pub fn prepare_install( &self, config: InstallConfig, update: Option<UninstallConfig>, ) -> ResponseVar<Result<PreparedInstallConfig, SetupError>>
Enqueue a new prepare install operation.
This will run all expensive install operations that can run without affecting the system or previous installs. One reason to run this step separate is to begin an update installation while the application is still running.
If update is set the tasks will use it to find and patch/replace a previous install.
Returns a response var that updates once with the result of the operation. If
successful a PreparedInstallConfig, this data can be (de)serialized and used with
to commit_install or cancel_prepared.
Sourcepub fn cancel_prepared(
&self,
config: PreparedInstallConfig,
) -> ResponseVar<Result<(), SetupError>>
pub fn cancel_prepared( &self, config: PreparedInstallConfig, ) -> ResponseVar<Result<(), SetupError>>
Enqueue a prepared install cancellation operation.
Note that prepare_install will automatically cancel if requested. This method cancels
a prepared install that already completed.
Sourcepub fn commit_install(
&self,
config: PreparedInstallConfig,
) -> ResponseVar<Result<UninstallConfig, SetupError>>
pub fn commit_install( &self, config: PreparedInstallConfig, ) -> ResponseVar<Result<UninstallConfig, SetupError>>
Enqueue a new commit prepared install operation.
This operation cannot be canceled once it starts, if cancel is requested while enqueued
the cancel_prepared operation will run instead.
Returns a response var that updates once with the result of the operation. If
successful an UninstallConfig, this data can be (de)serialized and used with
to uninstall.
Sourcepub fn uninstall(
&self,
config: UninstallConfig,
) -> ResponseVar<Result<(), SetupError>>
pub fn uninstall( &self, config: UninstallConfig, ) -> ResponseVar<Result<(), SetupError>>
Enqueue a new uninstall operation.
This will quickly validate the installation and uninstall. During uninstall the operation cannot be canceled.
Returns a response var that updates once with the result of the operation.
Sourcepub fn validate_uninstall(
&self,
config: UninstallConfig,
) -> ResponseVar<Result<UninstallConfig, SetupError>>
pub fn validate_uninstall( &self, config: UninstallConfig, ) -> ResponseVar<Result<UninstallConfig, SetupError>>
Enqueue a new validate uninstall config operation.
This will verify that the uninstall config can still be used to uninstall.
Returns a response var that updates once with the result of the operation. If successful the config data is returned, potentially corrected if recoverable issues where found.
Sourcepub fn status(&self) -> Var<SetupStatus>
pub fn status(&self) -> Var<SetupStatus>
Status of running operation.
Auto Trait Implementations§
impl Freeze for SETUP
impl RefUnwindSafe for SETUP
impl Send for SETUP
impl Sync for SETUP
impl Unpin for SETUP
impl UnsafeUnpin for SETUP
impl UnwindSafe for SETUP
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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