New struct: Sticker, MaskPosition; Sticker requires PhotoSize by @no111u3

This commit is contained in:
RustemB 2019-09-03 01:01:04 +05:00
parent ddfa5aaa70
commit 3171db78e2
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,10 @@
use serde::Deserialize;
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
pub struct MaskPosition {
pub point: String,
pub x_shift: f64,
pub y_shift: f64,
pub scale: f64,
}

16
src/core/types/sticker.rs Normal file
View file

@ -0,0 +1,16 @@
use serde::Deserialize;
use crate::core::types::{PhotoSize, MaskPosition};
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
pub struct Sticker {
pub file_id: String,
pub width: i32,
pub height: i32,
pub is_animated: bool,
pub thumb: Option<PhotoSize>,
pub emoji: Option<String>,
pub set_name: Option<String>,
pub mask_position: Option<MaskPosition>,
pub file_size: Option<i64>,
}