[][src]Enum tbot::types::message::forward::From

pub enum From {
    User(User),
    HiddenUser(String),
    Channel {
        chat: Box<Chat>,
        message_id: Id,
        signature: Option<String>,
    },
}

Represents a forward source.

Variants

User(User)

The forward is from a user.

HiddenUser(String)

The forward is from a user who decided to hide their profile.

Channel

The forward is from a channel.

Fields of Channel

chat: Box<Chat>

Information about the channel.

message_id: Id

The ID of the original message.

signature: Option<String>

The author's signature.

Methods

impl From[src]

pub fn is_user(&self) -> bool[src]

Checks if self is User.

pub fn is_hidden_user(&self) -> bool[src]

Checks if self is Hidden.

pub fn is_channel(&self) -> bool[src]

Checks if self is Channel.

Trait Implementations

impl Clone for From[src]

impl PartialEq<From> for From[src]

impl Debug for From[src]

Auto Trait Implementations

impl Send for From

impl Unpin for From

impl Sync for From

impl UnwindSafe for From

impl RefUnwindSafe for From

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T