hax_frontend_exporter::state

Struct State

source
pub struct State<Base, Thir, Mir, OwnerId, Binder> {
    pub base: Base,
    pub thir: Thir,
    pub mir: Mir,
    pub owner_id: OwnerId,
    pub binder: Binder,
}

Fields§

§base: Base§thir: Thir§mir: Mir§owner_id: OwnerId§binder: Binder

Implementations§

source§

impl<'tcx> State<Base<'tcx>, (), (), (), ()>

source

pub fn new(tcx: TyCtxt<'tcx>, options: Options) -> Self

source§

impl<'tcx> State<Base<'tcx>, (), (), DefId, ()>

source

pub fn new_from_state_and_id<S: BaseState<'tcx>>(s: &S, id: DefId) -> Self

source§

impl<'tcx> State<Base<'tcx>, (), Rc<Body<'tcx>>, DefId, ()>

source

pub fn new_from_mir( tcx: TyCtxt<'tcx>, options: Options, mir: Body<'tcx>, owner_id: DefId, ) -> Self

source§

impl<'tcx> State<Base<'tcx>, Rc<Thir<'tcx>>, (), DefId, ()>

source

pub fn from_thir(base: Base<'tcx>, owner_id: DefId, thir: RcThir<'tcx>) -> Self

source§

impl<'tcx> State<Base<'tcx>, (), (), DefId, ()>

source

pub fn from_under_owner<S: UnderOwnerState<'tcx>>(s: &S) -> Self

Trait Implementations§

source§

impl<Base: Clone, Thir: Clone, Mir: Clone, OwnerId: Clone, Binder: Clone> Clone for State<Base, Thir, Mir, OwnerId, Binder>

source§

fn clone(&self) -> State<Base, Thir, Mir, OwnerId, Binder>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'tcx, Thir, Mir, OwnerId, Binder> HasBase<'tcx> for State<Base<'tcx>, Thir, Mir, OwnerId, Binder>

source§

fn base(&self) -> Base<'tcx>

source§

impl<'tcx, Base, Thir, Mir, OwnerId, Binder> HasBaseSetter<'tcx> for State<Base, Thir, Mir, OwnerId, Binder>

source§

type Out = State<Base<'tcx>, Thir, Mir, OwnerId, Binder>

source§

fn with_base(self, base: Base<'tcx>) -> Self::Out

source§

impl<'tcx, Base, Thir, Mir, OwnerId> HasBinder<'tcx> for State<Base, Thir, Mir, OwnerId, UnitBinder<'tcx>>

source§

fn binder(&self) -> UnitBinder<'tcx>

source§

impl<'tcx, Base, Thir, Mir, OwnerId, Binder> HasBinderSetter<'tcx> for State<Base, Thir, Mir, OwnerId, Binder>

source§

type Out = State<Base, Thir, Mir, OwnerId, Binder<TyCtxt<'tcx>, ()>>

source§

fn with_binder(self, binder: UnitBinder<'tcx>) -> Self::Out

source§

impl<'tcx, Base, Thir, OwnerId, Binder> HasMir<'tcx> for State<Base, Thir, RcMir<'tcx>, OwnerId, Binder>

source§

fn mir(&self) -> RcMir<'tcx>

source§

impl<'tcx, Base, Thir, Mir, OwnerId, Binder> HasMirSetter<'tcx> for State<Base, Thir, Mir, OwnerId, Binder>

source§

type Out = State<Base, Thir, Rc<Body<'tcx>>, OwnerId, Binder>

source§

fn with_mir(self, mir: RcMir<'tcx>) -> Self::Out

source§

impl<Base, Thir, Mir, Binder> HasOwnerId for State<Base, Thir, Mir, DefId, Binder>

source§

fn owner_id(&self) -> DefId

source§

impl<Base, Thir, Mir, OwnerId, Binder> HasOwnerIdSetter for State<Base, Thir, Mir, OwnerId, Binder>

source§

type Out = State<Base, Thir, Mir, DefId, Binder>

source§

fn with_owner_id(self, owner_id: DefId) -> Self::Out

source§

impl<'tcx, Base, Mir, OwnerId, Binder> HasThir<'tcx> for State<Base, RcThir<'tcx>, Mir, OwnerId, Binder>

source§

fn thir(&self) -> RcThir<'tcx>

source§

impl<'tcx, Base, Thir, Mir, OwnerId, Binder> HasThirSetter<'tcx> for State<Base, Thir, Mir, OwnerId, Binder>

source§

type Out = State<Base, Rc<Thir<'tcx>>, Mir, OwnerId, Binder>

source§

fn with_thir(self, thir: RcThir<'tcx>) -> Self::Out

Auto Trait Implementations§

§

impl<Base, Thir, Mir, OwnerId, Binder> Freeze for State<Base, Thir, Mir, OwnerId, Binder>
where Base: Freeze, Thir: Freeze, Mir: Freeze, OwnerId: Freeze, Binder: Freeze,

§

impl<Base, Thir, Mir, OwnerId, Binder> RefUnwindSafe for State<Base, Thir, Mir, OwnerId, Binder>
where Base: RefUnwindSafe, Thir: RefUnwindSafe, Mir: RefUnwindSafe, OwnerId: RefUnwindSafe, Binder: RefUnwindSafe,

§

impl<Base, Thir, Mir, OwnerId, Binder> Send for State<Base, Thir, Mir, OwnerId, Binder>
where Base: Send, Thir: Send, Mir: Send, OwnerId: Send, Binder: Send,

§

impl<Base, Thir, Mir, OwnerId, Binder> Sync for State<Base, Thir, Mir, OwnerId, Binder>
where Base: Sync, Thir: Sync, Mir: Sync, OwnerId: Sync, Binder: Sync,

§

impl<Base, Thir, Mir, OwnerId, Binder> Unpin for State<Base, Thir, Mir, OwnerId, Binder>
where Base: Unpin, Thir: Unpin, Mir: Unpin, OwnerId: Unpin, Binder: Unpin,

§

impl<Base, Thir, Mir, OwnerId, Binder> UnwindSafe for State<Base, Thir, Mir, OwnerId, Binder>
where Base: UnwindSafe, Thir: UnwindSafe, Mir: UnwindSafe, OwnerId: UnwindSafe, Binder: 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<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<P> IntoQueryParam<P> for P

source§

impl<'tcx, S> ParamEnv<'tcx> for S
where S: UnderOwnerState<'tcx>,

source§

fn param_env(&self) -> ParamEnv<'tcx>

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
source§

impl<'tcx, S> WithGlobalCacheExt<'tcx> for S
where S: BaseState<'tcx>,

source§

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§

fn with_item_cache<T>( &self, def_id: RDefId, f: impl FnOnce(&mut ItemCache<'tcx>) -> T, ) -> T

Access the cache for a given item. You must not call sinto within this function as this will likely result in BorrowMut panics.
source§

impl<'tcx, S> WithItemCacheExt<'tcx> for S
where S: UnderOwnerState<'tcx>,

source§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more