pub struct MemoryPool { /* private fields */ }Expand description
This structure is used to provide storage for images of different type: shared memory and buffers and return views to them.
Implementations§
Source§impl MemoryPool
impl MemoryPool
Sourcepub fn get_memory_view(
&self,
format: PixelFormat,
offset: usize,
width: usize,
height: usize,
stride: usize,
) -> MemoryView
pub fn get_memory_view( &self, format: PixelFormat, offset: usize, width: usize, height: usize, stride: usize, ) -> MemoryView
Returns MemoryViews from Memorys stored in MemoryPool.
Sourcepub fn take_memory(self) -> Option<Memory>
pub fn take_memory(self) -> Option<Memory>
Consumes the pool and if there are no other references to this memory left returns the
Memory.
Auto Trait Implementations§
impl Freeze for MemoryPool
impl RefUnwindSafe for MemoryPool
impl Send for MemoryPool
impl Sync for MemoryPool
impl Unpin for MemoryPool
impl UnwindSafe for MemoryPool
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