pub struct AllocatedBlocks { /* private fields */ }Expand description
Allocated blocks from the buddy allocator with automatic cleanup.
This structure owns a list of allocated blocks and ensures they are
automatically freed when dropped. Use iter() to iterate over all
allocated blocks.
§Invariants
listis an initialized, valid list head containing allocated blocks.
Implementations§
Source§impl AllocatedBlocks
impl AllocatedBlocks
Sourcepub fn project<'__this>(self: Pin<&'__this mut Self>) -> __Projection<'__this>
pub fn project<'__this>(self: Pin<&'__this mut Self>) -> __Projection<'__this>
Pin-projects all fields of Self.
These fields are structurally pinned:
list
These fields are not structurally pinned:
buddy
Sourcepub fn with_project<'__this, R>(
self: Pin<&'__this mut Self>,
f: impl FnOnce(__ProjectionLt<'__this>) -> R,
) -> R
pub fn with_project<'__this, R>( self: Pin<&'__this mut Self>, f: impl FnOnce(__ProjectionLt<'__this>) -> R, ) -> R
Pin-projects all fields of Self with proper lifetime.
These fields are structurally pinned:
list
These fields are not structurally pinned:
buddy
Sourcepub fn with_project_ref<'__this, R>(
self: Pin<&'__this Self>,
f: impl FnOnce(__ProjectionRef<'__this>) -> R,
) -> R
pub fn with_project_ref<'__this, R>( self: Pin<&'__this Self>, f: impl FnOnce(__ProjectionRef<'__this>) -> R, ) -> R
Pin-projects all fields of Self from a shared reference with proper lifetime.
These fields are structurally pinned:
list
These fields are not structurally pinned:
buddy
Source§impl AllocatedBlocks
impl AllocatedBlocks
Sourcepub fn iter(&self) -> impl Iterator<Item = AllocatedBlock<'_>> + '_
pub fn iter(&self) -> impl Iterator<Item = AllocatedBlock<'_>> + '_
Iterate over allocated blocks.
Returns an iterator yielding AllocatedBlock values. Each AllocatedBlock
borrows self and is only valid for the duration of that borrow.
Trait Implementations§
Source§impl Drop for AllocatedBlocks
impl Drop for AllocatedBlocks
Source§impl HasPinData for AllocatedBlocks
impl HasPinData for AllocatedBlocks
Source§impl PinnedDrop for AllocatedBlocks
impl PinnedDrop for AllocatedBlocks
Auto Trait Implementations§
impl !Freeze for AllocatedBlocks
impl !RefUnwindSafe for AllocatedBlocks
impl !UnsafeUnpin for AllocatedBlocks
impl !UnwindSafe for AllocatedBlocks
impl Send for AllocatedBlocks
impl Sync for AllocatedBlocks
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
Source§fn into_safe_cast(self) -> T
fn into_safe_cast(self) -> T
self into a T. This operation is guaranteed to be lossless.Source§impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
Source§fn into_safe_cast_arch(self) -> T
fn into_safe_cast_arch(self) -> T
self into a T. This operation is guaranteed to be lossless.