pub struct XrefTable {
pub entries: HashMap<u32, XrefEntry>,
pub trailer: Dict,
}Expand description
A parsed cross-reference table + trailer dict.
Fields§
§entries: HashMap<u32, XrefEntry>Object number → entry. Sparse — a 50-object PDF doesn’t need 50 vec slots if some are never referenced.
trailer: DictThe trailer dictionary that follows the xref subsection list.
Carries /Size, /Root, optionally /Info, /Prev, /ID.
Implementations§
Source§impl XrefTable
impl XrefTable
Sourcepub fn offset_of(&self, id: ObjectId) -> Option<u64>
pub fn offset_of(&self, id: ObjectId) -> Option<u64>
Look up the byte offset of an object by id. None if the id
doesn’t appear in the xref or its slot is Free / Compressed
(the reader can’t yet resolve compressed objects).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XrefTable
impl RefUnwindSafe for XrefTable
impl Send for XrefTable
impl Sync for XrefTable
impl Unpin for XrefTable
impl UnsafeUnpin for XrefTable
impl UnwindSafe for XrefTable
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