Struct botapi::gen_types::WriteAccessAllowed
source · pub struct WriteAccessAllowed { /* private fields */ }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.
Implementations§
source§impl WriteAccessAllowed
impl WriteAccessAllowed
pub fn noskip(self) -> NoSkipWriteAccessAllowed
source§impl WriteAccessAllowed
impl WriteAccessAllowed
pub fn new() -> Self
sourcepub fn into_tuple(self) -> (Option<bool>, Option<String>, Option<bool>)
pub fn into_tuple(self) -> (Option<bool>, Option<String>, Option<bool>)
Consumes and deconstructs this type into a tuple with one element per field. Tuple type returned is: (from_request, web_app_name, from_attachment_menu)
sourcepub fn get_from_request<'a>(&'a self) -> Option<bool>
pub fn get_from_request<'a>(&'a self) -> 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
sourcepub fn get_from_request_ref<'a>(&'a self) -> Option<bool>
pub fn get_from_request_ref<'a>(&'a self) -> 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
sourcepub fn set_from_request<'a>(
&'a mut self,
from_request: Option<bool>
) -> &'a mut Self
pub fn set_from_request<'a>( &'a mut self, from_request: Option<bool> ) -> &'a mut 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 get_web_app_name<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_web_app_name<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Name of the Web App, if the access was granted when the Web App was launched from a link
sourcepub fn get_web_app_name_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_web_app_name_ref<'a>(&'a self) -> Option<&'a str>
Optional. Name of the Web App, if the access was granted when the Web App was launched from a link
sourcepub fn set_web_app_name<'a>(
&'a mut self,
web_app_name: Option<String>
) -> &'a mut Self
pub fn set_web_app_name<'a>( &'a mut self, web_app_name: Option<String> ) -> &'a mut 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
Optional. True, if the access was granted when the bot was added to the attachment or side menu
Optional. True, if the access was granted when the bot was added to the attachment or side menu
Trait Implementations§
source§impl Clone for WriteAccessAllowed
impl Clone for WriteAccessAllowed
source§fn clone(&self) -> WriteAccessAllowed
fn clone(&self) -> WriteAccessAllowed
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more