pub struct InputSticker {
pub sticker: String,
pub format: StickerFormat,
pub emoji_list: Vec<String>,
pub mask_position: Option<MaskPosition>,
pub keywords: Option<Vec<String>>,
}Expand description
Input sticker for creating or extending sticker sets.
sticker holds a file_id, HTTP URL, or attach://<name> reference.
Raw bytes are handled at the API layer via multipart — this type is
serialisable so it can be embedded in JSON request bodies.
Fields§
§sticker: StringFile identifier, URL, or attach://<n> reference.
format: StickerFormatFormat of the sticker.
emoji_list: Vec<String>List of 1–20 emoji associated with the sticker.
mask_position: Option<MaskPosition>Mask position for mask stickers.
keywords: Option<Vec<String>>List of 0–20 search keywords for the sticker.
Implementations§
Source§impl InputSticker
impl InputSticker
Sourcepub fn new(
sticker: impl Into<String>,
format: StickerFormat,
emoji_list: Vec<impl Into<String>>,
) -> Self
pub fn new( sticker: impl Into<String>, format: StickerFormat, emoji_list: Vec<impl Into<String>>, ) -> Self
Creates an InputSticker from a file_id or URL.
Sourcepub fn mask_position(self, mp: MaskPosition) -> Self
pub fn mask_position(self, mp: MaskPosition) -> Self
Sets the mask position for this sticker.
Trait Implementations§
Source§impl Clone for InputSticker
impl Clone for InputSticker
Source§fn clone(&self) -> InputSticker
fn clone(&self) -> InputSticker
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputSticker
impl Debug for InputSticker
Source§impl<'de> Deserialize<'de> for InputSticker
impl<'de> Deserialize<'de> for InputSticker
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InputSticker
impl RefUnwindSafe for InputSticker
impl Send for InputSticker
impl Sync for InputSticker
impl Unpin for InputSticker
impl UnsafeUnpin for InputSticker
impl UnwindSafe for InputSticker
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
Mutably borrows from an owned value. Read more