pub struct Surface<'a> {
pub buf: &'a mut [u8],
pub stride: usize,
pub format: PixelFmt,
pub width: u32,
pub height: u32,
}Expand description
A pixel buffer with dimension and format metadata.
Fields§
§buf: &'a mut [u8]Underlying pixel storage.
stride: usizeNumber of bytes between consecutive lines.
format: PixelFmtPixel format used by the buffer.
width: u32Width of the surface in pixels.
height: u32Height of the surface in pixels.
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Surface<'a>
impl<'a> RefUnwindSafe for Surface<'a>
impl<'a> Send for Surface<'a>
impl<'a> Sync for Surface<'a>
impl<'a> Unpin for Surface<'a>
impl<'a> UnsafeUnpin for Surface<'a>
impl<'a> !UnwindSafe for Surface<'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