pub struct FakeUpdatePackage { /* private fields */ }Expand description
A fake update_package::UpdatePackage backed by a temp dir.
Implementations§
Source§impl FakeUpdatePackage
impl FakeUpdatePackage
Methods from Deref<Target = UpdatePackage>§
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<GenericDigest<FuchsiaMerkleMarker>, HashError>
pub async fn hash( &self, ) -> Result<GenericDigest<FuchsiaMerkleMarker>, 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 FakeUpdatePackage
impl !RefUnwindSafe for FakeUpdatePackage
impl Send for FakeUpdatePackage
impl Sync for FakeUpdatePackage
impl Unpin for FakeUpdatePackage
impl !UnwindSafe for FakeUpdatePackage
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§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>
§impl<T> IntoAny for T
impl<T> IntoAny for T
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.