#[non_exhaustive]pub struct Annotation {
pub description: Option<TruncatableString>,
pub attributes: Option<Attributes>,
}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
Sourcepub fn set_description<T: Into<Option<TruncatableString>>>(self, v: T) -> Self
pub fn set_description<T: Into<Option<TruncatableString>>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_attributes<T: Into<Option<Attributes>>>(self, v: T) -> Self
pub fn set_attributes<T: Into<Option<Attributes>>>(self, v: T) -> Self
Sets the value of attributes.
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
Returns a copy 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<'de> Deserialize<'de> for Annotationwhere
Annotation: Default,
impl<'de> Deserialize<'de> for Annotationwhere
Annotation: Default,
Source§fn 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
Source§impl PartialEq for Annotation
impl PartialEq for Annotation
Source§impl Serialize for Annotation
impl Serialize 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