Skip to main content

Scope

Struct Scope 

Source
pub struct Scope<'s, S> { /* private fields */ }
Expand description

Exclusive access carrying the original storage’s invariant identity proof.

Implementations§

Source§

impl<'s, S> Scope<'s, S>

Source

pub fn new(source: S, token: Token<Identity<'s>>) -> Self

Source

pub fn reborrow(self: Pin<&mut Self>) -> Scope<'s, Pin<&mut S>>

Source

pub fn as_pin_ref(self: Pin<&Self>) -> Pin<&S>

Source§

impl<S: Unpin> Scope<'_, S>

Source

pub fn as_mut(&mut self) -> Pin<&mut Self>

Source

pub fn as_ref(&self) -> Pin<&Self>

Source§

impl<'s, 'd, F, const N: usize, D, S: Storage> Scope<'s, Pin<&mut Slab<'d, F, N, D, S>>>

Source

pub fn admit(&mut self) -> Option<Admit<'_, 's, 'd, F, D, S>>

Source

pub fn entry<'a, K: Copy + Into<Parts>>( &'a mut self, id: &Id<'s, 'd, D, K>, ) -> Option<Anchored<'a, F, D, { u32::MAX }, false, 1, S>>

Source

pub fn remove<K: Copy + Into<Parts>>(&mut self, id: Id<'s, 'd, D, K>) -> Removal

Source§

impl<'s, 'a, 'd, F, D, T: Copy, Source> Scope<'s, Pin<&'a mut Pool<'d, F, D, T, Source>>>

Source

pub fn try_admit( &mut self, input: Owner<Source>, parent: RootWaker<'d>, ) -> Result<Admission<'_, 's, 'd, F, D, T, Source>, Error<Source>>

Source

pub fn into_admit( self, input: Owner<Source>, parent: RootWaker<'d>, ) -> Result<Admission<'a, 's, 'd, F, D, T, Source>, Error<Source>>

Source

pub fn entry( &mut self, id: &Id<'s, 'd, D, Key<Epoch>>, ) -> Option<Record<'_, 'd, F, T, Attached<'_, 'd, Source>>>

Source

pub fn remove(&mut self, id: Id<'s, 'd, D, Key<Epoch>>) -> Removal

Source§

impl<'s, 'a, 'd, F, D, T: Copy, Source> Scope<'s, Pin<&'a mut Pool<'d, F, D, T, Source>>>

Source

pub fn owners(self: Pin<&Self>) -> Pin<&Queue<'d, Source>>

Source§

impl<'s, 'a, 'd, F, D, T: Copy, Source: Copy> Scope<'s, Pin<&'a mut Pool<'d, F, D, T, Source>>>

Source

pub fn select<'plane, 'turn>( self: Pin<&'plane mut Self>, scope: Scope<Source>, work: Work<'turn, 'd>, ) -> Selection<'plane, 'turn, 'd, F, T, Source>

Source

pub fn wake(self: Pin<&mut Self>, scope: Scope<Source>)

Source

pub fn try_wake(self: Pin<&mut Self>, scope: Scope<Source>) -> Wake

Trait Implementations§

Source§

impl<S> Deref for Scope<'_, S>

Source§

type Target = S

The resulting type after dereferencing.
Source§

fn deref(&self) -> &S

Dereferences the value.
Source§

impl<'loan, 's, 'd, F, D, T: Copy, Source> Project<&Id<'s, 'd, D, Key<Epoch>>> for Pin<&'loan mut Scope<'s, Pin<&mut Pool<'d, F, D, T, Source>>>>

Source§

type Output = Record<'loan, 'd, F, T, Attached<'loan, 'd, Source>>

Source§

unsafe fn project(self, id: &Id<'s, 'd, D, Key<Epoch>>) -> Self::Output

Safety Read more
Source§

impl<'pin, 's, S> Unpin for Scope<'s, S>
where PinnedFieldsOf<__Scope<'pin, 's, S>>: Unpin,

Auto Trait Implementations§

§

impl<'s, S> !Send for Scope<'s, S>

§

impl<'s, S> !Sync for Scope<'s, S>

§

impl<'s, S> Forget for Scope<'s, S>

§

impl<'s, S> Freeze for Scope<'s, S>
where S: Freeze, PhantomData<*mut &'s ()>: Freeze,

§

impl<'s, S> Move for Scope<'s, S>

§

impl<'s, S> RefUnwindSafe for Scope<'s, S>
where S: RefUnwindSafe,

§

impl<'s, S> UnsafeUnpin for Scope<'s, S>

§

impl<'s, S> UnwindSafe for Scope<'s, S>
where S: UnwindSafe, *mut &'s (): 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<L, R> Convert<Either<L, R>, 1> for L

Source§

fn into(self) -> Either<L, R>

Source§

unsafe fn take_into(source: *mut Self, place: &mut MaybeUninit<T>)
where Self: Sized,

Safety Read more
Source§

impl<L, R> Convert<Either<L, R>, 2> for R

Source§

fn into(self) -> Either<L, R>

Source§

unsafe fn take_into(source: *mut Self, place: &mut MaybeUninit<T>)
where Self: Sized,

Safety Read more
Source§

impl<T> Convert<T> for T

Source§

fn into(self) -> T

Source§

unsafe fn take_into(source: *mut Self, place: &mut MaybeUninit<T>)
where Self: Sized,

Safety 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.