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

Method parse_list

avro/src/schema/parser.rs:70–82  ·  view source on GitHub ↗

Create an array of `Schema`s from an iterator of JSON Avro schemas. It is allowed that the schemas have cross-dependencies; these will be resolved during parsing.

(&mut self)

Source from the content-addressed store, hash-verified

68 ///
69 /// It is allowed that the schemas have cross-dependencies; these will be resolved during parsing.
70 pub(super) fn parse_list(&mut self) -> AvroResult<Vec<Schema>> {
71 self.parse_input_schemas()?;
72
73 let mut parsed_schemas = Vec::with_capacity(self.parsed_schemas.len());
74 for name in self.input_order.drain(0..) {
75 let parsed = self
76 .parsed_schemas
77 .remove(&name)
78 .expect("One of the input schemas was unexpectedly not parsed");
79 parsed_schemas.push(parsed);
80 }
81 Ok(parsed_schemas)
82 }
83
84 /// Convert the input schemas to `parsed_schemas`.
85 pub(super) fn parse_input_schemas(&mut self) -> Result<(), Error> {

Callers

nothing calls this directly

Calls 2

parse_input_schemasMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected