Create a `Schema` from a reader which implements [`Read`].
(reader: &mut (impl Read + ?Sized))
| 612 | |
| 613 | let value = serde_json::from_str(schema).map_err(Details::ParseSchemaJson)?; |
| 614 | let schema = parser.parse(value, None)?; |
| 615 | let schemata = parser.parse_list()?; |
| 616 | Ok((schema, schemata)) |
| 617 | } |
| 618 | |
| 619 | /// Create a `Schema` from a reader which implements [`Read`]. |
| 620 | pub fn parse_reader(reader: &mut (impl Read + ?Sized)) -> AvroResult<Schema> { |
| 621 | let mut buf = String::new(); |
| 622 | match reader.read_to_string(&mut buf) { |
| 623 | Ok(_) => Self::parse_str(&buf), |
nothing calls this directly
no outgoing calls
no test coverage detected