As part of the macro expansion and code generation process, Diplomat
generates a simplified version of the Rust AST that captures special
types such as opaque structs, Box, and Result with utilities
for handling such types.
This module contains utilities for dealing with Rust attributes
A method declared in the impl associated with an FFI struct.
Includes both static and non-static methods, which can be distinguished
by inspecting Method::self_param.
A type annotated with [diplomat::opaque] whose fields/variants are not visible.
Opaque types cannot be passed by-value across the FFI boundary, so they
must be boxed or passed as references.
For types like Result/DiplomatResult, &[T]/DiplomatSlice<T> which can be
specified using (non-ffi-safe) Rust stdlib types, or FFI-safe repr(C) types from
diplomat_runtime, this tracks which of the two were used.
A local type reference, such as the type of a field, parameter, or return value.
Unlike CustomType, which represents a type declaration, TypeNames can compose
types through references and boxing, and can also capture unresolved paths.