Struct PlaneSlice
pub struct PlaneSlice<'a, T: Pixel> { pub plane: &'a Plane<T>, pub x: isize, pub y: isize }
Fields
plane: &'a Plane<T>x: isizey: isize
Implementations
impl<'a, T: Pixel> PlaneSlice<'a, T>
fn as_ptr(&self) -> *const Tfn rows_iter(&self) -> RowsIter<'_, T>fn clamp(&self) -> PlaneSlice<'a, T>fn subslice(&self, xo: usize, yo: usize) -> PlaneSlice<'a, T>fn reslice(&self, xo: isize, yo: isize) -> PlaneSlice<'a, T>fn go_up(&self, i: usize) -> PlaneSlice<'a, T>A slice starting i pixels above the current one.
fn go_left(&self, i: usize) -> PlaneSlice<'a, T>A slice starting i pixels to the left of the current one.
fn p(&self, add_x: usize, add_y: usize) -> Tfn accessible(&self, add_x: usize, add_y: usize) -> boolChecks if
add_yandadd_xlies in the allocated bounds of the underlying plane.fn accessible_neg(&self, sub_x: usize, sub_y: usize) -> boolChecks if -
sub_xand -sub_ylies in the allocated bounds of the underlying plane.fn row_cropped(&self, y: usize) -> &[T]This version of the function crops off the padding on the right side of the image
fn row(&self, y: usize) -> &[T]This version of the function includes the padding on the right side of the image
Trait Implementations
impl<'a, T: Clone + Pixel> Clone for PlaneSlice<'a, T>
fn clone(&self) -> PlaneSlice<'a, T>
impl<'a, T: Copy + Pixel> Copy for PlaneSlice<'a, T>
impl<'a, T: Debug + Pixel> Debug for PlaneSlice<'a, T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T: Pixel> Index<usize> for PlaneSlice<'_, T>
type Output = [T];fn index(&self, index: usize) -> &Self::Output
Auto Trait Implementations
impl<'a, T> Freeze for PlaneSlice<'a, T>
where
&'a Plane<T>: Freeze,
impl<'a, T> RefUnwindSafe for PlaneSlice<'a, T>
where
&'a Plane<T>: RefUnwindSafe,
impl<'a, T> Send for PlaneSlice<'a, T>
where
&'a Plane<T>: Send,
impl<'a, T> Sync for PlaneSlice<'a, T>
where
&'a Plane<T>: Sync,
impl<'a, T> Unpin for PlaneSlice<'a, T>
where
&'a Plane<T>: Unpin,
impl<'a, T> UnsafeUnpin for PlaneSlice<'a, T>
where
&'a Plane<T>: UnsafeUnpin,
impl<'a, T> UnwindSafe for PlaneSlice<'a, T>
where
&'a Plane<T>: UnwindSafe,
Blanket Implementations
impl<T> Any for PlaneSlice<'a, T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for PlaneSlice<'a, T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for PlaneSlice<'a, T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for PlaneSlice<'a, T>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for PlaneSlice<'a, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for PlaneSlice<'a, T>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for PlaneSlice<'a, T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for PlaneSlice<'a, T>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for PlaneSlice<'a, T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>