Struct resources::AllocOptions 
source · pub struct AllocOptions {
    prefetchable: bool,
    max_address: u64,
    alignment: Option<u64>,
    top_down: bool,
}Expand description
Memory allocation options.
Fields§
§prefetchable: bool§max_address: u64§alignment: Option<u64>§top_down: boolImplementations§
source§impl AllocOptions
 
impl AllocOptions
pub fn new() -> Self
sourcepub fn prefetchable(&mut self, prefetchable: bool) -> &mut Self
 
pub fn prefetchable(&mut self, prefetchable: bool) -> &mut Self
If true, memory may be allocated in a prefetchable/cacheable region.
If false, memory must be allocated within a non-prefetechable region, appropriate for
device registers.
Default: false
sourcepub fn max_address(&mut self, max_address: u64) -> &mut Self
 
pub fn max_address(&mut self, max_address: u64) -> &mut Self
Largest valid address for the end of the allocated region.
For example, u32::MAX may be used to allocate a region that is addressable with a 32-bit
pointer.
Default: u64::MAX
Trait Implementations§
source§impl Clone for AllocOptions
 
impl Clone for AllocOptions
source§fn clone(&self) -> AllocOptions
 
fn clone(&self) -> AllocOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl Debug for AllocOptions
 
impl Debug for AllocOptions
source§impl Default for AllocOptions
 
impl Default for AllocOptions
impl Copy for AllocOptions
Auto Trait Implementations§
impl Freeze for AllocOptions
impl RefUnwindSafe for AllocOptions
impl Send for AllocOptions
impl Sync for AllocOptions
impl Unpin for AllocOptions
impl UnwindSafe for AllocOptions
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
source§impl<T> CloneToUninit for Twhere
    T: Copy,
 
impl<T> CloneToUninit for Twhere
    T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)