Struct gpu_alloc::usage::MemoryForUsage
source · pub(crate) struct MemoryForUsage {
usages: [MemoryForOneUsage; 64],
}
Fields§
§usages: [MemoryForOneUsage; 64]
Implementations§
source§impl MemoryForUsage
impl MemoryForUsage
pub fn new(memory_types: &[MemoryType]) -> Self
sourcepub fn mask(&self, usage: UsageFlags) -> u32
pub fn mask(&self, usage: UsageFlags) -> u32
Returns mask with bits set for memory type indices that support the usage.
sourcepub fn types(&self, usage: UsageFlags) -> &[u32]
pub fn types(&self, usage: UsageFlags) -> &[u32]
Returns slice of memory type indices that support the usage. Earlier memory type has priority over later.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryForUsage
impl RefUnwindSafe for MemoryForUsage
impl Send for MemoryForUsage
impl Sync for MemoryForUsage
impl Unpin for MemoryForUsage
impl UnwindSafe for MemoryForUsage
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