Struct pyo3_stub_gen::type_info::PyEnumInfo
source · pub struct PyEnumInfo {
pub enum_id: fn() -> TypeId,
pub pyclass_name: &'static str,
pub module: Option<&'static str>,
pub doc: &'static str,
pub variants: &'static [&'static str],
}
Expand description
Info of #[pyclass]
with 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 [&'static str]
Variants of enum
Trait Implementations§
source§impl Debug for PyEnumInfo
impl Debug for PyEnumInfo
source§impl From<&PyEnumInfo> for EnumDef
impl From<&PyEnumInfo> for EnumDef
source§fn from(info: &PyEnumInfo) -> Self
fn from(info: &PyEnumInfo) -> Self
Converts to this type from the input type.
impl Collect for PyEnumInfo
Auto Trait Implementations§
impl Freeze for PyEnumInfo
impl RefUnwindSafe for PyEnumInfo
impl Send for PyEnumInfo
impl Sync for PyEnumInfo
impl Unpin for PyEnumInfo
impl UnwindSafe for PyEnumInfo
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