Skip to main content

Crate pyro_spec

Crate pyro_spec 

Source
Expand description

Pyro-native type system and schema representation.

This crate provides a lightweight schema representation optimized for PyroValue. Unlike Arrow’s DataType (which has ~40 variants for timestamps, decimals, run-end-encoded, etc.), PyroType mirrors exactly the variants that PyroValue can represent, making match arms exhaustive and tiny.

Core types:

  • PyroType — the main type enum, mirroring PyroValue discriminants 1:1
  • PyroField — a named, nullable column descriptor (equivalent to Arrow Field)
  • PyroSchema — an ordered collection of PyroFields (equivalent to Arrow Schema)
  • coerce_pyro_types — type coercion to find common supertypes

Conversion to/from arrow::datatypes::DataType lives in the arrow module (behind the arrow feature flag).

Structs§

CapabilityFunc
Documentation for a capability function
ClassSpec
InterfaceSpec
The root specification object.
ModuleFunc
Documentation for the main function of a module
PyroField
A named, nullable column descriptor — the Pyro equivalent of arrow::datatypes::Field.
PyroSchema
An ordered collection of PyroFields — the Pyro equivalent of arrow::datatypes::Schema.

Enums§

PrimitiveDataType
The primitive element type inside a PrimitiveValueList.
PyroType
A data type enum that mirrors the variants of [PyroValue] exactly.

Functions§

coerce_pyro_types
Coerce two PyroTypes to a common supertype. Returns None if incompatible.