pub struct Mapped<T, D: Dimension> { /* private fields */ }
Implementations§
Source§impl<T, D> Mapped<T, D>where
D: Dimension,
impl<T, D> Mapped<T, D>where
D: Dimension,
pub fn with_shape<S>(inner: T, shape: S) -> Selfwhere
S: ShapeBuilder<Dim = D>,
pub fn inner(&self) -> &T
pub fn memory_map(&self) -> &[u8] ⓘ
Source§impl Mapped<Buffer, Dim<[usize; 1]>>
impl Mapped<Buffer, Dim<[usize; 1]>>
pub fn with_buffer( ctx: &mut Context, size: usize, buffer_type: BufferType, usage: Usage, ) -> Result<Self, GraphicsError>
pub fn unmap(&mut self, ctx: &mut Context)
Source§impl Mapped<Image, Dim<[usize; 2]>>
impl Mapped<Image, Dim<[usize; 2]>>
pub fn new( ctx: &mut Context, texture_type: TextureType, format: PixelFormat, width: u32, height: u32, settings: Settings, ) -> Result<Self, GraphicsError>
pub fn with_data( ctx: &mut Context, texture_type: TextureType, format: PixelFormat, width: u32, height: u32, data: Vec<u8>, settings: Settings, ) -> Result<Self, GraphicsError>
pub fn set_pixels(&mut self, region: Viewport<usize>, data: &[u8])
pub fn get_pixels(&self) -> &[u8] ⓘ
pub fn get_pixel(&self, x: usize, y: usize) -> &[u8] ⓘ
pub fn set_pixel(&mut self, x: usize, y: usize, pixel: &[u8])
pub fn pixel_stride(&self) -> usize
pub fn unmap(&mut self, ctx: &mut Context) -> &Image
Trait Implementations§
impl<T, D: Dimension> StructuralPartialEq for Mapped<T, D>
Auto Trait Implementations§
impl<T, D> Freeze for Mapped<T, D>
impl<T, D> RefUnwindSafe for Mapped<T, D>where
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<T, D> Send for Mapped<T, D>where
T: Send,
impl<T, D> Sync for Mapped<T, D>where
T: Sync,
impl<T, D> Unpin for Mapped<T, D>
impl<T, D> UnwindSafe for Mapped<T, D>where
T: UnwindSafe,
D: UnwindSafe,
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