pub struct UserBuilder { /* private fields */ }Expand description
Builder for the User structure
Implementations§
Source§impl UserBuilder
impl UserBuilder
Sourcepub fn new(id: i64, is_bot: bool, first_name: String) -> Self
pub fn new(id: i64, is_bot: bool, first_name: String) -> Self
Instantiate the builder with the fields id, is_bot, first_name, last_name, username, language_code, is_premium, added_to_attachment_menu, can_join_groups, can_read_all_group_messages, supports_inline_queries
Sourcepub fn language_code(self, val: String) -> Self
pub fn language_code(self, val: String) -> Self
Set the field language_code to the given value
Set the field is_premium to the given value
Set the field added_to_attachment_menu to the given value
Sourcepub fn can_join_groups(self, val: bool) -> Self
pub fn can_join_groups(self, val: bool) -> Self
Set the field can_join_groups to the given value
Sourcepub fn can_read_all_group_messages(self, val: bool) -> Self
pub fn can_read_all_group_messages(self, val: bool) -> Self
Set the field can_read_all_group_messages to the given value
Sourcepub fn supports_inline_queries(self, val: bool) -> Self
pub fn supports_inline_queries(self, val: bool) -> Self
Set the field supports_inline_queries to the given value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserBuilder
impl RefUnwindSafe for UserBuilder
impl Send for UserBuilder
impl Sync for UserBuilder
impl Unpin for UserBuilder
impl UnwindSafe for UserBuilder
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