MCPcopy Create free account
hub / github.com/apache/arrow-rs / schema

Method schema

arrow-avro/src/reader/header.rs:123–131  ·  view source on GitHub ↗

Returns the `Schema` if any

(&self)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

from_sliceFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected