[][src]Struct sunrise_bootstrap::frame_alloc::Frame

pub struct Frame {
    physical_addr: usize,
    is_allocated: bool,
}

A pointer to a physical frame

A frame is 4ko in size

Should only be used when paging is off

Fields

physical_addr: usizeis_allocated: bool

Implementations

impl Frame[src]

pub fn address(&self) -> PhysicalAddress[src]

Get the physical address of this Frame

pub(super) fn is_allocated(
    &self
) -> bool
[src]

Gets the current allocation state

pub fn from_physical_addr(physical_addr: PhysicalAddress) -> Frame[src]

Constructs a frame structure from a physical address

This does not guaranty that the frame can be written to, or even exists at all

Panic

Panics when the address is not framesize-aligned

pub unsafe fn from_allocated_addr(physical_addr: PhysicalAddress) -> Frame[src]

Constructs a frame structure from a physical address

This does not guaranty that the frame can be written to, or even exists at all

Panic

Panics when the address is not framesize-aligned

Safety

This function should only be used on physical_addr that are reserved - that is, addresses that the frame allocator will never give. Otherwise, it is unsound.

Trait Implementations

impl Debug for Frame[src]

impl Drop for Frame[src]

Auto Trait Implementations

impl RefUnwindSafe for Frame

impl Send for Frame

impl Sync for Frame

impl Unpin for Frame

impl UnwindSafe for Frame

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.