pub struct UpdatePackage { /* private fields */ }
Expand description
An open handle to an “update” package.
Implementations§
Source§impl UpdatePackage
impl UpdatePackage
Sourcepub fn new(proxy: DirectoryProxy) -> Self
pub fn new(proxy: DirectoryProxy) -> Self
Creates a new UpdatePackage
with the given proxy.
Sourcepub async fn verify_name(&self) -> Result<(), VerifyNameError>
pub async fn verify_name(&self) -> Result<(), VerifyNameError>
Verifies that the package’s name/variant is “update/0”.
Sourcepub async fn images_metadata(
&self,
) -> Result<ImagesMetadata, ImagePackagesError>
pub async fn images_metadata( &self, ) -> Result<ImagesMetadata, ImagePackagesError>
Loads the image packages manifest, or determines that it is not present.
Sourcepub async fn verify_board(&self, contents: &str) -> Result<(), VerifyBoardError>
pub async fn verify_board(&self, contents: &str) -> Result<(), VerifyBoardError>
Verifies the board file has the given contents
.
Sourcepub async fn update_mode(
&self,
) -> Result<Option<UpdateMode>, ParseUpdateModeError>
pub async fn update_mode( &self, ) -> Result<Option<UpdateMode>, ParseUpdateModeError>
Parses the update-mode file to obtain update mode. Returns Ok(None)
if the update-mode
file is not present in the update package.
Sourcepub async fn packages(
&self,
) -> Result<Vec<PinnedAbsolutePackageUrl>, ParsePackageError>
pub async fn packages( &self, ) -> Result<Vec<PinnedAbsolutePackageUrl>, ParsePackageError>
Returns the list of package urls that go in the universe of this update package.
Sourcepub async fn hash(&self) -> Result<Hash, HashError>
pub async fn hash(&self) -> Result<Hash, HashError>
Returns the package hash of this update package.
Sourcepub async fn version(&self) -> Result<SystemVersion, ReadVersionError>
pub async fn version(&self) -> Result<SystemVersion, ReadVersionError>
Returns the version of this update package.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UpdatePackage
impl !RefUnwindSafe for UpdatePackage
impl Send for UpdatePackage
impl Sync for UpdatePackage
impl Unpin 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