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

Method from_schema

avro/src/headers.rs:41–44  ·  view source on GitHub ↗

Use this helper to build an instance from an existing Avro `Schema`.

(schema: &Schema)

Source from the content-addressed store, hash-verified

39impl RabinFingerprintHeader {
40 /// Use this helper to build an instance from an existing Avro `Schema`.
41 pub fn from_schema(schema: &Schema) -> Self {
42 let fingerprint = schema.fingerprint::<Rabin>();
43 RabinFingerprintHeader { fingerprint }
44 }
45}
46
47impl HeaderBuilder for RabinFingerprintHeader {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected