Module utils

Source

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
LitCStr
PythonDoc
A syntax tree which evaluates to a nul-terminated docstring for Python.

Enumsยง

IdentOrStr ๐Ÿ”’
PyO3CratePath
PythonDocKind ๐Ÿ”’

Functionsยง

apply_renaming_rule
deprecated_from_py_with ๐Ÿ”’
get_doc
Collects all #[doc = โ€œโ€ฆโ€] attributes into a TokenStream evaluating to a null-terminated string.
has_attribute ๐Ÿ”’
has_attribute_with_namespace ๐Ÿ”’
is_python
Check if the given type ty is pyo3::Python.
option_type_argument
If ty is Option<T>, return Some(T), else None.
unwrap_ty_group
โš ๏ธ Internal Docs โš ๏ธ Not Public API ๐Ÿ‘‰ Official Docs Here