add struct and set fields type to 'pub'

This commit is contained in:
P0lunin 2019-09-03 20:56:43 +03:00
parent 1852b8f5a1
commit dcdc776c50
3 changed files with 18 additions and 5 deletions

View file

@ -1,2 +1,2 @@
/// A placeholder, currently holds no information. Use [BotFather](https://t.me/botfather) to set up your game. /// A placeholder, currently holds no information. Use [BotFather](https://t.me/botfather) to set up your game.
struct CallbackGame; pub struct CallbackGame;

13
src/core/types/game.rs Normal file
View file

@ -0,0 +1,13 @@
use serde::Deserialize;
use crate::core::types::MessageEntity;
#[derive(Debug, Deserialize)]
pub struct Game {
pub title: String,
pub description: String,
pub photo: Vec<PhotoSize>,
pub text: Option<String>,
pub text_entities: Option<Vec<MessageEntity>>,
pub animation: Option<Animation>,
}

View file

@ -3,8 +3,8 @@ use serde::Deserialize;
use crate::core::types::user::User; use crate::core::types::user::User;
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
struct GameHighScore { pub struct GameHighScore {
position: i32, pub position: i32,
user: User, pub user: User,
score: i32, pub score: i32,
} }