pub struct UpdatePackage {
pub version: String,
pub download_url: String,
pub size: Option<u64>,
pub digest: Option<PackageDigest>,
pub notes: Option<String>,
}Expand description
A package an update would install.
Fields§
§version: StringThe version this package installs.
download_url: StringWhere the package is downloaded from.
size: Option<u64>How large it is, when the release feed says.
digest: Option<PackageDigest>What its bytes must hash to.
None means the release feed published none, and
install_app_update refuses such a package: the platform’s own
signature check catches a package signed by someone else, but not one
that arrived corrupted, and this is the one download that replaces the
application. A feed with no digest is a feed to fix.
notes: Option<String>Release notes, when the feed carries them.
Implementations§
Source§impl UpdatePackage
impl UpdatePackage
Sourcepub fn new(version: impl Into<String>, download_url: impl Into<String>) -> Self
pub fn new(version: impl Into<String>, download_url: impl Into<String>) -> Self
A package at download_url installing version.
pub fn with_size(self, size: u64) -> Self
pub fn with_digest(self, digest: PackageDigest) -> Self
pub fn with_notes(self, notes: impl Into<String>) -> Self
Sourcepub fn is_verifiable(&self) -> bool
pub fn is_verifiable(&self) -> bool
Whether this package can be checked against what the feed promised.
Trait Implementations§
Source§impl Clone for UpdatePackage
impl Clone for UpdatePackage
Source§impl Debug for UpdatePackage
impl Debug for UpdatePackage
Source§impl Default for UpdatePackage
impl Default for UpdatePackage
impl Eq for UpdatePackage
Source§impl Hash for UpdatePackage
impl Hash for UpdatePackage
Source§impl PartialEq for UpdatePackage
impl PartialEq for UpdatePackage
impl StructuralPartialEq for UpdatePackage
Auto Trait Implementations§
impl Freeze for UpdatePackage
impl RefUnwindSafe for UpdatePackage
impl Send for UpdatePackage
impl Sync for UpdatePackage
impl Unpin for UpdatePackage
impl UnsafeUnpin for UpdatePackage
impl UnwindSafe for UpdatePackage
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