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> 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> 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§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<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
Source§impl<'tcx, S> HasParamEnv<'tcx> for Swhere
S: UnderOwnerState<'tcx>,
impl<'tcx, S> HasParamEnv<'tcx> for Swhere
S: UnderOwnerState<'tcx>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more
Source§impl<'tcx, T> UnderOwnerState<'tcx> for T
impl<'tcx, T> UnderOwnerState<'tcx> for T
fn owner_id(&self) -> RDefId
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.