Module helper

Source
Expand description

Macro helpers.

Modules§

exposed
Exposed namespace of the module.
orphan
Parented namespace of the module.
prelude
Prelude to use essentials: use my_module::prelude::*.
protected
Protected namespace of the module.

Macros§

code_diagnostics_str
Macro for diagnostics purpose to diagnose source code behind it and export it into a string.
code_export_str
Macro to export source code behind a syntax tree into a string.
code_print
Macro for diagnostics purpose to print both syntax tree and source code behind it without syntax tree.
syn_err
Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().
tree_diagnostics_str
Macro for diagnostics purpose to export both syntax tree and source code behind it into a string.
tree_print
Macro for diagnostics purpose to print both syntax tree and source code behind it with syntax tree.

Functions§

attr_pair_single
For attribute like #[former( default = 31 )] return key default and value 31, as well as syn::Meta as the last element of result tuple.
type_parameters
Return the specified number of parameters of the type.
type_rightmost
Check is the rightmost item of path refering a type is specified type.

Type Aliases§

Result
Result with syn::Error.