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§
Required Methods§
sourcefn schema(
&mut self,
schema: &ArrowSchema,
values: Vec<Self::T>,
) -> Result<Self::U>
fn schema( &mut self, schema: &ArrowSchema, values: Vec<Self::T>, ) -> Result<Self::U>
Called after schema’s type visited.
sourcefn struct(&mut self, fields: &Fields, results: Vec<Self::T>) -> Result<Self::T>
fn struct(&mut self, fields: &Fields, results: Vec<Self::T>) -> Result<Self::T>
Called after struct’s fields visited.
sourcefn list(&mut self, list: &DataType, value: Self::T) -> Result<Self::T>
fn list(&mut self, list: &DataType, value: Self::T) -> Result<Self::T>
Called after list fields visited.
Provided Methods§
sourcefn before_field(&mut self, _field: &Field) -> Result<()>
fn before_field(&mut self, _field: &Field) -> Result<()>
Called before struct/list/map field.
sourcefn after_field(&mut self, _field: &Field) -> Result<()>
fn after_field(&mut self, _field: &Field) -> Result<()>
Called after struct/list/map field.
sourcefn before_list_element(&mut self, _field: &Field) -> Result<()>
fn before_list_element(&mut self, _field: &Field) -> Result<()>
Called before list element.
sourcefn after_list_element(&mut self, _field: &Field) -> Result<()>
fn after_list_element(&mut self, _field: &Field) -> Result<()>
Called after list element.
sourcefn before_map_key(&mut self, _field: &Field) -> Result<()>
fn before_map_key(&mut self, _field: &Field) -> Result<()>
Called before map key.
sourcefn after_map_key(&mut self, _field: &Field) -> Result<()>
fn after_map_key(&mut self, _field: &Field) -> Result<()>
Called after map key.
sourcefn before_map_value(&mut self, _field: &Field) -> Result<()>
fn before_map_value(&mut self, _field: &Field) -> Result<()>
Called before map value.
sourcefn after_map_value(&mut self, _field: &Field) -> Result<()>
fn after_map_value(&mut self, _field: &Field) -> Result<()>
Called after map value.