pub struct Layout { /* private fields */ }Expand description
An arena being laid out: parts are taken in order, each after the last, and never overlap.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn take(
&mut self,
name: &'static str,
len: usize,
align: usize,
) -> Result<Part, NoRoom>
pub fn take( &mut self, name: &'static str, len: usize, align: usize, ) -> Result<Part, NoRoom>
Take the next part: len bytes, its PHYSICAL address a multiple of align (a power of two).
Refused, with the reason, when it does not fit in what is left, asks for no bytes, or names an
alignment that is not a power of two.
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl !Send for Layout
impl !Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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