pub enum InputSticker {
Animated(InputStickerAnimated),
Static(InputStickerStatic),
// some variants omitted
}Expand description
Describes a sticker that needs to be added to a sticker set
Variants§
Animated(InputStickerAnimated)
An animated sticker in TGS format
Static(InputStickerStatic)
A static sticker in PNG format, which will be converted to WEBP server-side
Implementations§
Source§impl InputSticker
impl InputSticker
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
pub fn is_animated(&self) -> bool
pub fn is_static(&self) -> bool
pub fn on_animated<F: FnOnce(&InputStickerAnimated)>(&self, fnc: F) -> &Self
pub fn on_static<F: FnOnce(&InputStickerStatic)>(&self, fnc: F) -> &Self
pub fn as_animated(&self) -> Option<&InputStickerAnimated>
pub fn as_static(&self) -> Option<&InputStickerStatic>
pub fn animated<T: AsRef<InputStickerAnimated>>(t: T) -> Self
pub fn static_<T: AsRef<InputStickerStatic>>(t: T) -> Self
Trait Implementations§
Source§impl AsRef<InputSticker> for InputSticker
impl AsRef<InputSticker> for InputSticker
Source§fn as_ref(&self) -> &InputSticker
fn as_ref(&self) -> &InputSticker
Converts this type into a shared reference of the (usually inferred) input type.
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 Default for InputSticker
impl Default for InputSticker
Source§impl<'de> Deserialize<'de> for InputSticker
impl<'de> Deserialize<'de> for InputSticker
Source§fn deserialize<D>(deserializer: D) -> Result<InputSticker, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<InputSticker, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl RObject for InputSticker
impl RObject for InputSticker
Auto Trait Implementations§
impl Freeze for InputSticker
impl RefUnwindSafe for InputSticker
impl Send for InputSticker
impl Sync for InputSticker
impl Unpin 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