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§
fn visit_with<V: TypeVisitor>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy>
Provided Methods§
fn has_escaping_bvars(&self) -> bool
Sourcefn has_escaping_bvars_at_or_above(&self, binder: DebruijnIndex) -> bool
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.
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.