Struct Annotation
pub struct Annotation { /* private fields */ }Expand description
An OCI annotation key/value pair.
Implementations§
§impl Annotation
impl Annotation
pub fn new(
key: impl AsRef<str>,
value: impl AsRef<str>,
) -> Result<Annotation, AnnotationError>
pub fn new( key: impl AsRef<str>, value: impl AsRef<str>, ) -> Result<Annotation, AnnotationError>
Creates an annotation.
pub fn title(value: impl AsRef<str>) -> Result<Annotation, AnnotationError>
pub fn title(value: impl AsRef<str>) -> Result<Annotation, AnnotationError>
Creates an OCI title annotation.
pub fn description(
value: impl AsRef<str>,
) -> Result<Annotation, AnnotationError>
pub fn description( value: impl AsRef<str>, ) -> Result<Annotation, AnnotationError>
Creates an OCI description annotation.
pub fn source(value: impl AsRef<str>) -> Result<Annotation, AnnotationError>
pub fn source(value: impl AsRef<str>) -> Result<Annotation, AnnotationError>
Creates an OCI source annotation.
pub const fn key(&self) -> &AnnotationKey
pub const fn key(&self) -> &AnnotationKey
Returns the key.
pub const fn value(&self) -> &AnnotationValue
pub const fn value(&self) -> &AnnotationValue
Returns the value.
Trait Implementations§
§impl Clone for Annotation
impl Clone for Annotation
§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
Returns a duplicate 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 more§impl Debug for Annotation
impl Debug for Annotation
§impl Display for Annotation
impl Display for Annotation
§impl Hash for Annotation
impl Hash for Annotation
§impl Ord for Annotation
impl Ord for Annotation
§impl PartialEq for Annotation
impl PartialEq for Annotation
§impl PartialOrd for Annotation
impl PartialOrd for Annotation
impl Eq for Annotation
impl StructuralPartialEq for Annotation
Auto Trait Implementations§
impl Freeze for Annotation
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnsafeUnpin for Annotation
impl UnwindSafe for Annotation
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