Struct ChunkWriter

#[must_use]
pub struct ChunkWriter<W> { /* private fields */ }

Can consume compressed pixel chunks, writing them a file. Use sequential_blocks_compressor or parallel_blocks_compressor to compress your data, or use compress_all_blocks_sequential or compress_all_blocks_parallel. Use on_progress to obtain a new writer that triggers a callback for each block.

Trait Implementations

impl<W> ChunksWriter for ChunkWriter<W> where W: Write + Seek,

fn total_chunks_count(&self) -> usize

The total number of chunks that the complete file will contain.

fn write_chunk(&mut self, index_in_header_increasing_y: usize, chunk: Chunk) -> UnitResult

Any more calls will result in an error and have no effect. If writing results in an error, the file and the writer may remain in an invalid state and should not be used further. Errors when the chunk at this index was already written.

impl<W: Debug> Debug for ChunkWriter<W>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<W> Freeze for ChunkWriter<W> where Tracking<W>: Freeze,

impl<W> RefUnwindSafe for ChunkWriter<W> where Tracking<W>: RefUnwindSafe,

impl<W> Send for ChunkWriter<W> where Tracking<W>: Send,

impl<W> Sync for ChunkWriter<W> where Tracking<W>: Sync,

impl<W> Unpin for ChunkWriter<W> where Tracking<W>: Unpin,

impl<W> UnsafeUnpin for ChunkWriter<W> where Tracking<W>: UnsafeUnpin,

impl<W> UnwindSafe for ChunkWriter<W> where Tracking<W>: UnwindSafe,

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for ChunkWriter<W> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for ChunkWriter<W> where ST: ?Sized, DT: ?Sized,

impl<T> Any for ChunkWriter<W> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ChunkWriter<W> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ChunkWriter<W> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for ChunkWriter<W>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for ChunkWriter<W>

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> Read<Exclusive, BecauseExclusive> for ChunkWriter<W> where T: ?Sized,

impl<T, U> Into<U> for ChunkWriter<W> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for ChunkWriter<W> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ChunkWriter<W> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>