Struct sparkle_cache::model::CachedSticker
source · [−]pub struct CachedSticker {
pub message_id: Option<Id<MessageMarker>>,
pub available: Option<bool>,
pub description: Option<String>,
pub format_type: StickerFormatType,
pub guild_id: Option<Id<GuildMarker>>,
pub id: Id<StickerMarker>,
pub kind: Option<StickerType>,
pub name: String,
pub pack_id: Option<Id<StickerPackMarker>>,
pub sort_value: Option<u64>,
pub tags: Option<String>,
pub user_id: Option<Id<UserMarker>>,
}Expand description
A cached sticker
It’s the same as twilight_model::channel::message::sticker::Sticker
except:
-
message_idfield is added, making it possible to return a message’s stickers -
userfield is changed to a user ID, since users are cached separately -
available,kindandtagsfields are made optional, as they’re not present in message stickers
Fields
message_id: Option<Id<MessageMarker>>available: Option<bool>description: Option<String>format_type: StickerFormatTypeguild_id: Option<Id<GuildMarker>>id: Id<StickerMarker>kind: Option<StickerType>name: Stringpack_id: Option<Id<StickerPackMarker>>sort_value: Option<u64>user_id: Option<Id<UserMarker>>Implementations
sourceimpl CachedSticker
impl CachedSticker
sourcepub fn from_message_sticker(
message_sticker: MessageSticker,
message_id: Id<MessageMarker>
) -> Self
pub fn from_message_sticker(
message_sticker: MessageSticker,
message_id: Id<MessageMarker>
) -> Self
Create a cached sticker from a given message sticker and message ID
Trait Implementations
sourceimpl Clone for CachedSticker
impl Clone for CachedSticker
sourcefn clone(&self) -> CachedSticker
fn clone(&self) -> CachedSticker
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for CachedSticker
impl Debug for CachedSticker
Auto Trait Implementations
impl RefUnwindSafe for CachedSticker
impl Send for CachedSticker
impl Sync for CachedSticker
impl Unpin for CachedSticker
impl UnwindSafe for CachedSticker
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more