Struct vulkano::memory::pool::StdNonHostVisibleMemoryTypePool
source · pub struct StdNonHostVisibleMemoryTypePool { /* private fields */ }
Expand description
Memory pool that operates on a given memory type.
Implementations
sourceimpl StdNonHostVisibleMemoryTypePool
impl StdNonHostVisibleMemoryTypePool
sourcepub fn new(
device: Arc<Device>,
memory_type: MemoryType<'_>
) -> Arc<StdNonHostVisibleMemoryTypePool>
pub fn new(
device: Arc<Device>,
memory_type: MemoryType<'_>
) -> Arc<StdNonHostVisibleMemoryTypePool>
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.
sourcepub fn alloc(
me: &Arc<Self>,
size: usize,
alignment: usize
) -> Result<StdNonHostVisibleMemoryTypePoolAlloc, DeviceMemoryAllocError>
pub fn alloc(
me: &Arc<Self>,
size: usize,
alignment: usize
) -> Result<StdNonHostVisibleMemoryTypePoolAlloc, DeviceMemoryAllocError>
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 StdNonHostVisibleMemoryTypePool
impl Send for StdNonHostVisibleMemoryTypePool
impl Sync for StdNonHostVisibleMemoryTypePool
impl Unpin for StdNonHostVisibleMemoryTypePool
impl UnwindSafe for StdNonHostVisibleMemoryTypePool
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.