Module attrs

Source
Expand description

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

Structsยง

Attrs
The list of attributes on a type. All attributes except attrs (HIR attrs) are potentially read by the diplomat macro and the AST backends, anything that is not should be added as an HIR attribute ([crate::hir::Attrs]).
DiplomatBackendAttr
A #[diplomat::attr(...)] attribute
RenameAttr
A pattern for use in rename attributes, like #[diplomat::abi_rename]
RenamePattern ๐Ÿ”’

Enumsยง

Attr ๐Ÿ”’
AttrInheritContext ๐Ÿ”’
DiplomatBackendAttrCfg
StandardAttribute ๐Ÿ”’
Helper type for parsing standard attributes. A standard attribute typically will accept the forms:

Functionsยง

serialize_meta ๐Ÿ”’
syn_attr_to_ast_attr ๐Ÿ”’