pub struct EmittedLayer {
pub media_type: String,
pub digest: String,
pub size: u64,
pub diff_id: String,
pub local_path: PathBuf,
pub urls: Option<Vec<String>>,
}Expand description
Locally-produced layer blob staged on disk for push (task 4.E).
Carries everything 4.E needs to upload a layer to a registry: the
media type to advertise on the descriptor, the digest + size of the
compressed blob, the diff_id for the image-config rootfs.diff_ids
array, the on-disk path to the blob, and (for foreign base layers
only) the upstream urls[] mirror list so the emitted manifest can
point Windows daemons at the original MCR foreign-layer descriptor
instead of forcing the daemon to re-download the bytes from the user’s
own registry.
Fields§
§media_type: StringOCI media type used in the manifest’s layers[].mediaType.
For the foreign Windows base layer this is
application/vnd.docker.image.rootfs.foreign.diff.tar.gzip (so
Windows daemons recognise it as a foreign layer and skip the
download path); for builder-produced RUN/COPY/ADD layers this is
application/vnd.oci.image.layer.v1.tar+gzip.
digest: Stringsha256:... digest of the COMPRESSED (gzipped) tar blob.
size: u64Compressed size in bytes (matches the descriptor’s size field).
diff_id: Stringsha256:... of the UNCOMPRESSED tar blob — what
rootfs.diff_ids[] references in the image config. For foreign
base layers this is sourced from the base image config blob; for
builder-produced layers this is computed at export time.
local_path: PathBufOn-disk path to the compressed layer blob the registry client
will upload during the 4.E push. Empty for foreign base layers
(they’re never re-uploaded — the registry rehydrates them from
urls[]).
urls: Option<Vec<String>>For foreign layers: the MCR / mirror URL list preserved verbatim
from the base manifest’s urls[]. None for builder-produced
layers.
Trait Implementations§
Source§impl Clone for EmittedLayer
impl Clone for EmittedLayer
Source§fn clone(&self) -> EmittedLayer
fn clone(&self) -> EmittedLayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for EmittedLayer
impl RefUnwindSafe for EmittedLayer
impl Send for EmittedLayer
impl Sync for EmittedLayer
impl Unpin for EmittedLayer
impl UnsafeUnpin for EmittedLayer
impl UnwindSafe for EmittedLayer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request