pub struct Attachment {
pub uri: String,
pub params: Vec<(String, String)>,
}Fields§
§uri: String§params: Vec<(String, String)>Implementations§
Source§impl Attachment
impl Attachment
pub fn new(uri: impl Into<String>) -> Self
Sourcepub fn filename(&self) -> Option<&str>
pub fn filename(&self) -> Option<&str>
The human-readable FILENAME parameter, if present. CalDAV managed
attachments and Google Drive attachments both carry the file’s name
here; bare ATTACH:<uri> references don’t.
Sourcepub fn from_property(prop: &Property) -> Option<Self>
pub fn from_property(prop: &Property) -> Option<Self>
Parse an ATTACH property, keeping it ONLY when it’s a URI reference (default behaviour
for Google Drive attachments and iCloud attachments)
Returns None for inline binary attachments (we don’t want to store long blobs)
Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§impl Debug for Attachment
impl Debug for Attachment
impl Eq for Attachment
Source§impl From<&Attachment> for Property
impl From<&Attachment> for Property
Source§fn from(value: &Attachment) -> Self
fn from(value: &Attachment) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Attachment
impl PartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.