pub struct Attachment {Show 14 fields
pub content_type: Option<String>,
pub ephemeral: bool,
pub duration_secs: Option<f64>,
pub filename: String,
pub flags: Option<AttachmentFlags>,
pub description: Option<String>,
pub height: Option<u64>,
pub id: Id<AttachmentMarker>,
pub proxy_url: String,
pub size: u64,
pub title: Option<String>,
pub url: String,
pub waveform: Option<String>,
pub width: Option<u64>,
}
Fields§
§content_type: Option<String>
Attachment’s media type.
ephemeral: bool
Whether this attachment is ephemeral.
Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
duration_secs: Option<f64>
Duration of the audio file (currently for voice messages).
filename: String
§flags: Option<AttachmentFlags>
§description: Option<String>
§height: Option<u64>
§id: Id<AttachmentMarker>
§proxy_url: String
§size: u64
§title: Option<String>
The title of the file.
url: String
§waveform: Option<String>
Base64 encoded bytearray representing a sampled waveform (currently for voice messages).
width: Option<u64>
Trait Implementations§
source§impl Clone for Attachment
impl Clone for Attachment
source§fn clone(&self) -> Attachment
fn clone(&self) -> Attachment
Returns a copy 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 Debug for Attachment
impl Debug for Attachment
source§impl<'de> Deserialize<'de> for Attachment
impl<'de> Deserialize<'de> for Attachment
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
source§impl PartialEq for Attachment
impl PartialEq for Attachment
source§impl Serialize for Attachment
impl Serialize for Attachment
impl StructuralPartialEq for Attachment
Auto Trait Implementations§
impl Freeze for Attachment
impl RefUnwindSafe for Attachment
impl Send for Attachment
impl Sync for Attachment
impl Unpin for Attachment
impl UnwindSafe for Attachment
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)