pub struct Xref {
pub cross_reference_type: XrefType,
pub entries: BTreeMap<u32, XrefEntry>,
pub size: u32,
}
Fields§
§cross_reference_type: XrefType
Type of Cross-Reference used in the last incremental version. This method of cross-referencing will also be used when saving the file. PDFs with Incremental Updates should alway use the same cross-reference type.
entries: BTreeMap<u32, XrefEntry>
Entries for indirect object.
size: u32
Total number of entries (including free entries), equal to the highest object number plus 1.
Implementations§
source§impl Xref
impl Xref
pub fn new(size: u32, xref_type: XrefType) -> Xref
pub fn get(&self, id: u32) -> Option<&XrefEntry>
pub fn insert(&mut self, id: u32, entry: XrefEntry)
sourcepub fn merge(&mut self, xref: Xref)
pub fn merge(&mut self, xref: Xref)
Combine Xref entries. Only add them if they do not exists already. Do not replace existing entries.
pub fn clear(&mut self)
pub fn max_id(&self) -> u32
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Xref
impl Send for Xref
impl Sync for Xref
impl Unpin for Xref
impl UnwindSafe for Xref
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