pub trait TyVisitable: Sized + AstVisitable {
// Provided methods
fn substitute(&mut self, generics: &GenericArgs) { ... }
fn move_under_binder(self) -> Self { ... }
fn move_under_binders(self, depth: DeBruijnId) -> Self { ... }
fn move_from_under_binders(self, depth: DeBruijnId) -> Option<Self> { ... }
fn visit_db_id<B>(
&mut self,
f: impl FnMut(&mut DeBruijnId) -> ControlFlow<B>,
) -> ControlFlow<B> { ... }
}
Expand description
Types that are involved at the type-level and may be substituted around.
Provided Methods§
fn substitute(&mut self, generics: &GenericArgs)
sourcefn move_under_binder(self) -> Self
fn move_under_binder(self) -> Self
Move under one binder.
sourcefn move_under_binders(self, depth: DeBruijnId) -> Self
fn move_under_binders(self, depth: DeBruijnId) -> Self
Move under depth
binders.
sourcefn move_from_under_binders(self, depth: DeBruijnId) -> Option<Self>
fn move_from_under_binders(self, depth: DeBruijnId) -> Option<Self>
Move the value out of depth
binders. Returns None
if it contains a variable bound in
one of these depth
binders.
sourcefn visit_db_id<B>(
&mut self,
f: impl FnMut(&mut DeBruijnId) -> ControlFlow<B>,
) -> ControlFlow<B>
fn visit_db_id<B>( &mut self, f: impl FnMut(&mut DeBruijnId) -> ControlFlow<B>, ) -> ControlFlow<B>
Visit the de Bruijn ids contained in self
, as seen from the outside of self
. This means
that any variable bound inside self
will be skipped, and all the seen indices will count
from the outside of self.
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.