pub struct PhysBlock<S> {
handle: BlockHandle,
_state: PhantomData<S>,
}Expand description
Ephemeral typed handle for local state transitions.
Fields§
§handle: BlockHandle§_state: PhantomData<S>Implementations§
Source§impl<S> PhysBlock<S>
impl<S> PhysBlock<S>
Sourcepub fn handle(&self) -> BlockHandle
pub fn handle(&self) -> BlockHandle
Returns the underlying block handle.
Sourcepub(crate) fn from_handle(handle: BlockHandle) -> Self
pub(crate) fn from_handle(handle: BlockHandle) -> Self
Creates a typed block from a raw handle.
Source§impl PhysBlock<BuddyReserved>
impl PhysBlock<BuddyReserved>
Sourcepub(crate) fn into_exclusive(self) -> PhysBlock<Exclusive>
pub(crate) fn into_exclusive(self) -> PhysBlock<Exclusive>
Transitions a reserved block into exclusive ownership.
Source§impl PhysBlock<Exclusive>
impl PhysBlock<Exclusive>
Sourcepub(crate) fn into_mapped(self) -> PhysBlock<MappedExclusive>
pub(crate) fn into_mapped(self) -> PhysBlock<MappedExclusive>
Marks the block as mapped while remaining exclusive.
Sourcepub(crate) fn into_released(self) -> PhysBlock<Released>
pub(crate) fn into_released(self) -> PhysBlock<Released>
Releases the block to the buddy-facing state.
Source§impl PhysBlock<MappedExclusive>
impl PhysBlock<MappedExclusive>
Transitions a mapped exclusive block into a shared mapped block.
Sourcepub(crate) fn into_unmapped(self) -> PhysBlock<Exclusive>
pub(crate) fn into_unmapped(self) -> PhysBlock<Exclusive>
Transitions a mapped exclusive block back to an unmapped exclusive block.
Sourcepub(crate) fn into_exclusive_mapped(self) -> PhysBlock<MappedExclusive>
pub(crate) fn into_exclusive_mapped(self) -> PhysBlock<MappedExclusive>
Transitions a shared mapped block back to a mapped exclusive block.
Rebuilds the shared typed handle after an ownership-layer check.
Source§impl PhysBlock<Released>
impl PhysBlock<Released>
Sourcepub(crate) fn into_handle(self) -> BlockHandle
pub(crate) fn into_handle(self) -> BlockHandle
Consumes the released block and returns its raw handle.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for PhysBlock<S>
impl<S> RefUnwindSafe for PhysBlock<S>where
S: RefUnwindSafe,
impl<S> Send for PhysBlock<S>where
S: Send,
impl<S> Sync for PhysBlock<S>where
S: Sync,
impl<S> Unpin for PhysBlock<S>where
S: Unpin,
impl<S> UnsafeUnpin for PhysBlock<S>
impl<S> UnwindSafe for PhysBlock<S>where
S: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more