pub struct Checker { /* private fields */ }Expand description
Throttled release checker.
Implementations§
Source§impl Checker
impl Checker
Sourcepub fn should_check(&self) -> bool
pub fn should_check(&self) -> bool
Is a check due?
Sourcepub async fn newer_release(&self) -> Result<Option<LatestRelease>>
pub async fn newer_release(&self) -> Result<Option<LatestRelease>>
Ask the forge now: is there a release newer than this build?
Unlike Checker::cached_update this is not throttled, because the
caller is an operator who just pressed a button and is owed an answer
about the state of the world rather than about the last time magi
looked.
Sourcepub fn cached_update(&self) -> Option<LatestRelease>
pub fn cached_update(&self) -> Option<LatestRelease>
A newer release already known from a previous run.
One-line “a newer version exists” banner.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Checker
impl RefUnwindSafe for Checker
impl Send for Checker
impl Sync for Checker
impl Unpin for Checker
impl UnsafeUnpin for Checker
impl UnwindSafe for Checker
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
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> ⓘ
Converts
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> ⓘ
Converts
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