pub struct Annotation { /* private fields */ }Expand description
One protected annotation with independently sourced name and value.
Unlike service metadata labels, annotations can be target-scoped. Their opaque spelling and field provenance remain available for a later target adapter to make that decision explicitly.
Implementations§
Source§impl Annotation
impl Annotation
Sourcepub const fn new(
name: Sourced<Identifier>,
value: Sourced<ProtectedString>,
) -> Self
pub const fn new( name: Sourced<Identifier>, value: Sourced<ProtectedString>, ) -> Self
Creates one annotation with separately retained name and value provenance.
Sourcepub const fn name(&self) -> &Sourced<Identifier>
pub const fn name(&self) -> &Sourced<Identifier>
Returns the opaque annotation name and its provenance.
Sourcepub const fn value(&self) -> &Sourced<ProtectedString>
pub const fn value(&self) -> &Sourced<ProtectedString>
Returns the protected annotation value and its provenance.
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Annotation
impl Debug for Annotation
impl Eq for Annotation
Source§impl PartialEq for Annotation
impl PartialEq 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