pub struct Attachment {
pub name: String,
pub data: Vec<u8>,
pub mime: Option<String>,
pub modified: Option<Date>,
pub description: Option<String>,
}Expand description
A document-level attachment, embedded via the catalog’s /Names /EmbeddedFiles name tree (ISO 32000 §7.11.4). Unlike a page’s painted
content, an attachment carries no rendering — only the bytes and the
metadata a viewer shows about them.
Fields§
§name: StringThe file name: written as both the filespec’s /F and /UF, and
as the name-tree key.
data: Vec<u8>The attachment’s raw bytes, stored as the embedded-file stream
(compressed like any other stream, per WriteOptions::compress).
mime: Option<String>MIME type, written as the embedded-file stream’s /Subtype.
None writes application/octet-stream.
modified: Option<Date>/Params /ModDate, written only when given.
description: Option<String>/Desc on the filespec, written only when given.
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 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