pub struct SelfUpdate<'a> { /* private fields */ }
Implementations§
Source§impl<'a> SelfUpdate<'a>
impl<'a> SelfUpdate<'a>
pub fn new(update_service: &'a UpdateService) -> Result<Self, AnyError>
Sourcepub async fn get_current_release(&self) -> Result<Release, AnyError>
pub async fn get_current_release(&self) -> Result<Release, AnyError>
Gets the current release
Sourcepub fn is_up_to_date_with(&self, release: &Release) -> bool
pub fn is_up_to_date_with(&self, release: &Release) -> bool
Gets whether the given release is what this CLI is built against
Sourcepub fn cleanup_old_update(&self) -> Result<(), Error>
pub fn cleanup_old_update(&self) -> Result<(), Error>
Cleans up old self-updated binaries. Should be called with regularity. May fail if old versions are still running.
Auto Trait Implementations§
impl<'a> Freeze for SelfUpdate<'a>
impl<'a> !RefUnwindSafe for SelfUpdate<'a>
impl<'a> Send for SelfUpdate<'a>
impl<'a> Sync for SelfUpdate<'a>
impl<'a> Unpin for SelfUpdate<'a>
impl<'a> !UnwindSafe for SelfUpdate<'a>
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