Module pyo3_macros_backend::utils
source Β· [−]Macros
Macro inspired by anyhow::bail!
to return a compiler error with the given span.
Macro inspired by anyhow::ensure!
to return a compiler error with the given span if the
specified condition is not met.
Macro inspired by anyhow::anyhow!
to create a compiler error with the given span.
Structs
Functions
Collects all #[doc = ββ¦β] attributes into a TokenStream evaluating to a null-terminated string e.g. concat!(ββ¦β, β\nβ, β\0β)
Extract the path to the pyo3 crate, or use the default (::pyo3
).
Check if the given type ty
is pyo3::Python
.
If ty
is OptionSome(T)
, else None.
Remove lifetime from reference
Replace Self
keyword in type with cls