[−][src]Struct tbot::types::chat::Permissions
Describes actions that a non-administrator user is allowed to take in a chat.
This struct is a representation of ChatPermissions
.
Fields (Non-exhaustive)
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.can_send_messages: Option<bool>
true
if the user can send text messages, contacts, locations and
venues.
can_send_media_messages: Option<bool>
true
if the user can send audios, documents, photos, videos, video
notes and voice notes. Implies can_send_messages
.
can_send_polls: Option<bool>
true
if the user can send polls. Implies can_send_messages
.
can_send_other_messages: Option<bool>
true
if the user can use inline bots and send animations, games and
stickers. Implies can_send_media_messages
.
can_add_web_page_previews: Option<bool>
true
if the user can add web page previews. Implies
can_send_media_messages
.
can_change_info: Option<bool>
true
if the user can change the chat information. Ignored in public
supergroups.
can_invite_users: Option<bool>
true
if the user can invite new users.
can_pin_messages: Option<bool>
true
is the user can pin messages. Ignored in public supegroups.
Methods
impl Permissions
[src]
pub fn new() -> Self
[src]
Constructs Permissions
with all fields set to None
.
pub fn can_send_messages(self, can_send: bool) -> Self
[src]
Configures if the user can send messages.
pub fn can_send_media_messages(self, can_send: bool) -> Self
[src]
Configures if the user can send media messages.
pub fn can_send_polls(self, can_send: bool) -> Self
[src]
Configures if the user can send polls.
pub fn can_send_other_messages(self, can_send: bool) -> Self
[src]
Configures if the user can send other messages not covered by other permissions.
pub fn can_add_web_page_previews(self, can_add: bool) -> Self
[src]
Configures if the user can add webpage previews.
pub fn can_change_info(self, can_change: bool) -> Self
[src]
Configures if the user can change chat information.
pub fn can_invite_users(self, can_invite: bool) -> Self
[src]
Configures if the user can invite new users to the chat.
pub fn can_pin_messages(self, can_pin: bool) -> Self
[src]
Configures if the user can pin messages.
Trait Implementations
impl Clone for Permissions
[src]
fn clone(&self) -> Permissions
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Permissions
[src]
impl Debug for Permissions
[src]
impl Default for Permissions
[src]
fn default() -> Permissions
[src]
impl<'de> Deserialize<'de> for Permissions
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Permissions
[src]
impl Hash for Permissions
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Permissions> for Permissions
[src]
fn eq(&self, other: &Permissions) -> bool
[src]
fn ne(&self, other: &Permissions) -> bool
[src]
impl Serialize for Permissions
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Permissions
[src]
impl StructuralPartialEq for Permissions
[src]
Auto Trait Implementations
impl RefUnwindSafe for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Unpin for Permissions
impl UnwindSafe for Permissions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[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> 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, 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>,