Struct PlaneSlice

struct PlaneSlice<'a, T: Pixel> { ... }

Fields

plane: &'a Plane<T>
x: isize
y: isize

Implementations

impl<'a, T: Pixel> PlaneSlice<'a, T>

fn as_ptr(self: &Self) -> *const T
fn rows_iter(self: &Self) -> RowsIter<'_, T>
fn clamp(self: &Self) -> PlaneSlice<'a, T>
fn subslice(self: &Self, xo: usize, yo: usize) -> PlaneSlice<'a, T>
fn reslice(self: &Self, xo: isize, yo: isize) -> PlaneSlice<'a, T>
fn go_up(self: &Self, i: usize) -> PlaneSlice<'a, T>

A slice starting i pixels above the current one.

fn go_left(self: &Self, i: usize) -> PlaneSlice<'a, T>

A slice starting i pixels to the left of the current one.

fn p(self: &Self, add_x: usize, add_y: usize) -> T
fn accessible(self: &Self, add_x: usize, add_y: usize) -> bool

Checks if add_y and add_x lies in the allocated bounds of the underlying plane.

fn accessible_neg(self: &Self, sub_x: usize, sub_y: usize) -> bool

Checks if -sub_x and -sub_y lies in the allocated bounds of the underlying plane.

fn row_cropped(self: &Self, y: usize) -> &[T]

This version of the function crops off the padding on the right side of the image

fn row(self: &Self, y: usize) -> &[T]

This version of the function includes the padding on the right side of the image

impl<'a, T> Freeze for PlaneSlice<'a, T>

impl<'a, T> RefUnwindSafe for PlaneSlice<'a, T>

impl<'a, T> Send for PlaneSlice<'a, T>

impl<'a, T> Sync for PlaneSlice<'a, T>

impl<'a, T> Unpin for PlaneSlice<'a, T>

impl<'a, T> UnsafeUnpin for PlaneSlice<'a, T>

impl<'a, T> UnwindSafe for PlaneSlice<'a, T>

impl<'a, T: $crate::clone::Clone + Pixel> Clone for PlaneSlice<'a, T>

fn clone(self: &Self) -> PlaneSlice<'a, T>

impl<'a, T: $crate::fmt::Debug + Pixel> Debug for PlaneSlice<'a, T>

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

impl<'a, T: $crate::marker::Copy + Pixel> Copy for PlaneSlice<'a, T>

impl<T> Any for PlaneSlice<'a, T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for PlaneSlice<'a, T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for PlaneSlice<'a, T>

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

impl<T> CloneToUninit for PlaneSlice<'a, T>

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

impl<T> From for PlaneSlice<'a, T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for PlaneSlice<'a, T>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for PlaneSlice<'a, T>

fn into(self: 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 for PlaneSlice<'a, T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for PlaneSlice<'a, T>

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

impl<T: Pixel> Index for PlaneSlice<'_, T>

fn index(self: &Self, index: usize) -> &<Self as >::Output