pub enum MenuButton {
Commands,
WebApp {
text: String,
web_app: WebAppInfo,
},
Default,
}Expand description
This object describes the bot’s menu button in a private chat.
If a menu button other than MenuButton::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
Represents a menu button, which opens the bot’s list of commands.
WebApp
Represents a menu button, which launches a Web App.
Fields
web_app: WebAppInfoDescription of the Web App that will be launched when the user
presses the button. The Web App will be able to send an arbitrary
message on behalf of the user using the method
AnswerWebAppQuery. Alternatively, a t.me link to a Web App of
the bot can be specified in the object instead of the Web App’s URL,
in which case the Web App will be opened as if the user pressed the
link.
Default
Describes that no specific value for the menu button was set.
Trait Implementations§
Source§impl Clone for MenuButton
impl Clone for MenuButton
Source§fn clone(&self) -> MenuButton
fn clone(&self) -> MenuButton
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl Hash for MenuButton
impl Hash for MenuButton
Source§impl PartialEq for MenuButton
impl PartialEq for MenuButton
Source§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,
impl Eq for MenuButton
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> Erasable for T
impl<T> Erasable for T
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>
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>
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