Macrosยง
- bail_
spanned ๐ - Macro inspired by
anyhow::bail!to return a compiler error with the given span. - ensure_
spanned ๐ - Macro inspired by
anyhow::ensure!to return a compiler error with the given span if the specified condition is not met. - err_
spanned ๐ - Macro inspired by
anyhow::anyhow!to create a compiler error with the given span.
Structsยง
- Ctx
- Python
Doc - A syntax tree which evaluates to a string for Python.
- Static
Ident - Helper struct for hard-coded identifiers used in the macro code.
Enumsยง
- Ident
OrStr ๐ - PyO3
Crate Path - StrOr
Expr - A plain string or an expression
Functionsยง
- apply_
renaming_ rule - expr_
to_ python - get_doc
- Collects all #[doc = โโฆโ] attributes into a TokenStream evaluating to a string.
- has_
attribute ๐ - has_
attribute_ ๐with_ namespace - is_
python - Check if the given type
tyispyo3::Python. - locate_
tokens_ ๐at - Adjusts a tokes stream so that the location for the stream comes from
Span. - option_
type_ argument - If
tyisOption<T>, returnSome(T), elseNone. - unwrap_
ty_ group