pub struct Image<'a>(/* private fields */);Implementations§
Source§impl<'a> Image<'a>
impl<'a> Image<'a>
Sourcepub fn new(
data: Cow<'a, [u8]>,
fmt: Format,
color_space: ColorSpace,
width: u32,
height: u32,
stride: u32,
) -> Self
pub fn new( data: Cow<'a, [u8]>, fmt: Format, color_space: ColorSpace, width: u32, height: u32, stride: u32, ) -> Self
Wraps data as an image of the given format, without copying it.
§Panics
Panics if vpx_img_wrap rejects the parameters (stride must be
0, 1, or a power of two), or if data is too small to hold the whole
image for the given format and dimensions.
Sourcepub fn try_new(
data: Cow<'a, [u8]>,
fmt: Format,
color_space: ColorSpace,
width: u32,
height: u32,
stride: u32,
) -> Result<Self, Error>
pub fn try_new( data: Cow<'a, [u8]>, fmt: Format, color_space: ColorSpace, width: u32, height: u32, stride: u32, ) -> Result<Self, Error>
Wraps data as an image of the given format, without copying it.
pub fn get_format(&self) -> Format
pub fn set_rect(&mut self, rect: Rect) -> Result<(), ()>
pub fn flip(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Send for Image<'a>
impl<'a> !Sync for Image<'a>
impl<'a> Freeze for Image<'a>
impl<'a> RefUnwindSafe for Image<'a>
impl<'a> Unpin for Image<'a>
impl<'a> UnsafeUnpin for Image<'a>
impl<'a> UnwindSafe for Image<'a>
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