pub struct Sticker {
pub inner: Document,
}Expand description
Ergonomic wrapper over a Telegram sticker (a document with sticker attributes).
Fields§
§inner: DocumentImplementations§
Source§impl Sticker
impl Sticker
Sourcepub fn from_document(doc: Document) -> Option<Self>
pub fn from_document(doc: Document) -> Option<Self>
Wrap a document that carries DocumentAttributeSticker.
Sourcepub fn from_media(media: &MessageMedia) -> Option<Self>
pub fn from_media(media: &MessageMedia) -> Option<Self>
Try to extract directly from MessageMedia.
pub fn id(&self) -> i64
pub fn mime_type(&self) -> &str
Trait Implementations§
Source§impl Downloadable for Sticker
impl Downloadable for Sticker
Source§fn to_input_location(&self) -> Option<InputFileLocation>
fn to_input_location(&self) -> Option<InputFileLocation>
Return the
InputFileLocation needed for upload.getFile.Auto Trait Implementations§
impl Freeze for Sticker
impl RefUnwindSafe for Sticker
impl Send for Sticker
impl Sync for Sticker
impl Unpin for Sticker
impl UnsafeUnpin for Sticker
impl UnwindSafe for Sticker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more