Struct memory_set::MemoryArea

source ·
pub struct MemoryArea<F: Copy, P, B: MappingBackend<F, P>> { /* private fields */ }
Expand description

A memory area represents a continuous range of virtual memory with the same flags.

The target physical memory frames are determined by MappingBackend and may not be contiguous.

Implementations§

source§

impl<F: Copy, P, B: MappingBackend<F, P>> MemoryArea<F, P, B>

source

pub const fn new(start: VirtAddr, size: usize, flags: F, backend: B) -> Self

Creates a new memory area.

source

pub const fn va_range(&self) -> VirtAddrRange

Returns the virtual address range.

source

pub const fn flags(&self) -> F

Returns the memory flags, e.g., the permission bits.

source

pub const fn start(&self) -> VirtAddr

Returns the start address of the memory area.

source

pub const fn end(&self) -> VirtAddr

Returns the end address of the memory area.

source

pub const fn size(&self) -> usize

Returns the size of the memory area.

source

pub const fn backend(&self) -> &B

Returns the mapping backend of the memory area.

Trait Implementations§

source§

impl<F, P, B: MappingBackend<F, P>> Debug for MemoryArea<F, P, B>
where F: Debug + Copy,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F, P, B> Freeze for MemoryArea<F, P, B>
where F: Freeze, B: Freeze,

§

impl<F, P, B> RefUnwindSafe for MemoryArea<F, P, B>

§

impl<F, P, B> Send for MemoryArea<F, P, B>
where F: Send, B: Send, P: Send,

§

impl<F, P, B> Sync for MemoryArea<F, P, B>
where F: Sync, B: Sync, P: Sync,

§

impl<F, P, B> Unpin for MemoryArea<F, P, B>
where F: Unpin, B: Unpin, P: Unpin,

§

impl<F, P, B> UnwindSafe for MemoryArea<F, P, B>
where F: UnwindSafe, B: UnwindSafe, P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.