pub struct Game {
pub title: String,
pub description: String,
pub photo: Vec<PhotoSize, Global>,
pub text: Option<String>,
pub text_entities: Option<Vec<MessageEntity, Global>>,
pub animation: Option<Animation>,
}
Expand description
This object represents a game.
Use @Botfather to create and edit games, their short names will act as unique identifiers.
Fields§
§title: String
Title of the game.
description: String
Description of the game.
photo: Vec<PhotoSize, Global>
Photo that will be displayed in the game message in chats.
text: Option<String>
Brief description of the game or high scores included in the game
message. Can be automatically edited to include current high scores
for the game when the bot calls SetGameScore
, or manually
edited using EditMessageText
. 0-4096 characters.
text_entities: Option<Vec<MessageEntity, Global>>
Special entities that appear in text, such as usernames, URLs, bot commands, etc.
animation: Option<Animation>
Animation that will be displayed in the game message in chats. Upload via @Botfather.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Game
impl<'de> Deserialize<'de> for Game
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Game, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Game, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Game> for Game
impl PartialEq<Game> for Game
source§impl Serialize for Game
impl Serialize for Game
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 Eq for Game
impl StructuralEq for Game
impl StructuralPartialEq for Game
Auto Trait Implementations§
impl RefUnwindSafe for Game
impl Send for Game
impl Sync for Game
impl Unpin for Game
impl UnwindSafe for Game
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.