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 Freeze for Xref
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more