pub struct MediaAttachment {
pub content_type: String,
pub url: String,
pub filename: Option<String>,
pub size: Option<u64>,
pub width: Option<u32>,
pub height: Option<u32>,
}Expand description
A media attachment (image, file, etc.) received from the platform.
Fields§
§content_type: StringMIME type: “image/jpeg”, “image/png”, “application/pdf”, etc.
url: StringMedia URL (platform CDN download address).
filename: Option<String>Original filename (if available).
size: Option<u64>File size in bytes (if available).
width: Option<u32>Image width in pixels (if available).
height: Option<u32>Image height in pixels (if available).
Implementations§
Trait Implementations§
Source§impl Clone for MediaAttachment
impl Clone for MediaAttachment
Source§fn clone(&self) -> MediaAttachment
fn clone(&self) -> MediaAttachment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MediaAttachment
impl Debug for MediaAttachment
Source§impl From<MediaAttachment> for MediaAttachment
impl From<MediaAttachment> for MediaAttachment
Source§fn from(att: MediaAttachment) -> Self
fn from(att: MediaAttachment) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MediaAttachment
impl RefUnwindSafe for MediaAttachment
impl Send for MediaAttachment
impl Sync for MediaAttachment
impl Unpin for MediaAttachment
impl UnsafeUnpin for MediaAttachment
impl UnwindSafe for MediaAttachment
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