pub struct Access<'a, T: 'static, D: HasData = HasSelf<T>> { /* private fields */ }
Available on crate features
runtime
and component-model
and component-model-async
only.Expand description
Provides access to either store data (via the get
method) or the store
itself (via [AsContext
]/AsContextMut
), as well as the component
instance to which the current host task belongs.
See [Accessor::with
] for details.
Auto Trait Implementations§
impl<'a, T, D> Freeze for Access<'a, T, D>
impl<'a, T, D> RefUnwindSafe for Access<'a, T, D>where
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<'a, T, D> Send for Access<'a, T, D>
impl<'a, T, D> Sync for Access<'a, T, D>
impl<'a, T, D> Unpin for Access<'a, T, D>
impl<'a, T, D> UnwindSafe for Access<'a, T, D>where
T: UnwindSafe,
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more