Visitable in clippy_utils::visitors - Rust
Description: A type which can be visited.

Skip to main content

## Visitable

# Trait Visitable

Source

    pub trait Visitable<'tcx> {
        // Required method
        fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result;
    }

Expand description

A type which can be visited.

## Required Methods§

Source

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

Calls the corresponding `visit_*` function on the visitor.

## 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<'tcx> Visitable<'tcx> for &'tcx Arm<'tcx>

Source§

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

Source§

### impl<'tcx> Visitable<'tcx> for &'tcx Block<'tcx>

Source§

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

Source§

### impl<'tcx> Visitable<'tcx> for &'tcx Body<'tcx>

Source§

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

Source§

### impl<'tcx> Visitable<'tcx> for &'tcx Expr<'tcx>

Source§

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

Source§

### impl<'tcx> Visitable<'tcx> for &'tcx Stmt<'tcx>

Source§

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

Source§

### impl<'tcx, A, B> Visitable<'tcx> for (A, B)
where A: Visitable<'tcx>, B: Visitable<'tcx>,

Source§

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

Source§

### impl<'tcx, T> Visitable<'tcx> for &'tcx [T]
where &'tcx T: Visitable<'tcx>,

Source§

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

Source§

### impl<'tcx, T> Visitable<'tcx> for Option<T>
where T: Visitable<'tcx>,

Source§

#### fn visit<V: Visitor<'tcx>>(self, visitor: &mut V) -> V::Result

## Implementors§