pub struct UpdateState { /* private fields */ }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).
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.
pub fn available(&self) -> Option<&String>
pub fn headline(&self) -> Option<&str>
pub fn hint(&self) -> &'static str
pub fn announce(&mut self, version: String, headline: Option<String>)
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