pub struct GitHubAppUpdater { /* private fields */ }Expand description
Re-export framework services (HTTP, URI, etc.) from the dedicated services crate. Discovers releases through a repository’s public GitHub release feed.
AppUpdater::check starts the request on a thread of its own and
returns immediately; the outcome arrives later through
set_app_update_status — the same fire-and-forget contract Android’s
JNI-backed updater uses, so an application observing update status cannot
tell which platform answered it.
Implementations§
Source§impl GitHubAppUpdater
impl GitHubAppUpdater
Sourcepub fn new() -> GitHubAppUpdater
pub fn new() -> GitHubAppUpdater
An updater over the framework’s default_http_client.
Sourcepub fn with_client(client: Arc<dyn HttpClient>) -> GitHubAppUpdater
pub fn with_client(client: Arc<dyn HttpClient>) -> GitHubAppUpdater
An updater over a specific client — the seam a test replaces with a
crate::http::StubHttpClient, and the one an application uses to
supply a client of its own. A client the caller built is one the
caller can send with.
Trait Implementations§
Source§impl AppUpdater for GitHubAppUpdater
impl AppUpdater for GitHubAppUpdater
Source§fn capabilities(&self) -> AppUpdateCapabilities
fn capabilities(&self) -> AppUpdateCapabilities
What this backend can do. Read more
Source§fn check(&self, source: &GitHubReleaseUpdate) -> Result<(), AppUpdateError>
fn check(&self, source: &GitHubReleaseUpdate) -> Result<(), AppUpdateError>
Starts release discovery. Progress is published through
set_app_update_status.Source§fn install(&self, package: &UpdatePackage) -> Result<(), AppUpdateError>
fn install(&self, package: &UpdatePackage) -> Result<(), AppUpdateError>
Transfers a package to the platform installer. Read more
Source§impl Default for GitHubAppUpdater
impl Default for GitHubAppUpdater
Source§fn default() -> GitHubAppUpdater
fn default() -> GitHubAppUpdater
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for GitHubAppUpdater
impl !UnwindSafe for GitHubAppUpdater
impl Freeze for GitHubAppUpdater
impl Send for GitHubAppUpdater
impl Sync for GitHubAppUpdater
impl Unpin for GitHubAppUpdater
impl UnsafeUnpin for GitHubAppUpdater
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.