pub struct Downloaded { /* private fields */ }Expand description
A package Update::download downloaded and verified.
Implementations§
Source§impl Downloaded
impl Downloaded
Sourcepub async fn install(self) -> Result<(), Error>
pub async fn install(self) -> Result<(), Error>
Installs the package over the running application.
The new version runs once the application starts again. On macOS
the .app bundle and on Linux the AppImage are replaced, and the
application keeps running.
On Windows the installer replaces the running program, and
cargo-packager-updater 0.2.3 ends the process with
std::process::exit(0) once it has started it. So the application
closes first, as Quit closes it: this returns Ok(()) at once, the
windows close, the server is given its time to finish the requests
it is answering, and the installer starts after that, as the last
thing App::run does. When the installer cannot
start, App::run returns the error.
§Errors
Fails when the package cannot be installed, and on Windows when no application is running or its event loop has ended.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Downloaded
impl RefUnwindSafe for Downloaded
impl Send for Downloaded
impl Sync for Downloaded
impl Unpin for Downloaded
impl UnsafeUnpin for Downloaded
impl UnwindSafe for Downloaded
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.