[][src]Struct google_chat1::Annotation

pub struct Annotation {
    pub user_mention: Option<UserMentionMetadata>,
    pub type_: Option<String>,
    pub length: Option<i32>,
    pub start_index: Option<i32>,
}

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

impl Clone for Annotation[src]

impl Debug for Annotation[src]

impl Default for Annotation[src]

impl<'de> Deserialize<'de> for Annotation[src]

impl Part for Annotation[src]

impl Serialize for Annotation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any