Struct ocipkg::image::annotations::nested::Annotations
source · [−]pub struct Annotations {Show 13 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 title: Option<String>,
pub description: Option<String>,
pub ref: Option<Ref>,
pub base: Option<Base>,
}
Expand description
org.opencontainers.image.*
annotations
See Pre-Defined Annotation Keys in OCI image spec.
This is designed to use with TOML:
use ocipkg::image::annotations::nested::*;
// Read TOML
let a = Annotations::from_toml(
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 TOML
let a = Annotations {
url: Some("https://github.com/termoshtt/ocipkg".to_string()),
..Default::default()
};
assert_eq!(
a.to_toml().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.
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)
ref: Option<Ref>
org.opencontainers.image.ref.*
components
base: Option<Base>
org.opencontainers.image.base.*
components
Implementations
Trait Implementations
sourceimpl Clone for Annotations
impl Clone for Annotations
sourcefn clone(&self) -> Annotations
fn clone(&self) -> Annotations
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Annotations
impl Debug for Annotations
sourceimpl Default for Annotations
impl Default for Annotations
sourcefn default() -> Annotations
fn default() -> Annotations
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for Annotations
impl<'de> Deserialize<'de> for Annotations
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Annotations> for Annotations
impl From<Annotations> for Annotations
sourcefn from(nested: Annotations) -> Self
fn from(nested: Annotations) -> Self
Converts to this type from the input type.
sourceimpl From<Annotations> for Annotations
impl From<Annotations> for Annotations
sourcefn from(flat: Annotations) -> Self
fn from(flat: Annotations) -> Self
Converts to this type from the input type.
sourceimpl Hash for Annotations
impl Hash for Annotations
sourceimpl PartialEq<Annotations> for Annotations
impl PartialEq<Annotations> for Annotations
sourcefn eq(&self, other: &Annotations) -> bool
fn eq(&self, other: &Annotations) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Annotations) -> bool
fn ne(&self, other: &Annotations) -> bool
This method tests for !=
.
sourceimpl Serialize for Annotations
impl Serialize for Annotations
impl Eq for Annotations
impl StructuralEq for Annotations
impl StructuralPartialEq for Annotations
Auto Trait Implementations
impl RefUnwindSafe for Annotations
impl Send for Annotations
impl Sync for Annotations
impl Unpin for Annotations
impl UnwindSafe for Annotations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more