Expand description
This module contains unit structs that should be used inside quote!
and spanned_quote!
using the variable interpolation syntax in place of their equivalent structs and traits
present in std
.
To create hygienic proc macros, all the names must be its fully qualified form. These unit structs help us to not specify the fully qualified name every single time.
§Example
Instead of writing this:
quote!(
fn get_id() -> Option<i32> {
Some(0)
}
);
Or this:
quote!(
fn get_id() -> ::core::option::Option<i32> {
::core::option::Option::Some(0)
}
);
We should write this:
use bevy_macro_utils::fq_std::FQOption;
quote!(
fn get_id() -> #FQOption<i32> {
#FQOption::Some(0)
}
);
Structs§
- Fully Qualified (FQ) short name for
core::any::Any
- Fully Qualified (FQ) short name for
Box
- Fully Qualified (FQ) short name for
Clone
- Fully Qualified (FQ) short name for
Default
- Fully Qualified (FQ) short name for
Option
- Fully Qualified (FQ) short name for
Result
- Fully Qualified (FQ) short name for
Send
- Fully Qualified (FQ) short name for
Sync