Visitor

Trait Visitor 

Source
pub trait Visitor {
    type Break;
}
Expand description

A visitor.

This trait provides the Break type used by its two child traits Visit and VisitMut. All visitors can abort visitation early by returning ControlFlow::Break. For the common case of visitors that never return early, use std::convert::Infallible. This is the default type used by derive(Visitor).

Required Associated Types§

Source

type Break

The type used for early-return, if the visitor supports it. Use an empty type like std::convert::Infallible if the visitor does not short-circuit.

Implementors§