pub struct ImageMetadata { /* private fields */ }Expand description
Metadata necessary to determine if a payload matches an image without needing to have the actual image.
Implementations§
Source§impl ImageMetadata
impl ImageMetadata
Sourcepub fn new(size: u64, sha256: Sha256, url: AbsoluteComponentUrl) -> Self
pub fn new(size: u64, sha256: Sha256, url: AbsoluteComponentUrl) -> Self
Returns new image metadata that designates the given size and hash, which can be found
at the given url.
Sourcepub fn url(&self) -> &AbsoluteComponentUrl
pub fn url(&self) -> &AbsoluteComponentUrl
Returns the url of the image.
Sourcepub fn for_path(
path: &Utf8Path,
url: PinnedAbsolutePackageUrl,
resource: String,
) -> Result<Self, ImageMetadataError>
pub fn for_path( path: &Utf8Path, url: PinnedAbsolutePackageUrl, resource: String, ) -> Result<Self, ImageMetadataError>
Compute the size and hash for the image file located at path, determining the image’s
fuchsia-pkg URL using the given base url and resource path within the package.
Trait Implementations§
Source§impl Clone for ImageMetadata
impl Clone for ImageMetadata
Source§fn clone(&self) -> ImageMetadata
fn clone(&self) -> ImageMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageMetadata
impl Debug for ImageMetadata
Source§impl PartialEq for ImageMetadata
impl PartialEq for ImageMetadata
impl Eq for ImageMetadata
impl StructuralPartialEq for ImageMetadata
Auto Trait Implementations§
impl Freeze for ImageMetadata
impl RefUnwindSafe for ImageMetadata
impl Send for ImageMetadata
impl Sync for ImageMetadata
impl Unpin for ImageMetadata
impl UnwindSafe for ImageMetadata
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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>
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