Struct oci_client::client::ImageLayer
source · pub struct ImageLayer {
pub data: Vec<u8>,
pub media_type: String,
pub annotations: Option<BTreeMap<String, String>>,
}
Expand description
The data and media type for an image layer
Fields§
§data: Vec<u8>
The data of this layer
media_type: String
The media type of this layer
annotations: Option<BTreeMap<String, String>>
This OPTIONAL property contains arbitrary metadata for this descriptor. This OPTIONAL property MUST use the annotation rules
Implementations§
source§impl ImageLayer
impl ImageLayer
sourcepub fn new(
data: Vec<u8>,
media_type: String,
annotations: Option<BTreeMap<String, String>>,
) -> Self
pub fn new( data: Vec<u8>, media_type: String, annotations: Option<BTreeMap<String, String>>, ) -> Self
Constructs a new ImageLayer struct with provided data and media type
sourcepub fn oci_v1(
data: Vec<u8>,
annotations: Option<BTreeMap<String, String>>,
) -> Self
pub fn oci_v1( data: Vec<u8>, annotations: Option<BTreeMap<String, String>>, ) -> Self
Constructs a new ImageLayer struct with provided data and media type application/vnd.oci.image.layer.v1.tar
sourcepub fn oci_v1_gzip(
data: Vec<u8>,
annotations: Option<BTreeMap<String, String>>,
) -> Self
pub fn oci_v1_gzip( data: Vec<u8>, annotations: Option<BTreeMap<String, String>>, ) -> Self
Constructs a new ImageLayer struct with provided data and media type application/vnd.oci.image.layer.v1.tar+gzip
sourcepub fn sha256_digest(&self) -> String
pub fn sha256_digest(&self) -> String
Helper function to compute the sha256 digest of an image layer
Trait Implementations§
source§impl Clone for ImageLayer
impl Clone for ImageLayer
source§fn clone(&self) -> ImageLayer
fn clone(&self) -> ImageLayer
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 ImageLayer
impl Debug for ImageLayer
source§impl Hash for ImageLayer
impl Hash for ImageLayer
source§impl PartialEq for ImageLayer
impl PartialEq for ImageLayer
impl Eq for ImageLayer
impl StructuralPartialEq for ImageLayer
Auto Trait Implementations§
impl Freeze for ImageLayer
impl RefUnwindSafe for ImageLayer
impl Send for ImageLayer
impl Sync for ImageLayer
impl Unpin for ImageLayer
impl UnwindSafe for ImageLayer
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
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.