pub struct State<'tcx, Owner> {
pub base: Base<'tcx>,
pub owner: Owner,
}Fields§
§base: Base<'tcx>§owner: OwnerImplementations§
Trait Implementations§
Source§impl<'tcx, O> BaseState<'tcx> for State<'tcx, O>
impl<'tcx, O> BaseState<'tcx> for State<'tcx, O>
fn base(&self) -> Base<'tcx>
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§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.Auto Trait Implementations§
impl<'tcx, Owner> !DynSend for State<'tcx, Owner>
impl<'tcx, Owner> !DynSync for State<'tcx, Owner>
impl<'tcx, Owner> !RefUnwindSafe for State<'tcx, Owner>
impl<'tcx, Owner> !Send for State<'tcx, Owner>
impl<'tcx, Owner> !Sync for State<'tcx, Owner>
impl<'tcx, Owner> !UnwindSafe for State<'tcx, Owner>
impl<'tcx, Owner> Freeze for State<'tcx, Owner>where
Owner: Freeze,
impl<'tcx, Owner> Unpin for State<'tcx, Owner>where
Owner: Unpin,
impl<'tcx, Owner> UnsafeUnpin for State<'tcx, Owner>where
Owner: UnsafeUnpin,
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> 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 more