pub struct OwnedMatView { /* private fields */ }Expand description
Pure-Rust owned mat-view for use in tests and pure-Rust pipelines.
Implementations§
Source§impl OwnedMatView
impl OwnedMatView
Sourcepub fn new(
width: u32,
height: u32,
pixel_format: PixelFormat,
data: Vec<u8>,
) -> Result<OwnedMatView, ImageOpsError>
pub fn new( width: u32, height: u32, pixel_format: PixelFormat, data: Vec<u8>, ) -> Result<OwnedMatView, ImageOpsError>
Build a new owned mat-view. Fails if data.len() does not match
width * height * pixel_format.channels().
Sourcepub fn zeros(width: u32, height: u32, pixel_format: PixelFormat) -> OwnedMatView
pub fn zeros(width: u32, height: u32, pixel_format: PixelFormat) -> OwnedMatView
Allocate a zero-filled mat-view of the given shape and format.
Trait Implementations§
Source§impl Clone for OwnedMatView
impl Clone for OwnedMatView
Source§fn clone(&self) -> OwnedMatView
fn clone(&self) -> OwnedMatView
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedMatView
impl Debug for OwnedMatView
Source§impl MatView for OwnedMatView
impl MatView for OwnedMatView
Source§fn pixel_format(&self) -> PixelFormat
fn pixel_format(&self) -> PixelFormat
The pixel format describing the interleaved byte layout.
Auto Trait Implementations§
impl Freeze for OwnedMatView
impl RefUnwindSafe for OwnedMatView
impl Send for OwnedMatView
impl Sync for OwnedMatView
impl Unpin for OwnedMatView
impl UnsafeUnpin for OwnedMatView
impl UnwindSafe for OwnedMatView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more