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,

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

fn borrow_mut(&mut self) -> &mut T

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

unsafe fn clone_to_uninit(&self, dest: *mut u8)

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

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for CroppedChannels<Channels>

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

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

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

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

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

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>