Skip to main content

ImageAccessorNoClip

Struct ImageAccessorNoClip 

Source
pub struct ImageAccessorNoClip<'a, const PIX_WIDTH: usize> { /* private fields */ }
Expand description

Image accessor without bounds checking — fastest, assumes all coordinates are valid.

Port of C++ image_accessor_no_clip<PixFmt>.

Implementations§

Source§

impl<'a, const PIX_WIDTH: usize> ImageAccessorNoClip<'a, PIX_WIDTH>

Source

pub fn new(rbuf: &'a RowAccessor) -> Self

Source

pub fn span(&mut self, x: i32, y: i32, _len: u32) -> &[u8]

Source

pub fn next_x(&mut self) -> &[u8]

Source

pub fn next_y(&mut self) -> &[u8]

Trait Implementations§

Source§

impl<const PIX_WIDTH: usize> ImageSource for ImageAccessorNoClip<'_, PIX_WIDTH>

Source§

fn span(&mut self, x: i32, y: i32, len: u32) -> &[u8]

Begin reading a span at (x, y) with len pixels. Returns first pixel.
Source§

fn next_x(&mut self) -> &[u8]

Advance to the next pixel in the x direction.
Source§

fn next_y(&mut self) -> &[u8]

Advance to the next row (y+1), resetting x to the span start.

Auto Trait Implementations§

§

impl<'a, const PIX_WIDTH: usize> Freeze for ImageAccessorNoClip<'a, PIX_WIDTH>

§

impl<'a, const PIX_WIDTH: usize> RefUnwindSafe for ImageAccessorNoClip<'a, PIX_WIDTH>

§

impl<'a, const PIX_WIDTH: usize> !Send for ImageAccessorNoClip<'a, PIX_WIDTH>

§

impl<'a, const PIX_WIDTH: usize> !Sync for ImageAccessorNoClip<'a, PIX_WIDTH>

§

impl<'a, const PIX_WIDTH: usize> Unpin for ImageAccessorNoClip<'a, PIX_WIDTH>

§

impl<'a, const PIX_WIDTH: usize> UnsafeUnpin for ImageAccessorNoClip<'a, PIX_WIDTH>

§

impl<'a, const PIX_WIDTH: usize> UnwindSafe for ImageAccessorNoClip<'a, PIX_WIDTH>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.