Skip to main content

PoolCreateInfo

Struct PoolCreateInfo 

Source
pub struct PoolCreateInfo {
    pub priority: MemoryPriority,
    pub memory_type_index: u32,
    pub algorithm: AllocationAlgorithm,
    pub block_size: u64,
    pub min_block_count: usize,
    pub max_block_count: usize,
    pub min_allocation_alignment: u64,
}
Expand description

Fixed-type ordinary-memory pool; not a Vulkan ABI record.

Uses the selected placement algorithm. Priority requires captured enabled EXT feature metadata. Use create_pool_with_chain for a retained borrowed native chain.

Fields§

§priority: MemoryPriority§memory_type_index: u32§algorithm: AllocationAlgorithm

TLSF by default; linear supports explicit free-at-once and stack lifetimes. Ring and upper-address placement require max_block_count = 1.

§block_size: u64

Exact native block size in bytes, or zero for VMA’s automatic sizing policy.

§min_block_count: usize

Preallocate this many blocks transactionally and retain this floor.

§max_block_count: usize

Pooled-block ceiling; zero means unlimited. Automatic pools can additionally own dedicated allocations, still subject to native allocation/heap limits.

§min_allocation_alignment: u64

Zero means no additional constraint; otherwise a power of two.

Implementations§

Source§

impl PoolCreateInfo

Source

pub fn new() -> Self

Construct the record with its default state.

Source

pub fn set_priority(self, value: MemoryPriority) -> Self

Set priority and return the updated record.

Source

pub fn set_memory_type_index(self, value: u32) -> Self

Set memory_type_index and return the updated record.

Source

pub fn set_algorithm(self, value: AllocationAlgorithm) -> Self

Set algorithm and return the updated record.

Source

pub fn set_block_size(self, value: u64) -> Self

Set block_size and return the updated record.

Source

pub fn set_min_block_count(self, value: usize) -> Self

Set min_block_count and return the updated record.

Source

pub fn set_max_block_count(self, value: usize) -> Self

Set max_block_count and return the updated record.

Source

pub fn set_min_allocation_alignment(self, value: u64) -> Self

Set min_allocation_alignment and return the updated record.

Trait Implementations§

Source§

impl Clone for PoolCreateInfo

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PoolCreateInfo

Source§

impl Debug for PoolCreateInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PoolCreateInfo

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for PoolCreateInfo

Source§

impl PartialEq for PoolCreateInfo

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PoolCreateInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.