Expand description
A collection of helper types and functions for working on macros within the Bevy ecosystem.
Modules§
- fq_std
- This module contains unit structs that should be used inside
quote!andspanned_quote!using the variable interpolation syntax in place of their equivalent structs and traits present instd.
Structs§
- Bevy
Manifest - The path to the
Cargo.tomlfile for the Bevy project. - Result
Sifter - Helper struct used to process an iterator of
Result<Vec<T>, syn::Error>, combining errors into one along the way. - Symbol
- A single named value, representable as a string.
Enums§
- Path
Type - The type of a
Path, using standard Rust naming conventions to infer the type. Note that this only works for paths that actually follow the naming conventions, and there are inherent ambiguities, such asSomeeither referring to a type or an enum variant.
Functions§
- as_
member - Converts an optional identifier or index into a
syn::Membervariant. - derive_
label - Derive a label trait
- ensure_
no_ collision - Finds an identifier that will not conflict with the specified set of tokens.
- get_
lit_ bool - Get a literal boolean from the provided expression as a
bool. - get_
lit_ str - Get a literal string from the provided expression.
- get_
struct_ fields - Get the fields of a data structure if that structure is a struct; otherwise, return a compile error that points to the site of the macro invocation.
- pascal_
to_ snake_ case - Convert a string from
PascalCasetosnake_case. - path_
to_ string - This formats the given
pathin standard Rust format. - require_
named - Return an error if
Fieldsis notFields::Named - terminated_
parser - Returns a
syn::parse::Parserwhich parses a stream of zero or more occurrences ofTseparated by punctuation of typeP, with optional trailing punctuation.