#[non_exhaustive]pub enum ReleaseStatus {
UpToDate,
Updated(Release),
}Expand description
The richer result of update_extended (and its async sibling
update_extended_async): it carries the full Release that was installed.
This is the extended counterpart of VersionStatus, the lightweight
result of update which carries only the version tag. Reach for
ReleaseStatus when you need the installed release’s details (name, date, body, assets); reach
for VersionStatus when the version string is all you need. Convert with
into_version_status.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
Source§impl ReleaseStatus
impl ReleaseStatus
Sourcepub fn into_version_status(self, current_version: String) -> VersionStatus
pub fn into_version_status(self, current_version: String) -> VersionStatus
Turn the extended information into the crate’s standard VersionStatus enum
Sourcepub fn is_up_to_date(&self) -> bool
pub fn is_up_to_date(&self) -> bool
Returns true if ReleaseStatus::UpToDate
Sourcepub fn is_updated(&self) -> bool
pub fn is_updated(&self) -> bool
Returns true if ReleaseStatus::Updated
Sourcepub fn updated_release(&self) -> Option<&Release>
pub fn updated_release(&self) -> Option<&Release>
The Release that was installed, or None if already up to date.
Convenience accessor so callers can read the installed release without a
match (which #[non_exhaustive] would force a wildcard arm onto).
Sourcepub fn into_updated_release(self) -> Option<Release>
pub fn into_updated_release(self) -> Option<Release>
Consume the status and return the installed Release, or None if already up to date.
Sourcepub fn version(&self) -> Option<&str>
pub fn version(&self) -> Option<&str>
The installed release’s version, or None when already up to date.
Mirrors VersionStatus::version, but returns None on the
UpToDate arm (which, unlike VersionStatus::UpToDate, carries no version string).
Trait Implementations§
Source§impl Clone for ReleaseStatus
impl Clone for ReleaseStatus
Source§fn clone(&self) -> ReleaseStatus
fn clone(&self) -> ReleaseStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ReleaseStatus
impl RefUnwindSafe for ReleaseStatus
impl Send for ReleaseStatus
impl Sync for ReleaseStatus
impl Unpin for ReleaseStatus
impl UnsafeUnpin for ReleaseStatus
impl UnwindSafe for ReleaseStatus
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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