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, &'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 strDocstring
variants: &'static [(&'static str, &'static str)]Variants of enum (name, doc)
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