pub enum InstallMethod {
Portable,
MsiInstaller,
MacOsApp,
PackageManager {
name: String,
upgrade_cmd: String,
},
SourceBuild,
Unknown,
}Expand description
How Smriti was installed on this machine.
Several variants are only constructed on specific target OSes
(MsiInstaller on Windows, MacOsApp on macOS); allow dead-code
at the type level so non-target-OS builds don’t fail -D warnings.
Variants§
Portable
Self-contained binary — AppImage on Linux, portable zip on
Windows, or the tar.gz unpacked anywhere. self_replace can
atomically swap the running binary with a newly-downloaded one.
MsiInstaller
Installed via a Windows MSI. The self-replace path invokes msiexec on the newly-downloaded MSI with a UAC prompt.
MacOsApp
macOS .app bundle in /Applications. The self-replace path
downloads the new .dmg and opens it so the user can drag the
new bundle in. Automating the copy is fragile under Gatekeeper
- SIP, especially before notarization is set up.
PackageManager
System package manager owns the binary. We show the matching upgrade command in the banner instead of downloading.
SourceBuild
Running a cargo build binary from the source tree. Show a
git pull && cargo build --release hint.
Unknown
Couldn’t tell. Falls back to opening the release page in the user’s browser.
Trait Implementations§
Source§impl Clone for InstallMethod
impl Clone for InstallMethod
Source§fn clone(&self) -> InstallMethod
fn clone(&self) -> InstallMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstallMethod
impl Debug for InstallMethod
Source§impl PartialEq for InstallMethod
impl PartialEq for InstallMethod
Source§fn eq(&self, other: &InstallMethod) -> bool
fn eq(&self, other: &InstallMethod) -> bool
self and other values to be equal, and is used by ==.impl Eq for InstallMethod
impl StructuralPartialEq for InstallMethod
Auto Trait Implementations§
impl Freeze for InstallMethod
impl RefUnwindSafe for InstallMethod
impl Send for InstallMethod
impl Sync for InstallMethod
impl Unpin for InstallMethod
impl UnsafeUnpin for InstallMethod
impl UnwindSafe for InstallMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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