Returns the `Schema` if any
(&self)
| 121 | |
| 122 | /// Returns the `Schema` if any |
| 123 | pub(crate) fn schema(&self) -> Result<Option<Schema<'_>>, AvroError> { |
| 124 | self.get(SCHEMA_METADATA_KEY) |
| 125 | .map(|x| { |
| 126 | serde_json::from_slice(x).map_err(|e| { |
| 127 | AvroError::ParseError(format!("Failed to parse Avro schema JSON: {e}")) |
| 128 | }) |
| 129 | }) |
| 130 | .transpose() |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | /// Header information for an Avro OCF file. |
nothing calls this directly
no test coverage detected