pub struct Memory<B: Backend> { /* private fields */ }
Expand description
Memory object wrapper. Contains size and properties of the memory.
Implementations§
Source§impl<B> Memory<B>where
B: Backend,
impl<B> Memory<B>where
B: Backend,
Sourcepub fn properties(&self) -> Properties
pub fn properties(&self) -> Properties
Get memory properties.
Sourcepub unsafe fn from_raw(
raw: B::Memory,
size: u64,
properties: Properties,
) -> Self
pub unsafe fn from_raw( raw: B::Memory, size: u64, properties: Properties, ) -> Self
Sourcepub fn host_visible(&self) -> bool
pub fn host_visible(&self) -> bool
Check if this memory is host-visible and can be mapped.
memory.host_visible()
is equivalent to memory.properties().contains(Properties::CPU_VISIBLE)
Sourcepub fn host_coherent(&self) -> bool
pub fn host_coherent(&self) -> bool
Check if this memory is host-coherent and doesn’t require invalidating or flushing.
memory.host_coherent()
is equivalent to memory.properties().contains(Properties::COHERENT)
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Memory<B>
impl<B> RefUnwindSafe for Memory<B>
impl<B> Send for Memory<B>
impl<B> Sync for Memory<B>
impl<B> Unpin for Memory<B>
impl<B> UnwindSafe for Memory<B>
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