pub struct Growing { /* private fields */ }Expand description
A pool that allocates bounded geometric groups on demand. Groups stay at stable addresses, preserving both owned and borrowed slots across later growth.
Implementations§
Source§impl Growing
impl Growing
Sourcepub fn try_new(plan: Layout) -> Result<Self, Exhausted>
pub fn try_new(plan: Layout) -> Result<Self, Exhausted>
Creates the first slot group eagerly and reserves every group pointer.
Sourcepub fn try_warm(plan: Layout, warm: NonZero<u32>) -> Result<Self, GrowingError>
pub fn try_warm(plan: Layout, warm: NonZero<u32>) -> Result<Self, GrowingError>
Allocates exactly warm initial slots without reducing the growth bound.
Rejects a warm group larger than the plan before allocating anything.
Sourcepub fn available(&self) -> usize
pub fn available(&self) -> usize
Returns unclaimed slots, including groups not yet allocated. Allocating those groups may still exhaust memory.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Growing
impl !RefUnwindSafe for Growing
impl !Send for Growing
impl !Sync for Growing
impl !UnwindSafe for Growing
impl Forget for Growing
impl Move for Growing
impl Unpin for Growing
impl UnsafeUnpin for Growing
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