#[non_exhaustive]pub enum InputMessageContent<'a> {
Text(Text<'a>),
Location(Location),
Venue(Venue<'a>),
Contact(Contact<'a>),
}Expand description
Represents InputMessageContext.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text(Text<'a>)
A text message.
Location(Location)
A location.
Venue(Venue<'a>)
A venue.
Contact(Contact<'a>)
A contact.
Implementations§
Source§impl<'a> InputMessageContent<'a>
impl<'a> InputMessageContent<'a>
Sourcepub fn expect_text(self) -> Text<'a>where
Self: Debug,
pub fn expect_text(self) -> Text<'a>where
Self: Debug,
Sourcepub fn text(self) -> Option<Text<'a>>
pub fn text(self) -> Option<Text<'a>>
Returns Some if self is of variant Text, and None otherwise.
Sourcepub fn is_location(&self) -> bool
pub fn is_location(&self) -> bool
Returns true if self is of variant Location.
Sourcepub fn expect_location(self) -> Locationwhere
Self: Debug,
pub fn expect_location(self) -> Locationwhere
Self: Debug,
Sourcepub fn location(self) -> Option<Location>
pub fn location(self) -> Option<Location>
Returns Some if self is of variant Location, and None otherwise.
Sourcepub fn expect_venue(self) -> Venue<'a>where
Self: Debug,
pub fn expect_venue(self) -> Venue<'a>where
Self: Debug,
Sourcepub fn venue(self) -> Option<Venue<'a>>
pub fn venue(self) -> Option<Venue<'a>>
Returns Some if self is of variant Venue, and None otherwise.
Sourcepub fn is_contact(&self) -> bool
pub fn is_contact(&self) -> bool
Returns true if self is of variant Contact.
Sourcepub fn expect_contact(self) -> Contact<'a>where
Self: Debug,
pub fn expect_contact(self) -> Contact<'a>where
Self: Debug,
Trait Implementations§
Source§impl<'a> Clone for InputMessageContent<'a>
impl<'a> Clone for InputMessageContent<'a>
Source§fn clone(&self) -> InputMessageContent<'a>
fn clone(&self) -> InputMessageContent<'a>
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<'a> Debug for InputMessageContent<'a>
impl<'a> Debug for InputMessageContent<'a>
Source§impl<'a> From<Contact<'a>> for InputMessageContent<'a>
impl<'a> From<Contact<'a>> for InputMessageContent<'a>
Source§impl<'a> From<Location> for InputMessageContent<'a>
impl<'a> From<Location> for InputMessageContent<'a>
Source§impl<'a> From<Text<'a>> for InputMessageContent<'a>
impl<'a> From<Text<'a>> for InputMessageContent<'a>
Source§impl<'a> From<Venue<'a>> for InputMessageContent<'a>
impl<'a> From<Venue<'a>> for InputMessageContent<'a>
Source§impl<'a> PartialEq for InputMessageContent<'a>
impl<'a> PartialEq for InputMessageContent<'a>
Source§impl<'a> Serialize for InputMessageContent<'a>
impl<'a> Serialize for InputMessageContent<'a>
impl<'a> Copy for InputMessageContent<'a>
impl<'a> StructuralPartialEq for InputMessageContent<'a>
Auto Trait Implementations§
impl<'a> Freeze for InputMessageContent<'a>
impl<'a> RefUnwindSafe for InputMessageContent<'a>
impl<'a> Send for InputMessageContent<'a>
impl<'a> Sync for InputMessageContent<'a>
impl<'a> Unpin for InputMessageContent<'a>
impl<'a> UnwindSafe for InputMessageContent<'a>
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