pub struct LocalStorageDataImage<T>where
    T: LocalStorage,{ /* private fields */ }
Expand description

An initialized data image ready to be used by a CPU/new task.

The data is opaque, but one can obtain a pointer to the CLS/TLS area.

The data is “immutable” with respect to Theseus task management functions at the language level. However, it will be modified by CLS/TLS accesses.

Implementations§

source§

impl<T> LocalStorageDataImage<T>where T: LocalStorage,

source

pub const fn new() -> Self

Creates an empty data image.

source

pub fn inherit(&mut self, other: &Self)

Inherits the data from another data image.

Panics

Panics if the other image has a longer length, or (on x86_64) if the other image has a differently sized static area.

source§

impl LocalStorageDataImage<Cls>

source

pub unsafe fn set_as_current_cls(&self)

Sets the data image.

Safety

The data image must not be dropped until another data image replaces it.

source§

impl LocalStorageDataImage<Tls>

source

pub unsafe fn set_as_current_tls(&self)

Sets the data image.

Safety

The data image must not be dropped until another data image replaces it, or until thread-local storage will never be accessed from the current thread again.

Trait Implementations§

source§

impl<T> Debug for LocalStorageDataImage<T>where T: LocalStorage + Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for LocalStorageDataImage<T>where T: RefUnwindSafe,

§

impl<T> Send for LocalStorageDataImage<T>where T: Send,

§

impl<T> Sync for LocalStorageDataImage<T>where T: Sync,

§

impl<T> Unpin for LocalStorageDataImage<T>where T: Unpin,

§

impl<T> UnwindSafe for LocalStorageDataImage<T>where T: UnwindSafe,

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.