pub struct PackageSpec {
pub app_name: &'static str,
pub on_installed: Option<fn()>,
pub on_uninstalling: Option<fn()>,
pub before_apply: Option<fn() -> Result<(), String>>,
pub cli: Option<CliSpec>,
}Expand description
What a package needs from the app.
Fields§
§app_name: &'static strThe app’s directory name, where the last version run is kept: sapphire-journal.
on_installed: Option<fn()>Run once per install: in the install hook on Windows, at the first start elsewhere. It must be safe to run again.
on_uninstalling: Option<fn()>Run before uninstalling, on Windows only (no other OS runs anything): 30 seconds, no window.
before_apply: Option<fn() -> Result<(), String>>Run before any update is applied: stop the app’s background processes. An error stops the update.
cli: Option<CliSpec>The command line to put on PATH, if the app has one.
Trait Implementations§
Source§impl Clone for PackageSpec
impl Clone for PackageSpec
Auto Trait Implementations§
impl Freeze for PackageSpec
impl RefUnwindSafe for PackageSpec
impl Send for PackageSpec
impl Sync for PackageSpec
impl Unpin for PackageSpec
impl UnsafeUnpin for PackageSpec
impl UnwindSafe for PackageSpec
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