[go: up one dir, main page]

Module diplomat_core::ast[][src]

Expand description

The Diplomat core module contains common logic between the macro expansion and code generation. Right now, this is primarily the AST types that Diplomat generates while extracting APIs.

Structs

A fieldless enum declaration in an FFI module.

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 struct annotated with [diplomat::opaque] whose fields are not visible. Opaque structs cannot be passed by-value across the FFI boundary, so they must be boxed or passed as references.

A parameter taken by a Method, including self.

A struct declaration in an FFI module that is not opaque.

Enums

A type declared inside a Diplomat-annotated module.

A symbol declared in a module, which can either be a pointer to another path, or a custom type defined directly inside that module

A built-in Rust primitive scalar type.

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.