pub struct Attachment {
pub id: String,
pub grant_id: Option<String>,
pub filename: Option<String>,
pub content_type: Option<String>,
pub size: Option<u64>,
pub content_id: Option<String>,
pub is_inline: Option<bool>,
}Expand description
An attachment object from the Nylas API.
Attachments are files attached to messages or drafts.
§Example
let attachment = Attachment {
id: "attachment_123".to_string(),
grant_id: Some("grant_123".to_string()),
filename: Some("document.pdf".to_string()),
content_type: Some("application/pdf".to_string()),
size: Some(12345),
content_id: None,
is_inline: Some(false),
};Fields§
§id: StringUnique identifier for the attachment.
grant_id: Option<String>Grant ID associated with this attachment.
filename: Option<String>Filename of the attachment.
content_type: Option<String>MIME type of the attachment.
size: Option<u64>Size of the attachment in bytes.
content_id: Option<String>Content ID for inline attachments (used in HTML emails).
is_inline: Option<bool>Whether the attachment is displayed inline.
Implementations§
Source§impl Attachment
impl Attachment
Sourcepub fn builder() -> AttachmentBuilder
pub fn builder() -> AttachmentBuilder
Create a new attachment builder.
Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§fn clone(&self) -> Attachment
fn clone(&self) -> Attachment
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 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
impl Eq for Attachment
Source§impl PartialEq for Attachment
impl PartialEq for Attachment
Source§fn eq(&self, other: &Attachment) -> bool
fn eq(&self, other: &Attachment) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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