Struct Annotation
pub struct Annotation { /* private fields */ }Expand description
A single annotation key-value pair.
Implementations§
§impl Annotation
impl Annotation
pub const fn new(key: AnnotationKey, value: AnnotationValue) -> Annotation
pub const fn new(key: AnnotationKey, value: AnnotationValue) -> Annotation
Creates an annotation from a key and value.
pub const fn key(&self) -> &AnnotationKey
pub const fn key(&self) -> &AnnotationKey
Returns the annotation key.
pub const fn value(&self) -> &AnnotationValue
pub const fn value(&self) -> &AnnotationValue
Returns the annotation value.
pub fn into_parts(self) -> (AnnotationKey, AnnotationValue)
pub fn into_parts(self) -> (AnnotationKey, AnnotationValue)
Splits the annotation into its key and 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 PartialEq for Annotation
impl PartialEq 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