pub struct ClassDef {
    pub name: &'static str,
    pub doc: &'static str,
    pub attrs: Vec<MemberDef>,
    pub getter_setters: IndexMap<String, (Option<MemberDef>, Option<MemberDef>)>,
    pub methods: IndexMap<String, Vec<MethodDef>>,
    pub bases: Vec<TypeInfo>,
    pub classes: Vec<ClassDef>,
    pub match_args: Option<Vec<String>>,
    pub subclass: bool,
}Expand description
Definition of a Python class.
Fields§
§name: &'static str§doc: &'static str§attrs: Vec<MemberDef>§getter_setters: IndexMap<String, (Option<MemberDef>, Option<MemberDef>)>§methods: IndexMap<String, Vec<MethodDef>>§bases: Vec<TypeInfo>§classes: Vec<ClassDef>§match_args: Option<Vec<String>>§subclass: boolImplementations§
Source§impl ClassDef
 
impl ClassDef
fn from_variant(enum_info: &PyComplexEnumInfo, info: &VariantInfo) -> Self
Source§impl ClassDef
 
impl ClassDef
fn add_eq_method(&mut self)
fn add_ord_methods(&mut self)
fn add_hash_method(&mut self)
fn add_str_method(&mut self)
Trait Implementations§
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.
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 StructuralPartialEq for ClassDef
Auto Trait Implementations§
impl Freeze for ClassDef
impl RefUnwindSafe for ClassDef
impl Send for ClassDef
impl Sync for ClassDef
impl Unpin for ClassDef
impl UnwindSafe for ClassDef
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§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