[−][src]Enum tbot::types::message::text::EntityKind
Represents an entity's kind.
Variants (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.
A mention.
A hashtag.
A cashtag (e.g. $TBOT
).
A bot command.
An url.
An email.
A phone number.
Text in bold.
Text in italic.
String of monowidth text.
Block of monowidth text.
TextLink(String)
A clickable text url.
TextMention(User)
A mention for users without username.
Methods
impl EntityKind
[src]
#[must_use]
pub fn is_mention(&self) -> bool
[src]
Checks if self
is Mention
.
#[must_use]
pub fn is_hastag(&self) -> bool
[src]
Checks if self
is Hashtag
.
#[must_use]
pub fn is_cashtag(&self) -> bool
[src]
Checks if self
is Cashtag
.
#[must_use]
pub fn is_bot_command(&self) -> bool
[src]
Checks if self
is BotCommand
.
#[must_use]
pub fn is_url(&self) -> bool
[src]
Checks if self
is Url
.
#[must_use]
pub fn is_email(&self) -> bool
[src]
Checks if self
is Email
.
#[must_use]
pub fn is_phone_number(&self) -> bool
[src]
Checks if self
is PhoneNumber
.
#[must_use]
pub fn is_bold(&self) -> bool
[src]
Checks if self
is Bold
.
#[must_use]
pub fn is_italic(&self) -> bool
[src]
Checks if self
is Italic
.
#[must_use]
pub fn is_code(&self) -> bool
[src]
Checks if self
is Code
.
#[must_use]
pub fn is_pre(&self) -> bool
[src]
Checks if self
is Pre
.
#[must_use]
pub fn is_text_link(&self) -> bool
[src]
Checks if self
is TextLink
.
#[must_use]
pub fn is_text_mention(&self) -> bool
[src]
Checks if self
is TextMention
.
Trait Implementations
impl Clone for EntityKind
[src]
fn clone(&self) -> EntityKind
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for EntityKind
[src]
impl Eq for EntityKind
[src]
impl Hash for EntityKind
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<EntityKind> for EntityKind
[src]
fn eq(&self, other: &EntityKind) -> bool
[src]
fn ne(&self, other: &EntityKind) -> bool
[src]
impl StructuralEq for EntityKind
[src]
impl StructuralPartialEq for EntityKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for EntityKind
impl Send for EntityKind
impl Sync for EntityKind
impl Unpin for EntityKind
impl UnwindSafe for EntityKind
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,