Struct botapi::gen_types::MessageOriginUser
source · pub struct MessageOriginUser {
pub tg_type: String,
pub date: i64,
pub sender_user: BoxWrapper<Unbox<User>>,
}Expand description
The message was originally sent by a known user.
Fields§
§tg_type: StringType of the message origin, always “user”
date: i64Date the message was sent originally in Unix time
sender_user: BoxWrapper<Unbox<User>>User that sent the message originally
Implementations§
source§impl MessageOriginUser
impl MessageOriginUser
pub fn noskip(self) -> NoSkipMessageOriginUser
source§impl MessageOriginUser
impl MessageOriginUser
pub fn new<A: Into<User>>(date: i64, sender_user: A) -> Self
sourcepub fn get_tg_type<'a>(&'a self) -> &'a str
pub fn get_tg_type<'a>(&'a self) -> &'a str
Type of the message origin, always “user”
sourcepub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
Type of the message origin, always “user”
sourcepub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self
pub fn set_date<'a>(&'a mut self, date: i64) -> &'a mut Self
Date the message was sent originally in Unix time
sourcepub fn get_sender_user<'a>(&'a self) -> &'a User
pub fn get_sender_user<'a>(&'a self) -> &'a User
User that sent the message originally
sourcepub fn set_sender_user<'a>(&'a mut self, sender_user: User) -> &'a mut Self
pub fn set_sender_user<'a>(&'a mut self, sender_user: User) -> &'a mut Self
User that sent the message originally
Trait Implementations§
source§impl Clone for MessageOriginUser
impl Clone for MessageOriginUser
source§fn clone(&self) -> MessageOriginUser
fn clone(&self) -> MessageOriginUser
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 MessageOriginUser
impl Debug for MessageOriginUser
source§impl Default for MessageOriginUser
impl Default for MessageOriginUser
source§fn default() -> MessageOriginUser
fn default() -> MessageOriginUser
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for MessageOriginUser
impl<'de> Deserialize<'de> for MessageOriginUser
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<BoxWrapper<Box<MessageOriginUser>>> for MessageOriginUser
impl From<BoxWrapper<Box<MessageOriginUser>>> for MessageOriginUser
source§fn from(t: BoxWrapper<Box<MessageOriginUser>>) -> Self
fn from(t: BoxWrapper<Box<MessageOriginUser>>) -> Self
Converts to this type from the input type.
source§impl From<BoxWrapper<Unbox<MessageOriginUser>>> for MessageOriginUser
impl From<BoxWrapper<Unbox<MessageOriginUser>>> for MessageOriginUser
source§fn from(t: BoxWrapper<Unbox<MessageOriginUser>>) -> Self
fn from(t: BoxWrapper<Unbox<MessageOriginUser>>) -> Self
Converts to this type from the input type.
source§impl From<NoSkipMessageOriginUser> for MessageOriginUser
impl From<NoSkipMessageOriginUser> for MessageOriginUser
source§fn from(t: NoSkipMessageOriginUser) -> Self
fn from(t: NoSkipMessageOriginUser) -> Self
Converts to this type from the input type.
source§impl Hash for MessageOriginUser
impl Hash for MessageOriginUser
source§impl Into<NoSkipMessageOriginUser> for MessageOriginUser
impl Into<NoSkipMessageOriginUser> for MessageOriginUser
source§fn into(self) -> NoSkipMessageOriginUser
fn into(self) -> NoSkipMessageOriginUser
Converts this type into the (usually inferred) input type.
source§impl Ord for MessageOriginUser
impl Ord for MessageOriginUser
source§fn cmp(&self, other: &MessageOriginUser) -> Ordering
fn cmp(&self, other: &MessageOriginUser) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MessageOriginUser
impl PartialEq for MessageOriginUser
source§impl PartialOrd for MessageOriginUser
impl PartialOrd for MessageOriginUser
source§impl Serialize for MessageOriginUser
impl Serialize for MessageOriginUser
impl Eq for MessageOriginUser
impl StructuralPartialEq for MessageOriginUser
Auto Trait Implementations§
impl Freeze for MessageOriginUser
impl RefUnwindSafe for MessageOriginUser
impl Send for MessageOriginUser
impl Sync for MessageOriginUser
impl Unpin for MessageOriginUser
impl UnwindSafe for MessageOriginUser
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.