pub struct OwnedFrames<'allocator> {
pub(super) base: Frame,
pub(super) len: NonZero<usize>,
allocator: &'allocator dyn PhysicalAllocator,
}
🔬This is a nightly-only experimental API. (
kernel_internals
)Expand description
Conceptually the same as a hypothetical Arc<[Frame]>
§Invariants
Internal implementation assumes that two OwnedFrames
cannot overlap unless they came from the same original OwnedFrames
object
Fields§
§base: Frame
🔬This is a nightly-only experimental API. (
§kernel_internals
)len: NonZero<usize>
🔬This is a nightly-only experimental API. (
§kernel_internals
)allocator: &'allocator dyn PhysicalAllocator
🔬This is a nightly-only experimental API. (
kernel_internals
)Implementations§
Source§impl OwnedFrames<'static>
impl OwnedFrames<'static>
pub fn new(count: NonZero<usize>) -> Result<Self, AllocError>
🔬This is a nightly-only experimental API. (
kernel_internals
)Source§impl<'a> OwnedFrames<'a>
impl<'a> OwnedFrames<'a>
pub fn new_with( count: NonZero<usize>, allocator: &'a dyn PhysicalAllocator, ) -> Result<Self, AllocError>
🔬This is a nightly-only experimental API. (
kernel_internals
)pub fn xnew( count: NonZero<usize>, allocator: &'a dyn PhysicalAllocator, location: Location, ) -> Result<Self, AllocError>
🔬This is a nightly-only experimental API. (
kernel_internals
)fn split_at(self, n: NonZero<usize>) -> (Self, Self)
🔬This is a nightly-only experimental API. (
kernel_internals
)pub fn into_raw_parts( self, ) -> (Frame, NonZero<usize>, &'a dyn PhysicalAllocator)
🔬This is a nightly-only experimental API. (
kernel_internals
)pub unsafe fn from_raw_parts( base: Frame, len: NonZero<usize>, allocator: &'a dyn PhysicalAllocator, ) -> Self
🔬This is a nightly-only experimental API. (
kernel_internals
)Trait Implementations§
Source§impl Clone for OwnedFrames<'_>
impl Clone for OwnedFrames<'_>
Source§impl Debug for OwnedFrames<'_>
impl Debug for OwnedFrames<'_>
Auto Trait Implementations§
impl<'allocator> Freeze for OwnedFrames<'allocator>
impl<'allocator> !RefUnwindSafe for OwnedFrames<'allocator>
impl<'allocator> Send for OwnedFrames<'allocator>
impl<'allocator> Sync for OwnedFrames<'allocator>
impl<'allocator> Unpin for OwnedFrames<'allocator>
impl<'allocator> !UnwindSafe for OwnedFrames<'allocator>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
#126799)