pub struct DecodedSource { /* private fields */ }Expand description
A producer that decodes a stream on demand, forward only.
Construction parses the header only — no pixel bytes are read — so
Image::metadata stays free and laziness holds (SPEC §Guarantees 3).
§Memory
Constant, and independent of image height: the decoder is advanced to the requested band and exactly that band is retained as a rolling window. This is what makes SPEC §Guarantees 1 true for streaming formats — the whole image is never resident.
The window also absorbs repeated demand for the same band, which is what lets two graph branches share one source without either re-reading a stream that has already moved on.
§Forward only
A request that starts before the window is an error, not a rewind: the
bytes are gone (ADR-0005). The scheduler is responsible for never asking —
Plan detects non-forward demand ahead of time and materializes instead
(ADR-0009). Reaching this error therefore indicates a scheduling defect, and
it is reported rather than papered over.
Implementations§
Trait Implementations§
Source§impl Debug for DecodedSource
impl Debug for DecodedSource
Source§impl Producer for DecodedSource
impl Producer for DecodedSource
Source§fn descriptor(&self) -> ImageDescriptor
fn descriptor(&self) -> ImageDescriptor
Source§fn capability(&self) -> DecodeCapability
fn capability(&self) -> DecodeCapability
Source§fn reduced_descriptor(&self, target: (u32, u32)) -> Option<ImageDescriptor>
fn reduced_descriptor(&self, target: (u32, u32)) -> Option<ImageDescriptor>
target or larger, when it
can reach that size more cheaply than by producing full resolution. Read more