Struct google_chat1::Annotation
source · pub struct Annotation {
pub user_mention: Option<UserMentionMetadata>,
pub type_: Option<String>,
pub length: Option<i32>,
pub start_index: Option<i32>,
}
Expand description
Annotations associated with the plain-text body of the message.
Example plain-text message body:
Hello @FooBot how are you!"
The corresponding annotations metadata:
"annotations":[{
"type":"USER_MENTION",
"startIndex":6,
"length":7,
"userMention": {
"user": {
"name":"users/107946847022116401880",
"displayName":"FooBot",
"avatarUrl":"https://goo.gl/aeDtrS",
"type":"BOT"
},
"type":"MENTION"
}
}]
This type is not used in any activity, and only used as part of another schema.
Fields
user_mention: Option<UserMentionMetadata>
The metadata of user mention.
type_: Option<String>
The type of this annotation.
length: Option<i32>
Length of the substring in the plain-text message body this annotation corresponds to.
start_index: Option<i32>
Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
Trait Implementations
sourceimpl Clone for Annotation
impl Clone for Annotation
sourcefn clone(&self) -> Annotation
fn clone(&self) -> Annotation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Annotation
impl Debug for Annotation
sourceimpl Default for Annotation
impl Default for Annotation
sourcefn default() -> Annotation
fn default() -> Annotation
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for Annotation
impl<'de> Deserialize<'de> for Annotation
sourcefn 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
sourceimpl Serialize for Annotation
impl Serialize for Annotation
impl Part for Annotation
Auto Trait Implementations
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnwindSafe for Annotation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more