Struct exr::block::writer::SortedBlocksWriter
source · pub struct SortedBlocksWriter<'w, W> {
chunk_writer: &'w mut W,
pending_chunks: BTreeMap<usize, (usize, Chunk)>,
unwritten_chunk_indices: Peekable<Range<usize>>,
requires_sorting: bool,
}
Expand description
Write blocks that appear in any order and reorder them before writing.
Fields§
§chunk_writer: &'w mut W
§pending_chunks: BTreeMap<usize, (usize, Chunk)>
§unwritten_chunk_indices: Peekable<Range<usize>>
§requires_sorting: bool
Implementations§
source§impl<'w, W> SortedBlocksWriter<'w, W>where
W: ChunksWriter,
impl<'w, W> SortedBlocksWriter<'w, W>where
W: ChunksWriter,
sourcepub fn new(
meta_data: &MetaData,
chunk_writer: &'w mut W,
) -> SortedBlocksWriter<'w, W>
pub fn new( meta_data: &MetaData, chunk_writer: &'w mut W, ) -> SortedBlocksWriter<'w, W>
New sorting writer. Returns None
if sorting is not required.
sourcepub fn write_or_stash_chunk(
&mut self,
chunk_index_in_file: usize,
chunk_y_index: usize,
chunk: Chunk,
) -> UnitResult
pub fn write_or_stash_chunk( &mut self, chunk_index_in_file: usize, chunk_y_index: usize, chunk: Chunk, ) -> UnitResult
Write the chunk or stash it. In the closure, write all chunks that can be written now.
sourcepub fn inner_chunks_writer(&self) -> &W
pub fn inner_chunks_writer(&self) -> &W
Where the chunks will be written to.
Trait Implementations§
Auto Trait Implementations§
impl<'w, W> Freeze for SortedBlocksWriter<'w, W>
impl<'w, W> RefUnwindSafe for SortedBlocksWriter<'w, W>where
W: RefUnwindSafe,
impl<'w, W> Send for SortedBlocksWriter<'w, W>where
W: Send,
impl<'w, W> Sync for SortedBlocksWriter<'w, W>where
W: Sync,
impl<'w, W> Unpin for SortedBlocksWriter<'w, W>
impl<'w, W> !UnwindSafe for SortedBlocksWriter<'w, W>
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