pub struct XRefStreamWriter { /* private fields */ }Expand description
Writer for XRef streams
Implementations§
Source§impl XRefStreamWriter
impl XRefStreamWriter
Sourcepub fn set_trailer_info(&mut self, root_id: ObjectId, info_id: ObjectId)
pub fn set_trailer_info(&mut self, root_id: ObjectId, info_id: ObjectId)
Set trailer information
Sourcepub fn add_free_entry(&mut self, next_free: u32, generation: u16)
pub fn add_free_entry(&mut self, next_free: u32, generation: u16)
Add a free entry
Sourcepub fn add_in_use_entry(&mut self, offset: u64, generation: u16)
pub fn add_in_use_entry(&mut self, offset: u64, generation: u16)
Add an in-use entry
Sourcepub fn add_compressed_entry(&mut self, stream_object_number: u32, index: u32)
pub fn add_compressed_entry(&mut self, stream_object_number: u32, index: u32)
Add a compressed entry
Sourcepub fn encode_entries(&self) -> Vec<u8> ⓘ
pub fn encode_entries(&self) -> Vec<u8> ⓘ
Encode entries into binary data
Sourcepub fn create_dictionary(&self, prev_xref: Option<u64>) -> Dictionary
pub fn create_dictionary(&self, prev_xref: Option<u64>) -> Dictionary
Create the XRef stream dictionary
Sourcepub fn write_xref_stream<W: Write>(
&self,
writer: &mut W,
_stream_position: u64,
prev_xref: Option<u64>,
) -> Result<()>
pub fn write_xref_stream<W: Write>( &self, writer: &mut W, _stream_position: u64, prev_xref: Option<u64>, ) -> Result<()>
Write the complete XRef stream object
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Get the number of entries
Auto Trait Implementations§
impl Freeze for XRefStreamWriter
impl RefUnwindSafe for XRefStreamWriter
impl Send for XRefStreamWriter
impl Sync for XRefStreamWriter
impl Unpin for XRefStreamWriter
impl UnwindSafe for XRefStreamWriter
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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