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
XXX this function doesn’t check that data is long enough for the
format or view size.
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