pub struct PyClassInfo {
pub struct_id: fn() -> TypeId,
pub pyclass_name: &'static str,
pub module: Option<&'static str>,
pub doc: &'static str,
pub getters: &'static [MemberInfo],
pub setters: &'static [MemberInfo],
pub bases: &'static [fn() -> TypeInfo],
pub has_eq: bool,
pub has_ord: bool,
pub has_hash: bool,
pub has_str: bool,
pub subclass: bool,
}Expand description
Info of #[pyclass] with Rust struct
Fields§
§struct_id: fn() -> TypeId§pyclass_name: &'static str§module: Option<&'static str>Module name specified by #[pyclass(module = "foo.bar")]
doc: &'static strDocstring
getters: &'static [MemberInfo]static members by #[pyo3(get)]
setters: &'static [MemberInfo]static members by #[pyo3(set)]
bases: &'static [fn() -> TypeInfo]Base classes specified by #[pyclass(extends = Type)]
has_eq: boolWhether the class has eq attribute
has_ord: boolWhether the class has ord attribute
has_hash: boolWhether the class has hash attribute
has_str: boolWhether the class has str attribute
subclass: boolWhether the class has subclass attribute #[pyclass(subclass)]
Trait Implementations§
Source§impl Debug for PyClassInfo
impl Debug for PyClassInfo
Source§impl From<&PyClassInfo> for ClassDef
impl From<&PyClassInfo> for ClassDef
Source§fn from(info: &PyClassInfo) -> Self
fn from(info: &PyClassInfo) -> Self
Converts to this type from the input type.
impl Collect for PyClassInfo
Auto Trait Implementations§
impl Freeze for PyClassInfo
impl RefUnwindSafe for PyClassInfo
impl Send for PyClassInfo
impl Sync for PyClassInfo
impl Unpin for PyClassInfo
impl UnwindSafe for PyClassInfo
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