pub struct SlotLayout { /* private fields */ }Expand description
Validated memory layout for one SlotPool tier.
Implementations§
Source§impl SlotLayout
impl SlotLayout
Sourcepub fn new(
base_addr: u64,
slot_size: usize,
slot_count: usize,
) -> Result<Self, AllocError>
pub fn new( base_addr: u64, slot_size: usize, slot_count: usize, ) -> Result<Self, AllocError>
Validate exact fixed-slot placement.
Rejects empty layouts, slots larger than u32::MAX, and unrepresentable
backing or free-list byte ranges.
Sourcepub const fn slot_count(self) -> usize
pub const fn slot_count(self) -> usize
Number of equal-sized slots.
Trait Implementations§
Source§impl Clone for SlotLayout
impl Clone for SlotLayout
impl Copy for SlotLayout
Source§impl Debug for SlotLayout
impl Debug for SlotLayout
impl Eq for SlotLayout
Source§impl PartialEq for SlotLayout
impl PartialEq for SlotLayout
impl StructuralPartialEq for SlotLayout
Auto Trait Implementations§
impl Freeze for SlotLayout
impl RefUnwindSafe for SlotLayout
impl Send for SlotLayout
impl Sync for SlotLayout
impl Unpin for SlotLayout
impl UnsafeUnpin for SlotLayout
impl UnwindSafe for SlotLayout
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