Dispatch `plan` to the matching method on `visitor`. Adding a [`PhysicalPlan`] variant without a corresponding arm is a compile error.
(
visitor: &mut V,
plan: &PhysicalPlan,
)
| 47 | /// Adding a [`PhysicalPlan`] variant without a corresponding arm is a |
| 48 | /// compile error. |
| 49 | pub fn dispatch<V: PhysicalTaskVisitor>( |
| 50 | visitor: &mut V, |
| 51 | plan: &PhysicalPlan, |
| 52 | ) -> Result<V::Output, V::Error> { |
| 53 | match plan { |
| 54 | PhysicalPlan::Vector(op) => visitor.vector(op), |
| 55 | PhysicalPlan::Graph(op) => visitor.graph(op), |
| 56 | PhysicalPlan::Document(op) => visitor.document(op), |
| 57 | PhysicalPlan::Kv(op) => visitor.kv(op), |
| 58 | PhysicalPlan::Text(op) => visitor.text(op), |
| 59 | PhysicalPlan::Columnar(op) => visitor.columnar(op), |
| 60 | PhysicalPlan::Timeseries(op) => visitor.timeseries(op), |
| 61 | PhysicalPlan::Spatial(op) => visitor.spatial(op), |
| 62 | PhysicalPlan::Crdt(op) => visitor.crdt(op), |
| 63 | PhysicalPlan::Query(op) => visitor.query(op), |
| 64 | PhysicalPlan::Meta(op) => visitor.meta(op), |
| 65 | PhysicalPlan::Array(op) => visitor.array(op), |
| 66 | PhysicalPlan::ClusterArray(op) => visitor.cluster_array(op), |
| 67 | } |
| 68 | } |