pub struct WriteAccessAllowedBuilder {
pub from_request: Option<bool>,
pub web_app_name: Option<String>,
pub from_attachment_menu: Option<bool>,
}Expand description
This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.
Fields§
§from_request: Option<bool>Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess
web_app_name: Option<String>Optional. Name of the Web App, if the access was granted when the Web App was launched from a link
Optional. True, if the access was granted when the bot was added to the attachment or side menu
Implementations§
Source§impl WriteAccessAllowedBuilder
impl WriteAccessAllowedBuilder
pub fn new() -> Self
Sourcepub fn set_from_request(self, from_request: bool) -> Self
pub fn set_from_request(self, from_request: bool) -> Self
Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess
Sourcepub fn set_web_app_name(self, web_app_name: String) -> Self
pub fn set_web_app_name(self, web_app_name: String) -> Self
Optional. Name of the Web App, if the access was granted when the Web App was launched from a link
Optional. True, if the access was granted when the bot was added to the attachment or side menu
pub fn build(self) -> WriteAccessAllowed
Trait Implementations§
Source§impl Clone for WriteAccessAllowedBuilder
impl Clone for WriteAccessAllowedBuilder
Source§fn clone(&self) -> WriteAccessAllowedBuilder
fn clone(&self) -> WriteAccessAllowedBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WriteAccessAllowedBuilder
impl Debug for WriteAccessAllowedBuilder
Source§impl Default for WriteAccessAllowedBuilder
impl Default for WriteAccessAllowedBuilder
Source§fn default() -> WriteAccessAllowedBuilder
fn default() -> WriteAccessAllowedBuilder
Source§impl<'de> Deserialize<'de> for WriteAccessAllowedBuilder
impl<'de> Deserialize<'de> for WriteAccessAllowedBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for WriteAccessAllowedBuilder
impl Hash for WriteAccessAllowedBuilder
Source§impl Ord for WriteAccessAllowedBuilder
impl Ord for WriteAccessAllowedBuilder
Source§fn cmp(&self, other: &WriteAccessAllowedBuilder) -> Ordering
fn cmp(&self, other: &WriteAccessAllowedBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for WriteAccessAllowedBuilder
impl PartialOrd for WriteAccessAllowedBuilder
impl Eq for WriteAccessAllowedBuilder
impl StructuralPartialEq for WriteAccessAllowedBuilder
Auto Trait Implementations§
impl Freeze for WriteAccessAllowedBuilder
impl RefUnwindSafe for WriteAccessAllowedBuilder
impl Send for WriteAccessAllowedBuilder
impl Sync for WriteAccessAllowedBuilder
impl Unpin for WriteAccessAllowedBuilder
impl UnsafeUnpin for WriteAccessAllowedBuilder
impl UnwindSafe for WriteAccessAllowedBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.