buffa-descriptor 0.7.0

Protobuf descriptor types (FileDescriptorProto, DescriptorProto, ...) for buffa
Documentation
//! Protobuf descriptor types for buffa.
//!
//! This crate provides buffa-generated Rust types for the protobuf descriptor
//! schema (`google/protobuf/descriptor.proto`) and the protoc plugin protocol
//! (`google/protobuf/compiler/plugin.proto`).  It is the foundation for both
//! compile-time code generation (`buffa-codegen`) and runtime reflection.
//!
//! The types are self-hosted — generated by buffa-codegen itself — so there
//! is no dependency on an external protobuf library.  The only runtime
//! dependency is `buffa`.
//!
//! # Modules
//!
//! - [`generated::descriptor`] — `FileDescriptorProto`, `DescriptorProto`,
//!   `FieldDescriptorProto`, `FeatureSet`, `Edition`, and the rest of
//!   `descriptor.proto`.
//! - [`generated::compiler`] — `CodeGeneratorRequest`, `CodeGeneratorResponse`
//!   from `plugin.proto`.
//!
//! # Regenerating
//!
//! The generated code is checked in.  To regenerate (after a codegen output
//! change or a protobuf version bump):
//!
//! ```sh
//! task gen-bootstrap-types
//! ```

#![cfg_attr(not(feature = "std"), no_std)]

extern crate alloc;

mod desc;
pub mod features;
pub mod generated;
#[cfg(feature = "reflect")]
pub mod pool;
#[cfg(feature = "reflect")]
pub mod reflect;

pub use desc::{
    EnumDescriptor, EnumIndex, EnumValueDescriptor, ExtensionDescriptor, ExtensionIndex,
    FieldDescriptor, FieldKind, MessageDescriptor, MessageIndex, MethodDescriptor, OneofDescriptor,
    ScalarType, ServiceDescriptor, ServiceIndex, SingularKind,
};
#[cfg(feature = "reflect")]
pub use pool::{DescriptorPool, PoolError};
#[cfg(all(feature = "reflect", feature = "json"))]
pub use reflect::DynamicMessageSeed;
#[cfg(feature = "reflect")]
pub use reflect::{
    AnyError, DynamicMessage, MapKey, MapKeyRef, MapValue, ReflectCow, ReflectElement, ReflectList,
    ReflectMap, ReflectMapKey, ReflectMessage, ReflectMessageMut, ReflectMode, Reflectable, Value,
    ValueRef,
};