pub struct UpdateInfo {
pub current_version: String,
pub latest_version: String,
pub install_method: String,
pub current_git_hash: Option<String>,
}Expand description
Information about an available update.
Fields§
§current_version: StringCurrent installed version.
latest_version: StringLatest available version.
install_method: StringHow mi6 was installed.
current_git_hash: Option<String>Current git commit hash (8 chars) for source installs.
Implementations§
Source§impl UpdateInfo
impl UpdateInfo
Sourcepub fn notification_messages(&self) -> Vec<String>
pub fn notification_messages(&self) -> Vec<String>
Format user-friendly update notification messages.
Returns two messages:
- “Update available:
-> ” - “Upgrade using
mi6 upgrade”
For source installs, uses 8-character commit hashes. For other installs, uses version numbers with “v” prefix.
Trait Implementations§
Source§impl Clone for UpdateInfo
impl Clone for UpdateInfo
Source§fn clone(&self) -> UpdateInfo
fn clone(&self) -> UpdateInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UpdateInfo
impl RefUnwindSafe for UpdateInfo
impl Send for UpdateInfo
impl Sync for UpdateInfo
impl Unpin for UpdateInfo
impl UnwindSafe for UpdateInfo
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