pub struct AttachmentRef<'a> { /* private fields */ }
Expand description
An Attachment
implemented with a borrowed reference to a JSON object.
Implementations§
Source§impl<'a> AttachmentRef<'a>
impl<'a> AttachmentRef<'a>
Source§impl<'a> AttachmentRef<'a>
impl<'a> AttachmentRef<'a>
Sourcepub fn to_attachment(&self) -> Attachment
pub fn to_attachment(&self) -> Attachment
Clones the inner Map
reference and returns an owned type.
Sourcepub fn mime_type(&self) -> Result<Option<&str>, Error>
pub fn mime_type(&self) -> Result<Option<&str>, Error>
The required MIME type (e.g. image/png).
Sourcepub fn title(&self) -> Result<Option<&str>, Error>
pub fn title(&self) -> Result<Option<&str>, Error>
An optional title for the attachment.
§Important
Attachments with the same title are considered to be alternative representations of an attachment.
Trait Implementations§
Source§impl<'a> Debug for AttachmentRef<'a>
impl<'a> Debug for AttachmentRef<'a>
Source§impl<'a> PartialEq for AttachmentRef<'a>
impl<'a> PartialEq for AttachmentRef<'a>
Source§impl<'a> Serialize for AttachmentRef<'a>
impl<'a> Serialize for AttachmentRef<'a>
impl<'a> Eq for AttachmentRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for AttachmentRef<'a>
impl<'a> RefUnwindSafe for AttachmentRef<'a>
impl<'a> Send for AttachmentRef<'a>
impl<'a> Sync for AttachmentRef<'a>
impl<'a> Unpin for AttachmentRef<'a>
impl<'a> UnwindSafe for AttachmentRef<'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