Enum pyo3_stub_gen_derive::gen_stub::attr::Attr
source · pub enum Attr {
Name(String),
Get,
GetAll,
Module(String),
Signature(Signature),
New,
Getter(Option<String>),
StaticMethod,
ClassMethod,
}
Expand description
#[pyo3(...)]
style attributes appear in #[pyclass]
and #[pymethods]
proc-macros
As the reference of PyO3 says:
https://docs.rs/pyo3/latest/pyo3/attr.pyclass.html
All of these parameters can either be passed directly on the
#[pyclass(...)]
annotation, or as one or more accompanying#[pyo3(...)]
annotations,
#[pyclass(name = "MyClass", module = "MyModule")]
will be decomposed into
#[pyclass]
+ #[pyo3(name = "MyClass")]
+ #[pyo3(module = "MyModule")]
,
i.e. two Attr
s will be created for this case.
Variants§
Name(String)
Get
GetAll
Module(String)
Signature(Signature)
New
Getter(Option<String>)
StaticMethod
ClassMethod
Trait Implementations§
source§impl PartialEq for Attr
impl PartialEq for Attr
impl StructuralPartialEq for Attr
Auto Trait Implementations§
impl Freeze for Attr
impl RefUnwindSafe for Attr
impl !Send for Attr
impl !Sync for Attr
impl Unpin for Attr
impl UnwindSafe for Attr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)