Struct twizzler_object::slot::Slot

source ·
pub struct Slot { /* private fields */ }
Expand description

A slot for an object in active memory. All unique combinations of an object ID and Protections are given a slot. The exact slot locations may be reused. Typically, slots are reference counted, and when dropped, release the slot for reuse. The object may or may not be unmapped immediately following the slot’s drop.

Implementations§

source§

impl Slot

source

pub fn new_from_handle(handle: ObjectHandle) -> Result<Self, ObjectInitError>

source

pub fn runtime_handle(&self) -> &ObjectHandle

source

pub fn slot_number(&self) -> usize

source

pub fn id(&self) -> ObjID

Get the ID of the object in this slot.

source

pub fn prot(&self) -> Protections

Get the protections of this slot.

source

pub fn vaddr_base(&self) -> usize

Get the vaddr of this slot’s object base.

source

pub fn vaddr_null(&self) -> usize

Get the vaddr of this slot’s object’s null page.

source

pub fn vaddr_meta(&self) -> usize

Get the vaddr of this slot’s object’s meta page.

source

pub fn raw_lea<P>(&self, off: usize) -> *const P

Perform a raw load-effective-address for an offset into a slot.

source

pub fn raw_lea_mut<P>(&self, off: usize) -> *mut P

Perform a raw load-effective-address for an offset into a slot.

source

pub unsafe fn get_fote_unguarded(&self, idx: usize) -> *mut FotEntry

Get a mutable pointer to one of the slot’s object’s FOT entries.

Safety

See this crate’s base documentation (Isolation Safety).

Trait Implementations§

Auto Trait Implementations§

§

impl !ObjSafe for Slot

§

impl RefUnwindSafe for Slot

§

impl Unpin for Slot

§

impl UnwindSafe for Slot

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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.