pub struct NoneMore;
Expand description
No more recursion. Can be used within any Recursive<NoneMore, YourValue>
type.
Trait Implementations§
source§impl CheckDuplicates for NoneMore
impl CheckDuplicates for NoneMore
source§fn already_contains(&self, _: &Text) -> bool
fn already_contains(&self, _: &Text) -> bool
Check for duplicate channel names.
source§impl IntoNonRecursive for NoneMore
impl IntoNonRecursive for NoneMore
source§type NonRecursive = ()
type NonRecursive = ()
The resulting tuple type.
source§fn into_non_recursive(self) -> Self::NonRecursive
fn into_non_recursive(self) -> Self::NonRecursive
Convert this recursive type to a nice tuple.
source§impl IntoRecursive for NoneMore
impl IntoRecursive for NoneMore
source§impl LayersWriter for NoneMore
impl LayersWriter for NoneMore
source§fn extract_uncompressed_block(&self, _: &[Header], _: BlockIndex) -> Vec<u8> ⓘ
fn extract_uncompressed_block(&self, _: &[Header], _: BlockIndex) -> Vec<u8> ⓘ
Deliver a block of pixels from a single layer to be stored in the file
source§impl ReadSpecificChannel for NoneMore
impl ReadSpecificChannel for NoneMore
source§type RecursivePixelReader = NoneMore
type RecursivePixelReader = NoneMore
A separate internal reader for the pixels. Will be of type
Recursive<_, SampleReader<_>>
,
depending on the pixels of the specific channel combination.source§fn create_recursive_reader(
&self,
_: &ChannelList,
) -> Result<Self::RecursivePixelReader>
fn create_recursive_reader( &self, _: &ChannelList, ) -> Result<Self::RecursivePixelReader>
Create a separate internal reader for the pixels of the specific channel combination.
source§fn required<Sample>(
self,
channel_name: impl Into<Text>,
) -> ReadRequiredChannel<Self, Sample>
fn required<Sample>( self, channel_name: impl Into<Text>, ) -> ReadRequiredChannel<Self, Sample>
Plan to read an additional channel from the image, with the specified name.
If the channel cannot be found in the image when the image is read, the image will not be loaded.
The generic parameter can usually be inferred from the closure in
collect_pixels
.source§fn optional<Sample>(
self,
channel_name: impl Into<Text>,
default_sample: Sample,
) -> ReadOptionalChannel<Self, Sample>
fn optional<Sample>( self, channel_name: impl Into<Text>, default_sample: Sample, ) -> ReadOptionalChannel<Self, Sample>
Plan to read an additional channel from the image, with the specified name.
If the file does not contain this channel, the specified default sample will be returned instead.
You can check whether the channel has been loaded by
checking the presence of the optional channel description before instantiating your own image.
The generic parameter can usually be inferred from the closure in
collect_pixels
.source§fn collect_pixels<Pixel, PixelStorage, CreatePixels, SetPixel>(
self,
create_pixels: CreatePixels,
set_pixel: SetPixel,
) -> CollectPixels<Self, Pixel, PixelStorage, CreatePixels, SetPixel>where
<Self::RecursivePixelReader as RecursivePixelReader>::RecursivePixel: IntoTuple<Pixel>,
<Self::RecursivePixelReader as RecursivePixelReader>::RecursiveChannelDescriptions: IntoNonRecursive,
CreatePixels: Fn(Vec2<usize>, &<<Self::RecursivePixelReader as RecursivePixelReader>::RecursiveChannelDescriptions as IntoNonRecursive>::NonRecursive) -> PixelStorage,
SetPixel: Fn(&mut PixelStorage, Vec2<usize>, Pixel),
fn collect_pixels<Pixel, PixelStorage, CreatePixels, SetPixel>(
self,
create_pixels: CreatePixels,
set_pixel: SetPixel,
) -> CollectPixels<Self, Pixel, PixelStorage, CreatePixels, SetPixel>where
<Self::RecursivePixelReader as RecursivePixelReader>::RecursivePixel: IntoTuple<Pixel>,
<Self::RecursivePixelReader as RecursivePixelReader>::RecursiveChannelDescriptions: IntoNonRecursive,
CreatePixels: Fn(Vec2<usize>, &<<Self::RecursivePixelReader as RecursivePixelReader>::RecursiveChannelDescriptions as IntoNonRecursive>::NonRecursive) -> PixelStorage,
SetPixel: Fn(&mut PixelStorage, Vec2<usize>, Pixel),
Using two closures, define how to store the pixels.
The first closure creates an image, and the second closure inserts a single pixel.
The type of the pixel can be defined by the second closure;
it must be a tuple containing
f16
, f32
, u32
or Sample
values.
See the examples for more information.source§impl RecursivePixelReader for NoneMore
impl RecursivePixelReader for NoneMore
source§type RecursiveChannelDescriptions = NoneMore
type RecursiveChannelDescriptions = NoneMore
The channel descriptions from the image.
Will be converted to a tuple before being stored in
SpecificChannels<_, ChannelDescriptions>
.source§fn get_descriptions(&self) -> Self::RecursiveChannelDescriptions
fn get_descriptions(&self) -> Self::RecursiveChannelDescriptions
Returns the channel descriptions based on the channels in the file.
source§type RecursivePixel = NoneMore
type RecursivePixel = NoneMore
The pixel type. Will be converted to a tuple at the end of the process.
source§fn read_pixels<'s, FullPixel>(
&self,
_: &'s [u8],
_: &mut [FullPixel],
_: impl Fn(&mut FullPixel) -> &mut NoneMore,
)
fn read_pixels<'s, FullPixel>( &self, _: &'s [u8], _: &mut [FullPixel], _: impl Fn(&mut FullPixel) -> &mut NoneMore, )
Read the line of pixels.
source§impl RecursivePixelWriter<NoneMore> for NoneMore
impl RecursivePixelWriter<NoneMore> for NoneMore
source§fn write_pixels<FullPixel>(
&self,
_: &mut [u8],
_: &[FullPixel],
_: impl Fn(&FullPixel) -> &NoneMore,
)
fn write_pixels<FullPixel>( &self, _: &mut [u8], _: &[FullPixel], _: impl Fn(&FullPixel) -> &NoneMore, )
Write pixels to a slice of bytes. Recursively do this for all channels.
source§impl ValidateResult for NoneMore
impl ValidateResult for NoneMore
source§fn validate_result(
&self,
_: &Self,
_: ValidationOptions,
_: impl Fn() -> String,
) -> ValidationResult
fn validate_result( &self, _: &Self, _: ValidationOptions, _: impl Fn() -> String, ) -> ValidationResult
Compare self with the other.
Exceptional behaviour: Read more
source§fn assert_equals_result(&self, result: &Self)
fn assert_equals_result(&self, result: &Self)
Compare self with the other. Panics if not equal. Read more
source§impl WritableChannelsDescription<NoneMore> for NoneMore
impl WritableChannelsDescription<NoneMore> for NoneMore
source§type RecursiveWriter = NoneMore
type RecursiveWriter = NoneMore
A type that has a recursive entry for each channel in the image,
which must accept the desired pixel type.
source§fn create_recursive_writer(&self, _: &ChannelList) -> Self::RecursiveWriter
fn create_recursive_writer(&self, _: &ChannelList) -> Self::RecursiveWriter
Create the temporary writer, accepting the sorted list of channels from
channel_descriptions_list
.source§fn channel_descriptions_list(&self) -> SmallVec<[ChannelDescription; 5]> ⓘ
fn channel_descriptions_list(&self) -> SmallVec<[ChannelDescription; 5]> ⓘ
Return all the channels that should actually end up in the image, in any order.
source§impl<'slf> WritableLayers<'slf> for NoneMore
impl<'slf> WritableLayers<'slf> for NoneMore
source§fn infer_headers(&self, _: &ImageAttributes) -> Headers
fn infer_headers(&self, _: &ImageAttributes) -> Headers
Generate the file meta data for this list of layers
source§fn create_writer(&'slf self, _: &[Header]) -> Self::Writer
fn create_writer(&'slf self, _: &[Header]) -> Self::Writer
Create a temporary writer for this list of layers
impl Copy for NoneMore
impl Eq for NoneMore
impl StructuralPartialEq for NoneMore
Auto Trait Implementations§
impl Freeze for NoneMore
impl RefUnwindSafe for NoneMore
impl Send for NoneMore
impl Sync for NoneMore
impl Unpin for NoneMore
impl UnwindSafe for NoneMore
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<I> IntoTuple<<I as IntoNonRecursive>::NonRecursive> for Iwhere
I: IntoNonRecursive,
impl<I> IntoTuple<<I as IntoNonRecursive>::NonRecursive> for Iwhere
I: IntoNonRecursive,
source§fn into_tuple(self) -> <I as IntoNonRecursive>::NonRecursive
fn into_tuple(self) -> <I as IntoNonRecursive>::NonRecursive
Convert this recursive type to a nice tuple.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.