pub struct PyComplexEnumInfo {
pub enum_id: fn() -> TypeId,
pub pyclass_name: &'static str,
pub module: Option<&'static str>,
pub doc: &'static str,
pub variants: &'static [VariantInfo],
}
Expand description
Info of a #[pyclass]
with a rich (structured) Rust enum
Fields§
§enum_id: fn() -> TypeId
§pyclass_name: &'static str
§module: Option<&'static str>
Module name specified by #[pyclass(module = "foo.bar")]
doc: &'static str
Docstring
variants: &'static [VariantInfo]
static members by #[pyo3(get, set)]
Trait Implementations§
Source§impl Debug for PyComplexEnumInfo
impl Debug for PyComplexEnumInfo
Source§impl From<&PyComplexEnumInfo> for ClassDef
impl From<&PyComplexEnumInfo> for ClassDef
Source§fn from(info: &PyComplexEnumInfo) -> Self
fn from(info: &PyComplexEnumInfo) -> Self
Converts to this type from the input type.
impl Collect for PyComplexEnumInfo
Auto Trait Implementations§
impl Freeze for PyComplexEnumInfo
impl RefUnwindSafe for PyComplexEnumInfo
impl Send for PyComplexEnumInfo
impl Sync for PyComplexEnumInfo
impl Unpin for PyComplexEnumInfo
impl UnwindSafe for PyComplexEnumInfo
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more