Struct botapi::gen_types::BotCommand
source · pub struct BotCommand {
pub command: String,
pub description: String,
}
Expand description
This object represents a bot command.
Fields§
§command: String
Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
description: String
Description of the command; 1-256 characters.
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 get_command<'a>(&'a self) -> &'a str
pub fn get_command<'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) -> &'a str
pub fn get_description<'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<BoxWrapper<Box<BotCommand>>> for BotCommand
impl From<BoxWrapper<Box<BotCommand>>> for BotCommand
source§fn from(t: BoxWrapper<Box<BotCommand>>) -> Self
fn from(t: BoxWrapper<Box<BotCommand>>) -> Self
Converts to this type from the input type.
source§impl From<BoxWrapper<Unbox<BotCommand>>> for BotCommand
impl From<BoxWrapper<Unbox<BotCommand>>> for BotCommand
source§fn from(t: BoxWrapper<Unbox<BotCommand>>) -> Self
fn from(t: BoxWrapper<Unbox<BotCommand>>) -> Self
Converts to this type from the input type.
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 Hash for BotCommand
impl Hash for BotCommand
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.
source§impl Ord for BotCommand
impl Ord for BotCommand
source§fn cmp(&self, other: &BotCommand) -> Ordering
fn cmp(&self, other: &BotCommand) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for BotCommand
impl PartialEq for BotCommand
source§fn eq(&self, other: &BotCommand) -> bool
fn eq(&self, other: &BotCommand) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for BotCommand
impl PartialOrd for BotCommand
source§fn partial_cmp(&self, other: &BotCommand) -> Option<Ordering>
fn partial_cmp(&self, other: &BotCommand) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for BotCommand
impl Serialize for BotCommand
impl Eq for BotCommand
impl StructuralPartialEq for BotCommand
Auto Trait Implementations§
impl Freeze for BotCommand
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
Compare self to
key
and return true
if they are equal.