Try to parse this as a native complex type.
(
complex: &Map<String, Value>,
parser: &mut Parser,
enclosing_namespace: NamespaceRef,
)
| 255 | parser.parse_fixed(complex, enclosing_namespace) |
| 256 | } |
| 257 | _ => parser.parse(value, enclosing_namespace), |
| 258 | }, |
| 259 | None => Err(Details::GetLogicalTypeField.into()), |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | // This crate supports some logical types natively, and this function tries to convert |
| 264 | // a native complex type with a logical type attribute to these logical types. |
| 265 | // This function: |
| 266 | // 1. Checks whether the native complex type is in the supported kinds. |
| 267 | // 2. If it is, using the convert function to convert the native complex type to |
| 268 | // a logical type. |
| 269 | fn try_convert_to_logical_type<F>( |
| 270 | logical_type: &str, |
| 271 | schema: Schema, |
| 272 | supported_schema_kinds: &[SchemaKind], |
| 273 | convert: F, |
| 274 | ) -> AvroResult<Schema> |
nothing calls this directly
no test coverage detected