Trait iceberg::arrow::ArrowSchemaVisitor

source ·
pub trait ArrowSchemaVisitor {
    type T;
    type U;

Show 13 methods // Required methods fn schema( &mut self, schema: &ArrowSchema, values: Vec<Self::T>, ) -> Result<Self::U>; fn struct( &mut self, fields: &Fields, results: Vec<Self::T>, ) -> Result<Self::T>; fn list(&mut self, list: &DataType, value: Self::T) -> Result<Self::T>; fn map( &mut self, map: &DataType, key_value: Self::T, value: Self::T, ) -> Result<Self::T>; fn primitive(&mut self, p: &DataType) -> Result<Self::T>; // Provided methods fn before_field(&mut self, _field: &Field) -> Result<()> { ... } fn after_field(&mut self, _field: &Field) -> Result<()> { ... } fn before_list_element(&mut self, _field: &Field) -> Result<()> { ... } fn after_list_element(&mut self, _field: &Field) -> Result<()> { ... } fn before_map_key(&mut self, _field: &Field) -> Result<()> { ... } fn after_map_key(&mut self, _field: &Field) -> Result<()> { ... } fn before_map_value(&mut self, _field: &Field) -> Result<()> { ... } fn after_map_value(&mut self, _field: &Field) -> Result<()> { ... }
}
Expand description

A post order arrow schema visitor.

For order of methods called, please refer to [visit_schema].

Required Associated Types§

source

type T

Return type of this visitor on arrow field.

source

type U

Return type of this visitor on arrow schema.

Required Methods§

source

fn schema( &mut self, schema: &ArrowSchema, values: Vec<Self::T>, ) -> Result<Self::U>

Called after schema’s type visited.

source

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

Called after struct’s fields visited.

source

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

Called after list fields visited.

source

fn map( &mut self, map: &DataType, 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: &DataType) -> Result<Self::T>

Called when see a primitive type.

Provided Methods§

source

fn before_field(&mut self, _field: &Field) -> Result<()>

Called before struct/list/map field.

source

fn after_field(&mut self, _field: &Field) -> Result<()>

Called after struct/list/map field.

source

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

Called before list element.

source

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

Called after list element.

source

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

Called before map key.

source

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

Called after map key.

source

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

Called before map value.

source

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

Called after map value.

Implementors§