⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here
struct PyClassImplsBuilder<'a> {
    cls: &'a Ident,
    attr: &'a PyClassArgs,
    methods_type: PyClassMethodsType,
    default_methods: Vec<TokenStream>,
    default_slots: Vec<TokenStream>,
    doc: Option<PythonDoc>,
}
Expand description

Implements most traits used by #[pyclass].

Specifically, it implements traits that only depend on class name, and attributes of #[pyclass], and docstrings. Therefore it doesn’t implement traits that depends on struct fields and enum variants.

Fields

cls: &'a Identattr: &'a PyClassArgsmethods_type: PyClassMethodsTypedefault_methods: Vec<TokenStream>default_slots: Vec<TokenStream>doc: Option<PythonDoc>

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.