Skip to main content

OwnedRawImage

Struct OwnedRawImage 

Source
pub struct OwnedRawImage { /* private fields */ }

Implementations§

Source§

impl OwnedRawImage

Source

pub fn new(byte_size: (usize, usize)) -> Result<Self>

Source

pub fn new_uninit(byte_size: (usize, usize)) -> Result<Self>

Allocate an output buffer without zeroing.

§Safety contract

The caller must ensure every byte is written before being read. This is appropriate for output buffers that the decoder will fully populate.

Source

pub fn new_zeroed_with_padding( byte_size: (usize, usize), offset: (usize, usize), padding: (usize, usize), ) -> Result<Self>

Source

pub fn get_rect_including_padding_mut( &mut self, rect: Rect, ) -> RawImageRectMut<'_>

Source

pub fn get_rect_including_padding(&self, rect: Rect) -> RawImageRect<'_>

Source

pub fn get_rect_mut(&mut self, rect: Rect) -> RawImageRectMut<'_>

Source

pub fn get_rect(&self, rect: Rect) -> RawImageRect<'_>

Source

pub fn row_mut(&mut self, row: usize) -> &mut [u8]

Source

pub fn row(&self, row: usize) -> &[u8]

Source

pub fn byte_size(&self) -> (usize, usize)

Source

pub fn byte_offset(&self) -> (usize, usize)

Source

pub fn byte_padding(&self) -> (usize, usize)

Source

pub fn try_clone(&self) -> Result<OwnedRawImage>

Trait Implementations§

Source§

impl Debug for OwnedRawImage

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Drop for OwnedRawImage

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

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.