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 roles: Vec<Id<RoleMarker>>,
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
Fields§
§guild_id: Id<GuildMarker>§animated: bool§available: bool§id: Id<EmojiMarker>§managed: bool§name: String§require_colons: bool§roles: Vec<Id<RoleMarker>>§user: Option<Id<UserMarker>>Implementations§
Source§impl 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§
Source§impl Clone for CachedEmoji
impl Clone for CachedEmoji
Source§fn clone(&self) -> CachedEmoji
fn clone(&self) -> CachedEmoji
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 moreAuto Trait Implementations§
impl Freeze for CachedEmoji
impl RefUnwindSafe for CachedEmoji
impl Send for CachedEmoji
impl Sync for CachedEmoji
impl Unpin for CachedEmoji
impl UnwindSafe for CachedEmoji
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