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 copy 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)