Skip to main content

Module types

Module types 

Source
Expand description

Type conversion utilities for code generation

This module provides utilities for converting between protobuf types and Rust types during code generation.

Structs§

UnifiedType
A language-neutral description of a protobuf field’s type.

Enums§

BaseType
The underlying category of a UnifiedType, independent of optional/repeated wrapping.
JsonType
A free-form JSON type of google/protobuf/struct.proto: the runtime’s well-known type in Rust, a plain object in Python.
RenderContext
Context for rendering types in different situations

Functions§

field_assignment
Generate field assignment code.
unified_to_napi
Convert a unified type to a Rust NAPI parameter type string.
unified_to_rust
Convert a unified type to a Rust type string.
unified_to_typescript
Convert a unified type to a TypeScript type annotation string.