pub struct Attachment<'a> {Show 13 fields
pub id: Snowflake,
pub filename: TitanString<'a>,
pub description: Option<TitanString<'a>>,
pub content_type: Option<String>,
pub size: u64,
pub url: TitanString<'a>,
pub proxy_url: TitanString<'a>,
pub height: Option<u32>,
pub width: Option<u32>,
pub ephemeral: bool,
pub duration_secs: Option<f64>,
pub waveform: Option<String>,
pub flags: Option<u64>,
}Expand description
An attachment on a message.
Fields§
§id: SnowflakeAttachment ID.
filename: TitanString<'a>Filename.
description: Option<TitanString<'a>>Description.
content_type: Option<String>Media type.
size: u64Size in bytes.
url: TitanString<'a>Source URL.
proxy_url: TitanString<'a>Proxy URL.
height: Option<u32>Height (if image).
width: Option<u32>Width (if image).
ephemeral: boolWhether ephemeral.
duration_secs: Option<f64>Duration in seconds (for voice messages).
waveform: Option<String>Waveform base64 (for voice messages).
flags: Option<u64>Attachment flags.
Trait Implementations§
Source§impl<'a> Clone for Attachment<'a>
impl<'a> Clone for Attachment<'a>
Source§fn clone(&self) -> Attachment<'a>
fn clone(&self) -> Attachment<'a>
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 moreSource§impl<'a> Debug for Attachment<'a>
impl<'a> Debug for Attachment<'a>
Source§impl<'de, 'a> Deserialize<'de> for Attachment<'a>
impl<'de, 'a> Deserialize<'de> for Attachment<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Attachment<'a>
impl<'a> RefUnwindSafe for Attachment<'a>
impl<'a> Send for Attachment<'a>
impl<'a> Sync for Attachment<'a>
impl<'a> Unpin for Attachment<'a>
impl<'a> UnwindSafe for Attachment<'a>
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