pub struct AdminRightsBuilder {
pub change_info: bool,
pub post_messages: bool,
pub edit_messages: bool,
pub delete_messages: bool,
pub ban_users: bool,
pub invite_users: bool,
pub pin_messages: bool,
pub add_admins: bool,
pub anonymous: bool,
pub manage_call: bool,
pub manage_topics: bool,
pub rank: Option<String>,
}Expand description
Fluent builder for granular admin rights.
Fields§
§change_info: bool§post_messages: bool§edit_messages: bool§delete_messages: bool§ban_users: bool§invite_users: bool§pin_messages: bool§add_admins: bool§anonymous: bool§manage_call: bool§manage_topics: bool§rank: Option<String>Implementations§
Source§impl AdminRightsBuilder
impl AdminRightsBuilder
pub fn new() -> Self
pub fn change_info(self, v: bool) -> Self
pub fn post_messages(self, v: bool) -> Self
pub fn edit_messages(self, v: bool) -> Self
pub fn delete_messages(self, v: bool) -> Self
pub fn ban_users(self, v: bool) -> Self
pub fn invite_users(self, v: bool) -> Self
pub fn pin_messages(self, v: bool) -> Self
pub fn add_admins(self, v: bool) -> Self
pub fn anonymous(self, v: bool) -> Self
pub fn manage_call(self, v: bool) -> Self
pub fn manage_topics(self, v: bool) -> Self
Sourcepub fn full_admin() -> Self
pub fn full_admin() -> Self
Full admin (all standard rights).
Trait Implementations§
Source§impl Clone for AdminRightsBuilder
impl Clone for AdminRightsBuilder
Source§fn clone(&self) -> AdminRightsBuilder
fn clone(&self) -> AdminRightsBuilder
Returns a duplicate 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 AdminRightsBuilder
impl Debug for AdminRightsBuilder
Source§impl Default for AdminRightsBuilder
impl Default for AdminRightsBuilder
Source§fn default() -> AdminRightsBuilder
fn default() -> AdminRightsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AdminRightsBuilder
impl RefUnwindSafe for AdminRightsBuilder
impl Send for AdminRightsBuilder
impl Sync for AdminRightsBuilder
impl Unpin for AdminRightsBuilder
impl UnsafeUnpin for AdminRightsBuilder
impl UnwindSafe for AdminRightsBuilder
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more