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.) included in a user message.
Fields§
§content_type: StringMIME type (e.g. “image/jpeg”, “application/pdf”).
url: StringURL to access the media.
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 moreAuto 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