MCPcopy Create free account
hub / github.com/apache/avro-rs / parse_as_native_complex

Method parse_as_native_complex

avro/src/schema/parser.rs:257–271  ·  view source on GitHub ↗

Try to parse this as a native complex type.

(
            complex: &Map<String, Value>,
            parser: &mut Parser,
            enclosing_namespace: NamespaceRef,
        )

Source from the content-addressed store, hash-verified

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>

Callers

nothing calls this directly

Calls 3

getMethod · 0.80
parse_fixedMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected