Trait ReadLayers

Source
pub trait ReadLayers<'s> {
    type Layers;
    type Reader: LayersReader<Layers = Self::Layers>;

    // Required method
    fn create_layers_reader(
        &'s self,
        headers: &[Header],
    ) -> Result<Self::Reader>;

    // Provided method
    fn all_attributes(self) -> ReadImage<fn(f64), Self>
       where Self: Sized { ... }
}
Expand description

A template that creates a LayerReader for each layer in the file.

Required Associated Types§

Source

type Layers

The type of the resulting Layers

Source

type Reader: LayersReader<Layers = Self::Layers>

The type of the temporary layer reader

Required Methods§

Source

fn create_layers_reader(&'s self, headers: &[Header]) -> Result<Self::Reader>

Create a single reader for a single layer

Provided Methods§

Source

fn all_attributes(self) -> ReadImage<fn(f64), Self>
where Self: Sized,

Specify that all attributes should be read from an image. Use from_file(path) on the return value of this method to actually decode an image.

Implementors§