pub struct UpdateState {
pub available: Option<String>,
pub headline: Option<String>,
pub hint: &'static str,
}Expand description
Update availability state.
hint defaults to "" via #[derive(Default)]. In practice App::new()
always overwrites it with the detected install method, so the empty default
is only visible when constructing UpdateState in isolation (e.g. tests).
Fields§
§available: Option<String>Available version string (None if up to date or unchecked).
headline: Option<String>Update announcement headline.
hint: &'static strUpdate hint string (install command suggestion).
Implementations§
Source§impl UpdateState
impl UpdateState
Sourcepub fn with_current_hint() -> Self
pub fn with_current_hint() -> Self
Construct with the current install-method hint detected at runtime.
Trait Implementations§
Source§impl Default for UpdateState
impl Default for UpdateState
Source§fn default() -> UpdateState
fn default() -> UpdateState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UpdateState
impl RefUnwindSafe for UpdateState
impl Send for UpdateState
impl Sync for UpdateState
impl Unpin for UpdateState
impl UnsafeUnpin for UpdateState
impl UnwindSafe for UpdateState
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> 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