pub struct PdfAttachment {
pub name: String,
pub mime_type: Option<String>,
pub bytes: Vec<u8>,
pub modified: Option<String>,
pub af_relationship: Option<AfRelationship>,
}Expand description
One embedded-file attachment surfaced by attachments.
Fields§
§name: StringFile name from /UF (UTF-16BE) or /F (PDFDocEncoded). The
reader prefers /UF when present per §7.11.2 Table 43.
mime_type: Option<String>MIME type from the embedded-file stream’s /Subtype. None
when omitted by the producer.
bytes: Vec<u8>Decoded file payload — /Filter-reversed bytes.
modified: Option<String>/Params /ModDate modification date (raw PDF date string,
D:YYYYMMDDHHmmSSOHH'mm' per §7.9.4). None when absent.
af_relationship: Option<AfRelationship>/AFRelationship Name from the filespec dict, parsed per
ISO 32000-2 §7.11.3 Table 44. None when the filespec omits
the entry (the spec defaults the meaning to Unspecified
but we surface absence as None so callers can distinguish a
PDF 1.x attachment from a PDF 2.0 producer that explicitly
wrote /AFRelationship /Unspecified). Vendor / second-class
names (§Annex E) outside the enumerated eight also surface as
None — the reader refuses to coerce unknown names.
Trait Implementations§
Source§impl Clone for PdfAttachment
impl Clone for PdfAttachment
Source§fn clone(&self) -> PdfAttachment
fn clone(&self) -> PdfAttachment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more