Skip to main content

j2k_core/
row_sink.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3use crate::sample::Sample;
4
5/// Destination for row-streaming decode output.
6pub trait RowSink<S: Sample> {
7    /// Error returned by the sink when it cannot accept a row.
8    type Error: core::error::Error + Send + Sync + 'static;
9
10    /// Write one decoded row at source/output row index `y`.
11    fn write_row(&mut self, y: u32, row: &[S]) -> Result<(), Self::Error>;
12}