#[non_exhaustive]pub struct Annotation {
pub description: Option<TruncatableString>,
pub attributes: Option<Attributes>,
/* private fields */
}Expand description
Text annotation with a set of attributes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.description: Option<TruncatableString>A user-supplied message describing the event. The maximum length for the description is 256 bytes.
attributes: Option<Attributes>A set of attributes on the annotation. You can have up to 4 attributes per Annotation.
Implementations§
Source§impl Annotation
impl Annotation
pub fn new() -> Self
Sourcepub fn set_description<T>(self, v: T) -> Selfwhere
T: Into<TruncatableString>,
pub fn set_description<T>(self, v: T) -> Selfwhere
T: Into<TruncatableString>,
Sets the value of description.
§Example
ⓘ
use google_cloud_trace_v2::model::TruncatableString;
let x = Annotation::new().set_description(TruncatableString::default()/* use setters */);Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Selfwhere
T: Into<TruncatableString>,
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Selfwhere
T: Into<TruncatableString>,
Sets or clears the value of description.
§Example
ⓘ
use google_cloud_trace_v2::model::TruncatableString;
let x = Annotation::new().set_or_clear_description(Some(TruncatableString::default()/* use setters */));
let x = Annotation::new().set_or_clear_description(None::<TruncatableString>);Sourcepub fn set_attributes<T>(self, v: T) -> Selfwhere
T: Into<Attributes>,
pub fn set_attributes<T>(self, v: T) -> Selfwhere
T: Into<Attributes>,
Sets the value of attributes.
§Example
ⓘ
use google_cloud_trace_v2::model::span::Attributes;
let x = Annotation::new().set_attributes(Attributes::default()/* use setters */);Sourcepub fn set_or_clear_attributes<T>(self, v: Option<T>) -> Selfwhere
T: Into<Attributes>,
pub fn set_or_clear_attributes<T>(self, v: Option<T>) -> Selfwhere
T: Into<Attributes>,
Sets or clears the value of attributes.
§Example
ⓘ
use google_cloud_trace_v2::model::span::Attributes;
let x = Annotation::new().set_or_clear_attributes(Some(Attributes::default()/* use setters */));
let x = Annotation::new().set_or_clear_attributes(None::<Attributes>);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 · 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
Source§impl Default for Annotation
impl Default for Annotation
Source§fn default() -> Annotation
fn default() -> Annotation
Returns the “default value” for a type. Read more
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 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