Expand description
Represents the origin of the callback.
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.
Message(Box<Message>)
The callback comes from this message.
Inline(String)
The callback comes from an inline message with this ID.
Implementations§
source§impl Origin
impl Origin
sourcepub fn is_message(&self) -> bool
pub fn is_message(&self) -> bool
Returns true
if self
is of variant Message
.
sourcepub fn expect_message(self) -> Box<Message>where
Self: Debug,
pub fn expect_message(self) -> Box<Message>where
Self: Debug,
sourcepub fn message(self) -> Option<Box<Message>>
pub fn message(self) -> Option<Box<Message>>
Returns Some
if self
is of variant Message
, and None
otherwise.