pub fn write(&self, write: &mut impl Write, header_count: usize) -> UnitResult {
        debug_assert!(self.layer_index < header_count, "layer index bug"); // validation is done in full_image or simple_image

        if header_count != 1 {  usize_to_i32(self.layer_index).write(write)?; }
        else { assert_eq!(self.layer_index, 0, "invalid header index for single layer file"); }

        match self.compressed_block {
            CompressedBlock::ScanLine     (ref value) => value.write(write),
            CompressedBlock::Tile         (ref value) => value.write(write),
            CompressedBlock::DeepScanLine (ref value) => value.write(write),
            CompressedBlock::DeepTile     (ref value) => value.write(write),
        }
    }
/// Without validation, write this instance to the byte stream.
Without validation, write this instance to the byte stream.
Without validation write this instance to the byte stream .
pub fn write(&self, write: &mut impl Write, header_count: usize) -> UnitResult {
        debug_assert!(self.layer_index < header_count, "layer index bug"); // validation is done in full_image or simple_image
        if header_count != 1 {  usize_to_i32(self.layer_index).write(write)?; }
        else { assert_eq!(self.layer_index, 0, "invalid header index for single layer file"); }
        match self.compressed_block {
            CompressedBlock::ScanLine     (ref value) => value.write(write),
            CompressedBlock::Tile         (ref value) => value.write(write),
            CompressedBlock::DeepScanLine (ref value) => value.write(write),
            CompressedBlock::DeepTile     (ref value) => value.write(write),
        }
    }
pub fn write ( & self , write : & mut impl Write , header_count : usize ) -> UnitResult { debug_assert ! ( self layer_index header_count " " ) ; // validation is done in full_image or simple_image if header_count != 1 { usize_to_i32 ( self . layer_index ) . write ( write ) ? ; } else { assert_eq ! ( self layer_index 0 " " ) ; } match self . compressed_block { CompressedBlock :: ScanLine ( ref value ) => value . write ( write ) , CompressedBlock :: Tile ( ref value ) => value . write ( write ) , CompressedBlock :: DeepScanLine ( ref value ) => value . write ( write ) , CompressedBlock :: DeepTile ( ref value ) => value . write ( write ) , } }
Without validation, write this instance to the byte stream.
Without validation write this instance to the byte stream .
&self
write
&mut impl Write
header_count
usize
&self
write
&mut impl Write
header_count
usize