Struct botapi::gen_types::BotCommand
source · pub struct BotCommand { /* private fields */ }Expand description
This object represents a bot command.
Implementations§
source§impl BotCommand
impl BotCommand
pub fn noskip(self) -> NoSkipBotCommand
source§impl BotCommand
impl BotCommand
pub fn new(command: String, description: String) -> Self
sourcepub fn into_tuple(self) -> (String, String)
pub fn into_tuple(self) -> (String, String)
Consumes and deconstructs this type into a tuple with one element per field. Tuple type returned is: (command, description)
sourcepub fn get_command<'a>(&'a self) -> Cow<'a, str>
pub fn get_command<'a>(&'a self) -> Cow<'a, str>
Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
sourcepub fn get_command_ref<'a>(&'a self) -> &'a str
pub fn get_command_ref<'a>(&'a self) -> &'a str
Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
sourcepub fn set_command<'a>(&'a mut self, command: String) -> &'a mut Self
pub fn set_command<'a>(&'a mut self, command: String) -> &'a mut Self
Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
sourcepub fn get_description<'a>(&'a self) -> Cow<'a, str>
pub fn get_description<'a>(&'a self) -> Cow<'a, str>
Description of the command; 1-256 characters.
sourcepub fn get_description_ref<'a>(&'a self) -> &'a str
pub fn get_description_ref<'a>(&'a self) -> &'a str
Description of the command; 1-256 characters.
sourcepub fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self
pub fn set_description<'a>(&'a mut self, description: String) -> &'a mut Self
Description of the command; 1-256 characters.
Trait Implementations§
source§impl Clone for BotCommand
impl Clone for BotCommand
source§fn clone(&self) -> BotCommand
fn clone(&self) -> BotCommand
Returns a copy 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 BotCommand
impl Debug for BotCommand
source§impl Default for BotCommand
impl Default for BotCommand
source§fn default() -> BotCommand
fn default() -> BotCommand
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for BotCommand
impl<'de> Deserialize<'de> for BotCommand
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<NoSkipBotCommand> for BotCommand
impl From<NoSkipBotCommand> for BotCommand
source§fn from(t: NoSkipBotCommand) -> Self
fn from(t: NoSkipBotCommand) -> Self
Converts to this type from the input type.
source§impl Into<NoSkipBotCommand> for BotCommand
impl Into<NoSkipBotCommand> for BotCommand
source§fn into(self) -> NoSkipBotCommand
fn into(self) -> NoSkipBotCommand
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl RefUnwindSafe for BotCommand
impl Send for BotCommand
impl Sync for BotCommand
impl Unpin for BotCommand
impl UnwindSafe for BotCommand
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