Struct sparkle_cache::model::CachedEmoji
source · pub struct CachedEmoji {
pub guild_id: Id<GuildMarker>,
pub animated: bool,
pub available: bool,
pub id: Id<EmojiMarker>,
pub managed: bool,
pub name: String,
pub require_colons: bool,
pub user: Option<Id<UserMarker>>,
}Expand description
A cached emoji
It’s the same as twilight_model::guild::Emoji
except:
-
guild_idfield is added, making it possible to return a guild’s emojis -
userfield is changed to a user ID, as users are cached separately -
rolesfield is removed, as caching it is likely unnecessary, if you need this field, please create an issue
Fields
guild_id: Id<GuildMarker>animated: boolavailable: boolid: Id<EmojiMarker>managed: boolname: Stringrequire_colons: booluser: Option<Id<UserMarker>>Implementations
sourceimpl CachedEmoji
impl CachedEmoji
sourcepub fn from_emoji(emoji: &Emoji, guild_id: Id<GuildMarker>) -> Self
pub fn from_emoji(emoji: &Emoji, guild_id: Id<GuildMarker>) -> Self
Create a cached emoji from a given emoji and guild ID
Trait Implementations
sourceimpl Clone for CachedEmoji
impl Clone for CachedEmoji
sourcefn clone(&self) -> CachedEmoji
fn clone(&self) -> CachedEmoji
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations
impl RefUnwindSafe for CachedEmoji
impl Send for CachedEmoji
impl Sync for CachedEmoji
impl Unpin for CachedEmoji
impl UnwindSafe for CachedEmoji
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