Struct solstice::buffer::Mapped[][src]

pub struct Mapped<T, D: Dimension> { /* fields omitted */ }

Implementations

impl<T, D> Mapped<T, D> where
    D: Dimension
[src]

pub fn with_shape<S>(inner: T, shape: S) -> Self where
    S: ShapeBuilder<Dim = D>, 
[src]

pub fn inner(&self) -> &T[src]

pub fn memory_map(&self) -> &[u8][src]

impl<T> Mapped<T, Ix1>[src]

pub fn from_vec(inner: T, vec: Vec<u8>) -> Self[src]

pub fn write(&mut self, data: &[u8], offset: usize)[src]

Write new data into the buffer and adjust it’s dirty range accordingly.

This function will panic if the buffer overflows.

pub fn modified_range(&self) -> Option<ModifiedRange<usize>>[src]

impl Mapped<Buffer, Dim<[usize; 1]>>[src]

pub fn with_buffer(
    ctx: &mut Context,
    size: usize,
    buffer_type: BufferType,
    usage: Usage
) -> Result<Self, GraphicsError>
[src]

pub fn unmap(&mut self, ctx: &mut Context)[src]

impl Mapped<Image, Dim<[usize; 2]>>[src]

pub fn new(
    ctx: &mut Context,
    texture_type: TextureType,
    format: PixelFormat,
    width: u32,
    height: u32,
    settings: Settings
) -> Result<Self, GraphicsError>
[src]

pub fn with_data(
    ctx: &mut Context,
    texture_type: TextureType,
    format: PixelFormat,
    width: u32,
    height: u32,
    data: Vec<u8>,
    settings: Settings
) -> Result<Self, GraphicsError>
[src]

pub fn set_pixels(&mut self, region: Viewport<usize>, data: &[u8])[src]

pub fn get_pixels(&self) -> &[u8][src]

pub fn get_pixel(&self, x: usize, y: usize) -> &[u8][src]

pub fn set_pixel(&mut self, x: usize, y: usize, pixel: &[u8])[src]

pub fn pixel_stride(&self) -> usize[src]

pub fn unmap(&mut self, ctx: &mut Context) -> &Image[src]

Trait Implementations

impl<T: Debug, D: Debug + Dimension> Debug for Mapped<T, D>[src]

Auto Trait Implementations

impl<T, D> RefUnwindSafe for Mapped<T, D> where
    D: RefUnwindSafe,
    T: 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> where
    D: Unpin,
    T: Unpin

impl<T, D> UnwindSafe for Mapped<T, D> where
    D: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.