diplomat_core

Module ast

source

Re-exportsยง

Modulesยง

  • 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
  • docs ๐Ÿ”’
  • enums ๐Ÿ”’
  • idents ๐Ÿ”’
  • lifetimes ๐Ÿ”’
  • methods ๐Ÿ”’
  • modules ๐Ÿ”’
  • paths ๐Ÿ”’
  • structs ๐Ÿ”’
  • types ๐Ÿ”’

Structsยง

  • Parameters in a method that might be borrowed in the return type.
  • A fieldless enum declaration in an FFI module.
  • An identifier, analogous to syn::Ident and proc_macro2::Ident.
  • A lifetime dependency graph used for tracking which lifetimes outlive, and are outlived by, other lifetimes.
  • Collect all lifetimes that are either longer_or_shorter
  • 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 named lifetime, e.g. 'a.
  • 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, not including self.
  • A named type that is just a path, e.g. std::borrow::Cow<'a, T>.
  • The self parameter taken by a Method.
  • A struct declaration in an FFI module that is not opaque.

Enumsยง