Struct grammers_client::types::chats::AdminRightsBuilder
source · pub struct AdminRightsBuilder<F: Future<Output = Result<(), InvocationError>>> { /* private fields */ }
Expand description
Builder for editing the administrator rights of a user in a specific chat.
Use Client::set_admin_rights
to retrieve an instance of this type.
Implementations§
source§impl<F: Future<Output = Result<(), InvocationError>>> AdminRightsBuilder<F>
impl<F: Future<Output = Result<(), InvocationError>>> AdminRightsBuilder<F>
sourcepub async fn load_current(self) -> Result<Self, InvocationError>
pub async fn load_current(self) -> Result<Self, InvocationError>
Load the current rights of the user. This lets you trivially grant or take away specific permissions without changing any of the previous ones.
sourcepub fn anonymous(self, val: bool) -> Self
pub fn anonymous(self, val: bool) -> Self
Whether the user will remain anonymous when sending messages.
The sender of the anonymous messages becomes the group itself.
Note that other people in the channel may be able to identify the anonymous admin by its custom rank, so additional care is needed when using both anonymous and custom ranks.
For example, if multiple anonymous admins share the same title, users won’t be able to distinguish them.
sourcepub fn manage_call(self, val: bool) -> Self
pub fn manage_call(self, val: bool) -> Self
Whether the user is able to manage calls in the group.
sourcepub fn change_info(self, val: bool) -> Self
pub fn change_info(self, val: bool) -> Self
Whether the user is able to change information about the chat such as group description or not.
sourcepub fn post_messages(self, val: bool) -> Self
pub fn post_messages(self, val: bool) -> Self
Whether the user will be able to post in the channel. This will only work in broadcast channels, not groups.
sourcepub fn edit_messages(self, val: bool) -> Self
pub fn edit_messages(self, val: bool) -> Self
Whether the user will be able to edit messages in the channel. This will only work in broadcast channels, not groups.
sourcepub fn delete_messages(self, val: bool) -> Self
pub fn delete_messages(self, val: bool) -> Self
Whether the user will be able to delete messages. This includes messages from others.
sourcepub fn ban_users(self, val: bool) -> Self
pub fn ban_users(self, val: bool) -> Self
Whether the user will be able to edit the restrictions of other users. This effectively lets the administrator ban (or kick) people.
sourcepub fn invite_users(self, val: bool) -> Self
pub fn invite_users(self, val: bool) -> Self
Whether the user will be able to invite other users.
sourcepub fn pin_messages(self, val: bool) -> Self
pub fn pin_messages(self, val: bool) -> Self
Whether the user will be able to pin messages.
sourcepub fn add_admins(self, val: bool) -> Self
pub fn add_admins(self, val: bool) -> Self
Whether the user will be able to add other administrators with the same or less permissions than the user itself.
Trait Implementations§
source§impl<F: Future<Output = Result<(), InvocationError>>> Future for AdminRightsBuilder<F>
impl<F: Future<Output = Result<(), InvocationError>>> Future for AdminRightsBuilder<F>
§type Output = Result<(), InvocationError>
type Output = Result<(), InvocationError>
impl<'__pin, F: Future<Output = Result<(), InvocationError>>> Unpin for AdminRightsBuilder<F>where
__Origin<'__pin, F>: Unpin,
Auto Trait Implementations§
impl<F> Freeze for AdminRightsBuilder<F>where
F: Freeze,
impl<F> !RefUnwindSafe for AdminRightsBuilder<F>
impl<F> Send for AdminRightsBuilder<F>where
F: Send,
impl<F> Sync for AdminRightsBuilder<F>where
F: Sync,
impl<F> !UnwindSafe for AdminRightsBuilder<F>
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
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn map<U, F>(self, f: F) -> Map<Self, F>
fn map<U, F>(self, f: F) -> Map<Self, F>
source§fn map_into<U>(self) -> MapInto<Self, U>
fn map_into<U>(self) -> MapInto<Self, U>
source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
f
. Read moresource§fn left_future<B>(self) -> Either<Self, B>
fn left_future<B>(self) -> Either<Self, B>
source§fn right_future<A>(self) -> Either<A, Self>
fn right_future<A>(self) -> Either<A, Self>
source§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
source§fn flatten_stream(self) -> FlattenStream<Self>
fn flatten_stream(self) -> FlattenStream<Self>
source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
poll
will never again be called once it has
completed. This method can be used to turn any Future
into a
FusedFuture
. Read moresource§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
source§fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
source§fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>where
Self: Sized + 'a,
source§fn unit_error(self) -> UnitError<Self>where
Self: Sized,
fn unit_error(self) -> UnitError<Self>where
Self: Sized,
Future<Output = T>
into a
TryFuture<Ok = T, Error = ()
>.source§fn never_error(self) -> NeverError<Self>where
Self: Sized,
fn never_error(self) -> NeverError<Self>where
Self: Sized,
Future<Output = T>
into a
TryFuture<Ok = T, Error = Never
>.