Enum carapax::types::MenuButton
source · pub enum MenuButton {
Commands,
Default,
WebApp(MenuButtonWebApp),
}
Expand description
Represents a menu button of the bot in a private chat.
If a menu button other than default is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.
Variants§
Commands
Opens the list of bot commands.
Default
Default behaviour.
WebApp(MenuButtonWebApp)
Launches a web app.
Trait Implementations§
source§impl Clone for MenuButton
impl Clone for MenuButton
source§fn clone(&self) -> MenuButton
fn clone(&self) -> MenuButton
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 MenuButton
impl Debug for MenuButton
source§impl<'de> Deserialize<'de> for MenuButton
impl<'de> Deserialize<'de> for MenuButton
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<MenuButton, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<MenuButton, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<MenuButtonRaw> for MenuButton
impl From<MenuButtonRaw> for MenuButton
source§fn from(value: MenuButtonRaw) -> MenuButton
fn from(value: MenuButtonRaw) -> MenuButton
Converts to this type from the input type.
source§impl PartialEq for MenuButton
impl PartialEq for MenuButton
source§fn eq(&self, other: &MenuButton) -> bool
fn eq(&self, other: &MenuButton) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MenuButton
impl PartialOrd for MenuButton
source§fn partial_cmp(&self, other: &MenuButton) -> Option<Ordering>
fn partial_cmp(&self, other: &MenuButton) -> 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 MenuButton
impl Serialize for MenuButton
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for MenuButton
Auto Trait Implementations§
impl Freeze for MenuButton
impl RefUnwindSafe for MenuButton
impl Send for MenuButton
impl Sync for MenuButton
impl Unpin for MenuButton
impl UnwindSafe for MenuButton
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more