# Rv48PageTableWith in riscv::paging - Rust
This struct is a four level page table with `Mapper` trait implemented.
Keywords: rust, rustlang, rust-lang, Rv48PageTableWith

# Struct riscv::paging::Rv48PageTableWith

source · [−]

    pub struct Rv48PageTableWith<'a, V: VirtualAddress + AddressL4, FL: MapperFlushable> { /* private fields */ }

Expand description

This struct is a four level page table with `Mapper` trait implemented.

## Implementations

source

### impl<'a, V: VirtualAddress + AddressL4, FL: MapperFlushable> Rv48PageTableWith<'a, V, FL>

source

#### pub fn new(table: &'a mut PageTableX64, linear_offset: usize) -> Self

## Trait Implementations

source

### impl<'a, V: VirtualAddress + AddressL4, FL: MapperFlushable> Mapper for Rv48PageTableWith<'a, V, FL>

#### type P = PhysAddrSv48

#### type V = V

#### type MapperFlush = FL

#### type Entry = PageTableEntryX64

source

#### fn map_to(
&mut self,
page: <Self as MapperExt>::Page,
frame: <Self as MapperExt>::Frame,
flags: PageTableFlags,
allocator: &mut impl FrameAllocatorFor<<Self as Mapper>::P>
) -> Result<Self::MapperFlush, MapToError>

Creates a new mapping in the page table. Read more

source

#### fn unmap(
&mut self,
page: <Self as MapperExt>::Page
) -> Result<(<Self as MapperExt>::Frame, Self::MapperFlush ), UnmapError<<Self as Mapper>::P>>

Removes a mapping from the page table and returns the frame that used to be mapped. Read more

source

#### fn ref_entry(
&mut self,
page: <Self as MapperExt>::Page
) -> Result<&mut PageTableEntryX64, FlagUpdateError>

Get the reference of the specified `page` entry

source

#### fn update_flags(
&mut self,
page: PageWith<Self::V>,
flags: PageTableFlags
) -> Result<Self::MapperFlush, FlagUpdateError>

Updates the flags of an existing mapping.

source

#### fn translate_page(
&mut self,
page: PageWith<Self::V>
) -> Option<FrameWith<Self::P>>

Return the frame that the specified page is mapped to.

source

#### fn identity_map(
&mut self,
frame: FrameWith<Self::P>,
flags: PageTableFlags,
allocator: &mut impl FrameAllocatorFor<<Self as Mapper>::P>
) -> Result<Self::MapperFlush, MapToError>

Maps the given frame to the virtual page with the same address.

## Auto Trait Implementations

### impl<'a, V, FL> RefUnwindSafe for Rv48PageTableWith<'a, V, FL> where
FL: RefUnwindSafe,
V: RefUnwindSafe,

### impl<'a, V, FL> Send for Rv48PageTableWith<'a, V, FL> where
FL: Send,
V: Send,

### impl<'a, V, FL> Sync for Rv48PageTableWith<'a, V, FL> where
FL: Sync,
V: Sync,

### impl<'a, V, FL> Unpin for Rv48PageTableWith<'a, V, FL> where
FL: Unpin,
V: Unpin,

### impl<'a, V, FL> !UnwindSafe for Rv48PageTableWith<'a, V, FL>

## 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,

const: unstable · source

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more

source

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

const: unstable · source

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

Mutably borrows from an owned value. Read more

source

### impl<T> From<T> for T

const: unstable · source

#### fn from(t: T) -> T

Returns the argument unchanged.

source

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

const: unstable · 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.

const: unstable · 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.

const: unstable · source

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

Performs the conversion.