#[non_exhaustive]pub struct Emoji {
pub content: Option<Content>,
/* private fields */
}Expand description
An emoji that is used as a reaction to a message.
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.content: Option<Content>Required. The content of the emoji.
Implementations§
Source§impl Emoji
impl Emoji
Sourcepub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
pub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
Sourcepub fn unicode(&self) -> Option<&String>
pub fn unicode(&self) -> Option<&String>
The value of content
if it holds a Unicode, None if the field is not set or
holds a different branch.
Sourcepub fn set_unicode<T: Into<String>>(self, v: T) -> Self
pub fn set_unicode<T: Into<String>>(self, v: T) -> Self
Sourcepub fn custom_emoji(&self) -> Option<&Box<CustomEmoji>>
pub fn custom_emoji(&self) -> Option<&Box<CustomEmoji>>
The value of content
if it holds a CustomEmoji, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_emoji<T: Into<Box<CustomEmoji>>>(self, v: T) -> Self
pub fn set_custom_emoji<T: Into<Box<CustomEmoji>>>(self, v: T) -> Self
Sets the value of content
to hold a CustomEmoji.
Note that all the setters affecting content are
mutually exclusive.
§Example
ⓘ
use google_chat_v1::model::CustomEmoji;
let x = Emoji::new().set_custom_emoji(CustomEmoji::default()/* use setters */);
assert!(x.custom_emoji().is_some());
assert!(x.unicode().is_none());Trait Implementations§
impl StructuralPartialEq for Emoji
Auto Trait Implementations§
impl Freeze for Emoji
impl RefUnwindSafe for Emoji
impl Send for Emoji
impl Sync for Emoji
impl Unpin for Emoji
impl UnsafeUnpin for Emoji
impl UnwindSafe for Emoji
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