Struct CroppedChannels

pub struct CroppedChannels<Channels> { pub full_channels: Channels, pub full_bounds: IntegerBounds, pub cropped_bounds: IntegerBounds }

A smaller window into an existing pixel storage

Fields

full_channels: Channels

The uncropped pixel storage

full_bounds: IntegerBounds

The uncropped pixel storage bounds

cropped_bounds: IntegerBounds

The cropped pixel storage bounds

Implementations

impl<Channels> CroppedChannels<Channels>

fn crop_layer(new_bounds: IntegerBounds, layer: Layer<Channels>) -> Layer<CroppedChannels<Channels>>

Wrap a layer in a cropped view with adjusted bounds, but without reallocating your pixels

Trait Implementations

impl<'slf, Channels> WritableChannels<'slf> for CroppedChannels<Channels> where Channels: WritableChannels<'slf> + 'slf,

type Writer = CroppedWriter<<Channels as WritableChannels<'slf>>::Writer>;
fn infer_channel_list(&self) -> ChannelList
fn infer_level_modes(&self) -> (LevelMode, RoundingMode)
fn create_writer(&'slf self, header: &Header) -> Self::Writer

impl<Channels: Clone> Clone for CroppedChannels<Channels>

fn clone(&self) -> Self

impl<Channels: Debug> Debug for CroppedChannels<Channels>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<Channels: Eq> Eq for CroppedChannels<Channels>

impl<Channels: PartialEq> PartialEq for CroppedChannels<Channels>

fn eq(&self, other: &Self) -> bool

impl<Channels: PartialEq> StructuralPartialEq for CroppedChannels<Channels>

Auto Trait Implementations

impl<Channels> Freeze for CroppedChannels<Channels> where Channels: Freeze,

impl<Channels> RefUnwindSafe for CroppedChannels<Channels> where Channels: RefUnwindSafe,

impl<Channels> Send for CroppedChannels<Channels> where Channels: Send,

impl<Channels> Sync for CroppedChannels<Channels> where Channels: Sync,

impl<Channels> Unpin for CroppedChannels<Channels> where Channels: Unpin,

impl<Channels> UnsafeUnpin for CroppedChannels<Channels> where Channels: UnsafeUnpin,

impl<Channels> UnwindSafe for CroppedChannels<Channels> where Channels: UnwindSafe,

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for CroppedChannels<Channels> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for CroppedChannels<Channels> where ST: ?Sized, DT: ?Sized,

impl<T> Any for CroppedChannels<Channels> where T: 'static + ?Sized,

impl<T> Borrow<T> for CroppedChannels<Channels> where T: ?Sized,

impl<T> BorrowMut<T> for CroppedChannels<Channels> where T: ?Sized,

impl<T> CloneToUninit for CroppedChannels<Channels> where T: Clone,

impl<T> From<T> for CroppedChannels<Channels>

impl<T> Pointable for CroppedChannels<Channels>

impl<T> Read<Exclusive, BecauseExclusive> for CroppedChannels<Channels> where T: ?Sized,

impl<T> ToOwned for CroppedChannels<Channels> where T: Clone,

impl<T, U> Into<U> for CroppedChannels<Channels> where U: From<T>,

impl<T, U> TryFrom<U> for CroppedChannels<Channels> where U: Into<T>,

impl<T, U> TryInto<U> for CroppedChannels<Channels> where U: TryFrom<T>,