pub struct CachedAttachment {
pub message_id: Id<MessageMarker>,
pub content_type: Option<String>,
pub ephemeral: bool,
pub filename: String,
pub description: Option<String>,
pub height: Option<u64>,
pub id: Id<AttachmentMarker>,
pub proxy_url: String,
pub size: u64,
pub url: String,
pub width: Option<u64>,
}Expand description
A cached attachment
It’s the same as twilight_model::channel::Attachment except:
message_idfield is added, making it possible to return a message’s attachments
Fields§
§message_id: Id<MessageMarker>§content_type: Option<String>§ephemeral: bool§filename: String§description: Option<String>§height: Option<u64>§id: Id<AttachmentMarker>§proxy_url: String§size: u64§url: String§width: Option<u64>Implementations§
Source§impl CachedAttachment
impl CachedAttachment
Sourcepub fn from_attachment(
attachment: Attachment,
message_id: Id<MessageMarker>,
) -> Self
pub fn from_attachment( attachment: Attachment, message_id: Id<MessageMarker>, ) -> Self
Create a cached attachment from a given attachment and message ID
Trait Implementations§
Source§impl Clone for CachedAttachment
impl Clone for CachedAttachment
Source§fn clone(&self) -> CachedAttachment
fn clone(&self) -> CachedAttachment
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 CachedAttachment
impl RefUnwindSafe for CachedAttachment
impl Send for CachedAttachment
impl Sync for CachedAttachment
impl Unpin for CachedAttachment
impl UnwindSafe for CachedAttachment
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