pub struct Updater { /* private fields */ }Implementations§
Source§impl Updater
impl Updater
pub fn new() -> Self
pub fn poll(&mut self) -> Option<UpdateStatus>
pub fn check_for_updates(&mut self)
pub fn is_update_available( current_version: &Version, release: &ReleaseInfo, ) -> Result<bool, Error>
pub fn do_check() -> Result<Option<ReleaseInfo>, UpdaterError>
pub fn start_download(&mut self, info: ReleaseInfo)
pub fn do_download( info: &ReleaseInfo, tx: Sender<UpdateStatus>, ) -> Result<PathBuf, UpdaterError>
Sourcepub fn apply_update(path: &Path) -> Result<(), UpdaterError>
pub fn apply_update(path: &Path) -> Result<(), UpdaterError>
Apply the update by replacing executable and dynamic library files.
§Errors
Returns an error if the replacement fails.
pub fn replace_file(source: &Path, target: &Path) -> Result<(), UpdaterError>
pub fn do_cleanup_leftovers(current_exe: &Path) -> Result<(), UpdaterError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Updater
impl RefUnwindSafe for Updater
impl Send for Updater
impl !Sync for Updater
impl Unpin for Updater
impl UnsafeUnpin for Updater
impl UnwindSafe for Updater
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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