From 3171db78e22e4e6753a20d46527330191fc51851 Mon Sep 17 00:00:00 2001 From: RustemB Date: Tue, 3 Sep 2019 01:01:04 +0500 Subject: [PATCH] New struct: Sticker, MaskPosition; Sticker requires PhotoSize by @no111u3 --- src/core/types/mask_position.rs | 10 ++++++++++ src/core/types/sticker.rs | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/core/types/mask_position.rs create mode 100644 src/core/types/sticker.rs diff --git a/src/core/types/mask_position.rs b/src/core/types/mask_position.rs new file mode 100644 index 00000000..d186cb18 --- /dev/null +++ b/src/core/types/mask_position.rs @@ -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, +} + diff --git a/src/core/types/sticker.rs b/src/core/types/sticker.rs new file mode 100644 index 00000000..a92461ce --- /dev/null +++ b/src/core/types/sticker.rs @@ -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, + pub emoji: Option, + pub set_name: Option, + pub mask_position: Option, + pub file_size: Option, +}