flux_middle::rty::fold

Trait TypeVisitable

Source
pub trait TypeVisitable: Sized {
    // Required method
    fn visit_with<V: TypeVisitor>(
        &self,
        visitor: &mut V,
    ) -> ControlFlow<V::BreakTy>;

    // Provided methods
    fn has_escaping_bvars(&self) -> bool { ... }
    fn has_escaping_bvars_at_or_above(&self, binder: DebruijnIndex) -> bool { ... }
    fn fvars(&self) -> FxHashSet<Name> { ... }
}

Required Methods§

Source

fn visit_with<V: TypeVisitor>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy>

Provided Methods§

Source

fn has_escaping_bvars(&self) -> bool

Source

fn has_escaping_bvars_at_or_above(&self, binder: DebruijnIndex) -> bool

Returns true if self has any late-bound vars that are either bound by binder or bound by some binder outside of binder. If binder is ty::INNERMOST, this indicates whether there are any late-bound vars that appear free.

Source

fn fvars(&self) -> FxHashSet<Name>

Returns the set of all free variables. For example, Vec<i32[n]>{v : v > m} returns {n, m}.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TypeVisitable for bool

Source§

impl TypeVisitable for usize

Source§

impl TypeVisitable for DefId

Source§

impl TypeVisitable for Abi

Source§

impl TypeVisitable for Safety

Source§

impl<T: TypeVisitable> TypeVisitable for Vec<T>

Implementors§

Source§

impl TypeVisitable for InferMode

Source§

impl TypeVisitable for BoundReftKind

Source§

impl TypeVisitable for BoundVariableKind

Source§

impl TypeVisitable for BaseTy

Source§

impl TypeVisitable for BoundRegionKind

Source§

impl TypeVisitable for BvSize

Source§

impl TypeVisitable for ClauseKind

Source§

impl TypeVisitable for ClosureKind

Source§

impl TypeVisitable for Ensures

Source§

impl TypeVisitable for ExistentialPredicate

Source§

impl TypeVisitable for GenericArg

Source§

impl TypeVisitable for Region

Source§

impl TypeVisitable for Sort

Source§

impl TypeVisitable for SortArg

Source§

impl TypeVisitable for TyOrCtor

Source§

impl TypeVisitable for BinOp

Source§

impl TypeVisitable for HoleKind

Source§

impl TypeVisitable for Symbol

Source§

impl TypeVisitable for CanonicalConstrTy

Source§

impl TypeVisitable for AliasReft

Source§

impl TypeVisitable for Expr

Source§

impl TypeVisitable for KVar

Source§

impl TypeVisitable for KVid

Source§

impl TypeVisitable for Lambda

Source§

impl TypeVisitable for AliasTy

Source§

impl TypeVisitable for Clause

Source§

impl TypeVisitable for Const

Source§

impl TypeVisitable for CoroutineObligPredicate

Source§

impl TypeVisitable for ExistentialProjection

Source§

impl TypeVisitable for ExistentialTraitRef

Source§

impl TypeVisitable for FnOutput

Source§

impl TypeVisitable for FnSig

Source§

impl TypeVisitable for FnTraitPredicate

Source§

impl TypeVisitable for FuncSort

Source§

impl TypeVisitable for Invariant

Source§

impl TypeVisitable for PolyFuncSort

Source§

impl TypeVisitable for ProjectionPredicate

Source§

impl TypeVisitable for Qualifier

Source§

impl TypeVisitable for SubsetTy

Source§

impl TypeVisitable for TraitPredicate

Source§

impl TypeVisitable for TraitRef

Source§

impl TypeVisitable for Ty

Source§

impl TypeVisitable for VariantSig

Source§

impl<T> TypeVisitable for Opaqueness<T>
where T: TypeVisitable,

Source§

impl<T> TypeVisitable for Binder<T>
where T: TypeVisitable,

Source§

impl<T> TypeVisitable for List<T>

Source§

impl<T: TypeVisitable> TypeVisitable for OutlivesPredicate<T>