pub struct State<Base, Owner, Binder> {
pub base: Base,
pub owner: Owner,
pub binder: Binder,
}Fields§
§base: Base§owner: Owner§binder: BinderImplementations§
Trait Implementations§
Source§impl<'tcx, Base, Owner> HasBinder<'tcx> for State<Base, Owner, UnitBinder<'tcx>>
impl<'tcx, Base, Owner> HasBinder<'tcx> for State<Base, Owner, UnitBinder<'tcx>>
fn binder(&self) -> UnitBinder<'tcx>
Auto Trait Implementations§
impl<Base, Owner, Binder> DynSend for State<Base, Owner, Binder>where
Base: DynSend,
Owner: DynSend,
Binder: DynSend,
impl<Base, Owner, Binder> DynSync for State<Base, Owner, Binder>where
Base: DynSync,
Owner: DynSync,
Binder: DynSync,
impl<Base, Owner, Binder> Freeze for State<Base, Owner, Binder>
impl<Base, Owner, Binder> RefUnwindSafe for State<Base, Owner, Binder>
impl<Base, Owner, Binder> Send for State<Base, Owner, Binder>
impl<Base, Owner, Binder> Sync for State<Base, Owner, Binder>
impl<Base, Owner, Binder> Unpin for State<Base, Owner, Binder>
impl<Base, Owner, Binder> UnsafeUnpin for State<Base, Owner, Binder>
impl<Base, Owner, Binder> UnwindSafe for State<Base, Owner, Binder>
Blanket Implementations§
Source§impl<'tcx, T> BaseState<'tcx> for T
impl<'tcx, T> BaseState<'tcx> for T
fn tcx(&self) -> TyCtxt<'tcx>
Source§fn with_hax_owner(&self, owner: &DefId) -> StateWithOwner<'tcx>
fn with_hax_owner(&self, owner: &DefId) -> StateWithOwner<'tcx>
Create a state with the given owner.
Source§fn with_rustc_owner(&self, owner_id: RDefId) -> StateWithOwner<'tcx>
fn with_rustc_owner(&self, owner_id: RDefId) -> StateWithOwner<'tcx>
Create a state with the given owner.
Source§fn base_state(&self) -> StateWithBase<'tcx>
fn base_state(&self) -> StateWithBase<'tcx>
State with only access to the global state.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreimpl<T> Mappable for T
Source§impl<'tcx, T> UnderOwnerState<'tcx> for T
impl<'tcx, T> UnderOwnerState<'tcx> for T
fn param_env(&self) -> ParamEnv<'tcx>
fn typing_env(&self) -> TypingEnv<'tcx>
fn with_base(&self, base: Base<'tcx>) -> StateWithOwner<'tcx>
fn with_binder(&self, binder: UnitBinder<'tcx>) -> StateWithBinder<'tcx>
Source§impl<'tcx, S> WithGlobalCacheExt<'tcx> for Swhere
S: BaseState<'tcx>,
impl<'tcx, S> WithGlobalCacheExt<'tcx> for Swhere
S: BaseState<'tcx>,
Source§fn with_global_cache<T>(&self, f: impl FnOnce(&mut GlobalCache<'tcx>) -> T) -> T
fn with_global_cache<T>(&self, f: impl FnOnce(&mut GlobalCache<'tcx>) -> T) -> T
Access the global cache. You must not call
sinto within this function as this will likely
result in BorrowMut panics.Source§impl<'tcx, S> WithItemCacheExt<'tcx> for Swhere
S: UnderOwnerState<'tcx>,
impl<'tcx, S> WithItemCacheExt<'tcx> for Swhere
S: UnderOwnerState<'tcx>,
Source§fn with_cache<T>(&self, f: impl FnOnce(&mut ItemCache<'tcx>) -> T) -> T
fn with_cache<T>(&self, f: impl FnOnce(&mut ItemCache<'tcx>) -> T) -> T
Access the cache for the current item. You must not call
sinto within this function as
this will likely result in BorrowMut panics.