pub struct UpdateInfo { /* private fields */ }Expand description
Result of an update check — contains the latest release and comparison info.
Implementations§
Source§impl UpdateInfo
impl UpdateInfo
Sourcepub fn current_version(&self) -> Option<&str>
pub fn current_version(&self) -> Option<&str>
Returns the current version that was compared against, if any was provided.
Sourcepub fn has_update(&self) -> bool
pub fn has_update(&self) -> bool
Returns true if an update is recommended.
This is true when:
- No
current_versionwas set (any release is “new”), or - The latest version is strictly greater than the current version
(compared via
semverwhen both parse, otherwise lexicographically).
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 (const: unstable) · 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 UnsafeUnpin 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