Trait iceberg::spec::SchemaVisitor

source ·
pub trait SchemaVisitor {
    type T;

Show 14 methods // Required methods fn schema(&mut self, schema: &Schema, value: Self::T) -> Result<Self::T>; fn field( &mut self, field: &NestedFieldRef, value: Self::T, ) -> Result<Self::T>; fn struct( &mut self, struct: &StructType, results: Vec<Self::T>, ) -> Result<Self::T>; fn list(&mut self, list: &ListType, value: Self::T) -> Result<Self::T>; fn map( &mut self, map: &MapType, key_value: Self::T, value: Self::T, ) -> Result<Self::T>; fn primitive(&mut self, p: &PrimitiveType) -> Result<Self::T>; // Provided methods fn before_struct_field(&mut self, _field: &NestedFieldRef) -> Result<()> { ... } fn after_struct_field(&mut self, _field: &NestedFieldRef) -> Result<()> { ... } fn before_list_element(&mut self, _field: &NestedFieldRef) -> Result<()> { ... } fn after_list_element(&mut self, _field: &NestedFieldRef) -> Result<()> { ... } fn before_map_key(&mut self, _field: &NestedFieldRef) -> Result<()> { ... } fn after_map_key(&mut self, _field: &NestedFieldRef) -> Result<()> { ... } fn before_map_value(&mut self, _field: &NestedFieldRef) -> Result<()> { ... } fn after_map_value(&mut self, _field: &NestedFieldRef) -> Result<()> { ... }
}
Expand description

A post order schema visitor.

For order of methods called, please refer to visit_schema.

Required Associated Types§

source

type T

Return type of this visitor.

Required Methods§

source

fn schema(&mut self, schema: &Schema, value: Self::T) -> Result<Self::T>

Called after schema’s type visited.

source

fn field(&mut self, field: &NestedFieldRef, value: Self::T) -> Result<Self::T>

Called after struct’s field type visited.

source

fn struct( &mut self, struct: &StructType, results: Vec<Self::T>, ) -> Result<Self::T>

Called after struct’s fields visited.

source

fn list(&mut self, list: &ListType, value: Self::T) -> Result<Self::T>

Called after list fields visited.

source

fn map( &mut self, map: &MapType, key_value: Self::T, value: Self::T, ) -> Result<Self::T>

Called after map’s key and value fields visited.

source

fn primitive(&mut self, p: &PrimitiveType) -> Result<Self::T>

Called when see a primitive type.

Provided Methods§

source

fn before_struct_field(&mut self, _field: &NestedFieldRef) -> Result<()>

Called before struct field.

source

fn after_struct_field(&mut self, _field: &NestedFieldRef) -> Result<()>

Called after struct field.

source

fn before_list_element(&mut self, _field: &NestedFieldRef) -> Result<()>

Called before list field.

source

fn after_list_element(&mut self, _field: &NestedFieldRef) -> Result<()>

Called after list field.

source

fn before_map_key(&mut self, _field: &NestedFieldRef) -> Result<()>

Called before map key field.

source

fn after_map_key(&mut self, _field: &NestedFieldRef) -> Result<()>

Called after map key field.

source

fn before_map_value(&mut self, _field: &NestedFieldRef) -> Result<()>

Called before map value field.

source

fn after_map_value(&mut self, _field: &NestedFieldRef) -> Result<()>

Called after map value field.

Implementors§