pub struct AllocRequest {
pub size: u64,
pub alignment: u64,
pub memory_type_bits: u32,
pub required_flags: MemoryPropertyFlags,
pub preferred_flags: MemoryPropertyFlags,
}Fields§
§size: u64§alignment: u64§memory_type_bits: u32§required_flags: MemoryPropertyFlags§preferred_flags: MemoryPropertyFlagsImplementations§
Source§impl AllocRequest
impl AllocRequest
Sourcepub fn new(size: u64, alignment: u64, memory_type_bits: u32) -> Self
pub fn new(size: u64, alignment: u64, memory_type_bits: u32) -> Self
Construct explicit requirements with no required or preferred properties. The selector/allocation operation validates size, alignment and type compatibility.
Sourcepub fn set_alignment(self, value: u64) -> Self
pub fn set_alignment(self, value: u64) -> Self
Set alignment and return the updated record.
Sourcepub fn set_memory_type_bits(self, value: u32) -> Self
pub fn set_memory_type_bits(self, value: u32) -> Self
Set memory_type_bits and return the updated record.
Sourcepub fn set_required_flags(self, value: MemoryPropertyFlags) -> Self
pub fn set_required_flags(self, value: MemoryPropertyFlags) -> Self
Set required_flags and return the updated record.
Sourcepub fn set_preferred_flags(self, value: MemoryPropertyFlags) -> Self
pub fn set_preferred_flags(self, value: MemoryPropertyFlags) -> Self
Set preferred_flags and return the updated record.
Auto Trait Implementations§
impl Forget for AllocRequest
impl Freeze for AllocRequest
impl Move for AllocRequest
impl RefUnwindSafe for AllocRequest
impl Send for AllocRequest
impl Sync for AllocRequest
impl Unpin for AllocRequest
impl UnsafeUnpin for AllocRequest
impl UnwindSafe for AllocRequest
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