[−][src]Struct tgbot::types::ChatPermissions
Describes actions that a non-administrator user is allowed to take in a chat
Fields
can_send_messages: Option<bool>
True, if the user is allowed to send text messages, contacts, locations and venues
can_send_media_messages: Option<bool>
True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
can_send_polls: Option<bool>
True, if the user is allowed to send polls, implies can_send_messages
can_send_other_messages: Option<bool>
True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages
can_add_web_page_previews: Option<bool>
True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages
can_change_info: Option<bool>
True, if the user is allowed to change the chat title, photo and other settings
Ignored in public supergroups
can_invite_users: Option<bool>
True, if the user is allowed to invite new users to the chat
can_pin_messages: Option<bool>
True, if the user is allowed to pin messages
Ignored in public supergroups
Methods
impl ChatPermissions
[src]
pub fn restricted() -> Self
[src]
Restrict everything
pub fn allowed() -> Self
[src]
Allow everything
pub fn with_send_messages(self, flag: bool) -> Self
[src]
Permission to send text messages, contacts, locations and venues
pub fn with_send_media_messages(self, flag: bool) -> Self
[src]
Permission to send audios, documents, photos, videos, video notes and voice notes
pub fn with_send_polls(self, flag: bool) -> Self
[src]
Permission to send polls
pub fn with_send_other_messages(self, flag: bool) -> Self
[src]
Permission to send animations, games, stickers and use inline bots
pub fn with_add_web_page_previews(self, flag: bool) -> Self
[src]
Permission add web page previews to messages
pub fn with_change_info(self, flag: bool) -> Self
[src]
Permission to change the chat title, photo and other settings
pub fn with_invite_users(self, flag: bool) -> Self
[src]
Permission to invite new users to the chat
pub fn with_pin_messages(self, flag: bool) -> Self
[src]
Permission to pin messages
Trait Implementations
impl Clone for ChatPermissions
[src]
fn clone(&self) -> ChatPermissions
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for ChatPermissions
[src]
fn default() -> ChatPermissions
[src]
impl Debug for ChatPermissions
[src]
impl Serialize for ChatPermissions
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for ChatPermissions
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Sync for ChatPermissions
impl Send for ChatPermissions
impl Unpin for ChatPermissions
impl RefUnwindSafe for ChatPermissions
impl UnwindSafe for ChatPermissions
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,