PromoteChatMemberBuilder

Struct PromoteChatMemberBuilder 

Source
pub struct PromoteChatMemberBuilder { /* private fields */ }
Expand description

Builder for the PromoteChatMember structure

Implementations§

Source§

impl PromoteChatMemberBuilder

Source

pub fn new(chat_id: ChatId, user_id: i64) -> Self

Instantiate the builder with the fields chat_id, user_id, is_anonymous, can_manage_chat, can_post_messages, can_edit_messages, can_delete_messages, can_manage_video_chats, can_restrict_members, can_promote_members, can_change_info, can_invite_users, can_pin_messages, can_manage_topics

Source

pub fn is_anonymous(self, val: bool) -> Self

Set the field is_anonymous to the given value

Source

pub fn can_manage_chat(self, val: bool) -> Self

Set the field can_manage_chat to the given value

Source

pub fn can_post_messages(self, val: bool) -> Self

Set the field can_post_messages to the given value

Source

pub fn can_edit_messages(self, val: bool) -> Self

Set the field can_edit_messages to the given value

Source

pub fn can_delete_messages(self, val: bool) -> Self

Set the field can_delete_messages to the given value

Source

pub fn can_manage_video_chats(self, val: bool) -> Self

Set the field can_manage_video_chats to the given value

Source

pub fn can_restrict_members(self, val: bool) -> Self

Set the field can_restrict_members to the given value

Source

pub fn can_promote_members(self, val: bool) -> Self

Set the field can_promote_members to the given value

Source

pub fn can_change_info(self, val: bool) -> Self

Set the field can_change_info to the given value

Source

pub fn can_invite_users(self, val: bool) -> Self

Set the field can_invite_users to the given value

Source

pub fn can_pin_messages(self, val: bool) -> Self

Set the field can_pin_messages to the given value

Source

pub fn can_manage_topics(self, val: bool) -> Self

Set the field can_manage_topics to the given value

Trait Implementations§

Source§

impl Builder for PromoteChatMemberBuilder

Source§

type Value = PromoteChatMember

Type to be built
Source§

fn build(self) -> <PromoteChatMemberBuilder as Builder>::Value

Converts the builder into the built value

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,