Struct sparkle_cache::model::CachedAttachment
source · 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: boolfilename: Stringdescription: Option<String>height: Option<u64>id: Id<AttachmentMarker>proxy_url: Stringsize: u64url: Stringwidth: Option<u64>Implementations
sourceimpl 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
sourceimpl Clone for CachedAttachment
impl Clone for CachedAttachment
sourcefn clone(&self) -> CachedAttachment
fn clone(&self) -> CachedAttachment
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 CachedAttachment
impl Send for CachedAttachment
impl Sync for CachedAttachment
impl Unpin for CachedAttachment
impl UnwindSafe for CachedAttachment
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