pub enum XrefEntry {
Free,
UnusableFree,
Normal {
offset: u32,
generation: u16,
},
Compressed {
container: u32,
index: u16,
},
}Variants§
Implementations§
Source§impl XrefEntry
impl XrefEntry
pub fn is_normal(&self) -> bool
pub fn is_compressed(&self) -> bool
Sourcepub fn encode_for_xref_stream(&self, widths: &[usize; 3]) -> Vec<u8> ⓘ
pub fn encode_for_xref_stream(&self, widths: &[usize; 3]) -> Vec<u8> ⓘ
Encode entry for use in cross-reference stream
Sourcepub fn write_xref_entry(&self, file: &mut dyn Write) -> Result<()>
pub fn write_xref_entry(&self, file: &mut dyn Write) -> Result<()>
Write Entry in Cross Reference Table.
Each entry is exactly 20 bytes: 10-digit offset, space, 5-digit
generation, space, keyword (n/f), CR, LF.
Uses CR+LF as the 2-byte EOL per PDF specification §7.5.4.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XrefEntry
impl RefUnwindSafe for XrefEntry
impl Send for XrefEntry
impl Sync for XrefEntry
impl Unpin for XrefEntry
impl UnsafeUnpin for XrefEntry
impl UnwindSafe for XrefEntry
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