Struct frankenstein::objects::User
source · [−]pub struct User {
pub id: u64,
pub is_bot: bool,
pub first_name: String,
pub last_name: Option<String>,
pub username: Option<String>,
pub language_code: Option<String>,
pub can_join_groups: Option<bool>,
pub can_read_all_group_messages: Option<bool>,
pub supports_inline_queries: Option<bool>,
}
Fields
id: u64
is_bot: bool
first_name: String
last_name: Option<String>
username: Option<String>
language_code: Option<String>
can_join_groups: Option<bool>
can_read_all_group_messages: Option<bool>
supports_inline_queries: Option<bool>
Implementations
sourceimpl User
impl User
sourcepub fn builder() -> UserBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> UserBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building User
.
On the builder, call .id(...)
, .is_bot(...)
, .first_name(...)
, .last_name(...)
(optional), .username(...)
(optional), .language_code(...)
(optional), .can_join_groups(...)
(optional), .can_read_all_group_messages(...)
(optional), .supports_inline_queries(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of User
.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
sourcefn 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
impl StructuralPartialEq for User
Auto Trait Implementations
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more