pub struct Layout {
pub size: usize,
pub align: Align,
}Expand description
Layout of a block of memory.
Fields§
§size: usizeThe minimum size in bytes for a memory block of this layout.
align: AlignThe minimum byte alignment for a memory block of this layout.
Implementations§
Source§impl Layout
impl Layout
Sourcepub const fn of<T>() -> Self
pub const fn of<T>() -> Self
Returns the layout of a concrete type.
Uses core::mem::size_of and core::mem::align_of.
Trait Implementations§
impl Copy for Layout
impl Eq for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin 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