Skip to main content

Slab

Struct Slab 

Source
pub struct Slab<'context>(/* private fields */);
Expand description

One complete exception slab mapping owned by a Context.

Implementations§

Source§

impl Slab<'_>

Source

pub const fn is_published(&self) -> bool

Return whether the slab currently contributes a published kernel snapshot.

Source

pub const fn record_list(&self) -> &[mirilla_except_record]

Return read-only access to the complete record list.

Source

pub const fn record_list_mut(&mut self) -> Option<&mut [mirilla_except_record]>

Return mutable access to the complete record list while the slab is editable.

Source

pub fn publish(&mut self) -> Result<()>

Publish the complete record list as an immutable kernel snapshot.

A successful call leaves the slab read only. A failed call leaves the slab editable and owned by the caller.

§Errors

This returns the operating system or kernel validation error from the protection change.

Source

pub fn edit(&mut self) -> Result<()>

Remove the active kernel snapshot and return the slab to editable memory.

A successful call leaves the slab writable. A failed call preserves the published state.

§Errors

This returns the operating system error from the protection change.

Trait Implementations§

Source§

impl<'context> Debug for Slab<'context>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Drop for Slab<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<'context> !Send for Slab<'context>

§

impl<'context> !Sync for Slab<'context>

§

impl<'context> Freeze for Slab<'context>

§

impl<'context> RefUnwindSafe for Slab<'context>

§

impl<'context> Unpin for Slab<'context>

§

impl<'context> UnsafeUnpin for Slab<'context>

§

impl<'context> UnwindSafe for Slab<'context>

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<I> Immortal for I
where I: 'static,

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.