pub struct CachedEmbed {Show 29 fields
pub id: Id<GenericMarker>,
pub message_id: Id<MessageMarker>,
pub author_icon_url: Option<String>,
pub author_name: Option<String>,
pub author_proxy_icon_url: Option<String>,
pub author_url: Option<String>,
pub color: Option<u32>,
pub description: Option<String>,
pub footer_icon_url: Option<String>,
pub footer_proxy_icon_url: Option<String>,
pub footer_text: Option<String>,
pub image_height: Option<u64>,
pub image_proxy_url: Option<String>,
pub image_url: Option<String>,
pub image_width: Option<u64>,
pub kind: String,
pub provider_name: Option<String>,
pub provider_url: Option<String>,
pub thumbnail_height: Option<u64>,
pub thumbnail_proxy_url: Option<String>,
pub thumbnail_url: Option<String>,
pub thumbnail_width: Option<u64>,
pub timestamp: Option<Timestamp>,
pub title: Option<String>,
pub url: Option<String>,
pub video_height: Option<u64>,
pub video_proxy_url: Option<String>,
pub video_url: Option<String>,
pub video_width: Option<u64>,
}Expand description
A cached embed
It’s the same as twilight_model::channel::embed::Embed except:
-
fieldsfield is removed andidfield is added, making it possible to return an embed’s fields -
message_idfield is added, making it possible to return a message’s embeds -
author,footer,image,provider,thumbnailandvideofields are flattened, making this struct easier to cache
Fields§
§id: Id<GenericMarker>§message_id: Id<MessageMarker>§color: Option<u32>§description: Option<String>§image_height: Option<u64>§image_proxy_url: Option<String>§image_url: Option<String>§image_width: Option<u64>§kind: String§provider_name: Option<String>§provider_url: Option<String>§thumbnail_height: Option<u64>§thumbnail_proxy_url: Option<String>§thumbnail_url: Option<String>§thumbnail_width: Option<u64>§timestamp: Option<Timestamp>§title: Option<String>§url: Option<String>§video_height: Option<u64>§video_proxy_url: Option<String>§video_url: Option<String>§video_width: Option<u64>Implementations§
Source§impl CachedEmbed
impl CachedEmbed
Sourcepub fn from_embed(embed: Embed, message_id: Id<MessageMarker>) -> Self
pub fn from_embed(embed: Embed, message_id: Id<MessageMarker>) -> Self
Create a cached embed from a given embed and message ID
Trait Implementations§
Source§impl Clone for CachedEmbed
impl Clone for CachedEmbed
Source§fn clone(&self) -> CachedEmbed
fn clone(&self) -> CachedEmbed
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 CachedEmbed
impl RefUnwindSafe for CachedEmbed
impl Send for CachedEmbed
impl Sync for CachedEmbed
impl Unpin for CachedEmbed
impl UnwindSafe for CachedEmbed
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