#[non_exhaustive]
pub enum InputMessageContent {
Text(Text),
Location(Location),
Venue(Venue),
Contact(Contact),
Invoice(Invoice),
}
Expand description
Represents InputMessageContent
.
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 text message.
Location(Location)
A location.
Venue(Venue)
A venue.
Contact(Contact)
A contact.
Invoice(Invoice)
An invoice.
Implementations§
source§impl InputMessageContent
impl InputMessageContent
sourcepub fn expect_text(self) -> Textwhere
Self: Debug,
pub fn expect_text(self) -> Textwhere
Self: Debug,
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) -> Venuewhere
Self: Debug,
pub fn expect_venue(self) -> Venuewhere
Self: Debug,
sourcepub fn venue(self) -> Option<Venue>
pub fn venue(self) -> Option<Venue>
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) -> Contactwhere
Self: Debug,
pub fn expect_contact(self) -> Contactwhere
Self: Debug,
sourcepub fn contact(self) -> Option<Contact>
pub fn contact(self) -> Option<Contact>
Returns Some
if self
is of variant Contact
, and None
otherwise.
sourcepub fn is_invoice(&self) -> bool
pub fn is_invoice(&self) -> bool
Returns true
if self
is of variant Invoice
.
sourcepub fn expect_invoice(self) -> Invoicewhere
Self: Debug,
pub fn expect_invoice(self) -> Invoicewhere
Self: Debug,
Trait Implementations§
source§impl Clone for InputMessageContent
impl Clone for InputMessageContent
source§fn clone(&self) -> InputMessageContent
fn clone(&self) -> InputMessageContent
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 InputMessageContent
impl Debug for InputMessageContent
source§impl From<Contact> for InputMessageContent
impl From<Contact> for InputMessageContent
source§impl From<Invoice> for InputMessageContent
impl From<Invoice> for InputMessageContent
source§impl From<Location> for InputMessageContent
impl From<Location> for InputMessageContent
source§impl From<Text> for InputMessageContent
impl From<Text> for InputMessageContent
source§impl From<Venue> for InputMessageContent
impl From<Venue> for InputMessageContent
source§impl PartialEq<InputMessageContent> for InputMessageContent
impl PartialEq<InputMessageContent> for InputMessageContent
source§fn eq(&self, other: &InputMessageContent) -> bool
fn eq(&self, other: &InputMessageContent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.