Struct ocipkg::image::annotations::flat::Annotations
source · pub struct Annotations {Show 14 fields
pub created: Option<String>,
pub authors: Option<String>,
pub url: Option<String>,
pub documentation: Option<String>,
pub source: Option<String>,
pub version: Option<String>,
pub revision: Option<String>,
pub vendor: Option<String>,
pub licenses: Option<String>,
pub ref_name: Option<String>,
pub title: Option<String>,
pub description: Option<String>,
pub base_digest: Option<String>,
pub base_name: Option<String>,
}
Expand description
org.opencontainers.image.*
annotations
See Pre-Defined Annotation Keys in OCI image spec.
This is designed to use with JSON
use ocipkg::image::annotations::flat::*;
let a = Annotations::from_json(r#"
{
"org.opencontainers.image.url": "https://github.com/termoshtt/ocipkg"
}
"#).unwrap();
assert_eq!(
a,
Annotations {
url: Some("https://github.com/termoshtt/ocipkg".to_string()),
..Default::default()
}
);
// Dump to JSON
let a = Annotations {
url: Some("https://github.com/termoshtt/ocipkg".to_string()),
..Default::default()
};
assert_eq!(a.to_json().trim(), r#"
{
"org.opencontainers.image.url": "https://github.com/termoshtt/ocipkg"
}
"#.trim());
Fields§
§created: Option<String>
org.opencontainers.image.created
date and time on which the image was built (string, date-time as defined by RFC 3339).
org.opencontainers.image.authors
contact details of the people or organization responsible for the image (freeform string)
url: Option<String>
org.opencontainers.image.url
URL to find more information on the image (string)
documentation: Option<String>
org.opencontainers.image.documentation
URL to get documentation on the image (string)
source: Option<String>
org.opencontainers.image.source
URL to get source code for building the image (string)
version: Option<String>
org.opencontainers.image.version
version of the packaged software
revision: Option<String>
org.opencontainers.image.revision
Source control revision identifier for the packaged software.
vendor: Option<String>
org.opencontainers.image.vendor
Name of the distributing entity, organization or individual.
licenses: Option<String>
org.opencontainers.image.licenses
License(s) under which contained software is distributed as an SPDX License Expression.
ref_name: Option<String>
org.opencontainers.image.ref.name
Name of the reference for a target (string).
title: Option<String>
org.opencontainers.image.title
Human-readable title of the image (string)
description: Option<String>
org.opencontainers.image.description
Human-readable description of the software packaged in the image (string)
base_digest: Option<String>
org.opencontainers.image.base.digest
Digest of the image this image is based on (string)
base_name: Option<String>
org.opencontainers.image.base.name
Annotations reference of the image this image is based on (string)
Implementations§
Trait Implementations§
source§impl Clone for Annotations
impl Clone for Annotations
source§fn clone(&self) -> Annotations
fn clone(&self) -> Annotations
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Annotations
impl Debug for Annotations
source§impl Default for Annotations
impl Default for Annotations
source§fn default() -> Annotations
fn default() -> Annotations
source§impl<'de> Deserialize<'de> for Annotations
impl<'de> Deserialize<'de> for Annotations
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<Annotations> for Annotations
impl From<Annotations> for Annotations
source§fn from(nested: Annotations) -> Self
fn from(nested: Annotations) -> Self
source§impl From<Annotations> for Annotations
impl From<Annotations> for Annotations
source§fn from(flat: Annotations) -> Self
fn from(flat: Annotations) -> Self
source§impl FromIterator<(String, String)> for Annotations
impl FromIterator<(String, String)> for Annotations
source§impl Hash for Annotations
impl Hash for Annotations
source§impl PartialEq for Annotations
impl PartialEq for Annotations
source§fn eq(&self, other: &Annotations) -> bool
fn eq(&self, other: &Annotations) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Annotations
impl Serialize for Annotations
impl Eq for Annotations
impl StructuralPartialEq for Annotations
Auto Trait Implementations§
impl Freeze for Annotations
impl RefUnwindSafe for Annotations
impl Send for Annotations
impl Sync for Annotations
impl Unpin for Annotations
impl UnwindSafe for Annotations
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<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
key
and return true
if they are equal.