pub struct StdHostVisibleMemoryTypePool { /* private fields */ }
Expand description
Memory pool that operates on a given memory type.
Implementations
sourceimpl StdHostVisibleMemoryTypePool
impl StdHostVisibleMemoryTypePool
sourcepub fn new(
device: Arc<Device>,
memory_type: MemoryType<'_>
) -> Arc<StdHostVisibleMemoryTypePool>
pub fn new(
device: Arc<Device>,
memory_type: MemoryType<'_>
) -> Arc<StdHostVisibleMemoryTypePool>
Creates a new pool that will operate on the given memory type.
Panic
- Panics if the
device
andmemory_type
don’t belong to the same physical device. - Panics if the memory type is not host-visible.
sourcepub fn alloc(
me: &Arc<Self>,
size: DeviceSize,
alignment: DeviceSize
) -> Result<StdHostVisibleMemoryTypePoolAlloc, DeviceMemoryAllocationError>
pub fn alloc(
me: &Arc<Self>,
size: DeviceSize,
alignment: DeviceSize
) -> Result<StdHostVisibleMemoryTypePoolAlloc, DeviceMemoryAllocationError>
sourcepub fn memory_type(&self) -> MemoryType<'_>
pub fn memory_type(&self) -> MemoryType<'_>
Returns the memory type this pool operates on.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StdHostVisibleMemoryTypePool
impl Send for StdHostVisibleMemoryTypePool
impl Sync for StdHostVisibleMemoryTypePool
impl Unpin for StdHostVisibleMemoryTypePool
impl UnwindSafe for StdHostVisibleMemoryTypePool
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more