# pyo3::pyclass_init::PyObjectInit - Rust
Initializer for Python types.
Keywords: rust, rustlang, rust-lang, PyObjectInit

# Trait pyo3::pyclass_init::PyObjectInit [−] [src]

    pub trait PyObjectInit<T: PyTypeInfo>: Sized {
        fn init_class<L: PyLayout<T>>(self, layout: &mut L);
        fn __private__(&self) -> PrivateMarker;
    }

Initializer for Python types.

This trait is intended to use internally for distinguishing `#[pyclass]` and Python native types.

## Required methods

### `fn init_class<L: PyLayout<T>>(self, layout: &mut L)` [src]

### `fn __private__(&self) -> PrivateMarker` [src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate.

Loading content...

## Implementors

### `impl<T: PyClass> PyObjectInit<T> for PyClassInitializer<T>` [src]

#### `fn init_class<L: PyLayout<T>>(self, layout: &mut L)` [src]

### `impl<T: PyTypeInfo> PyObjectInit<T> for PyNativeTypeInitializer<T>` [src]

#### `fn init_class<L: PyLayout<T>>(self, _layout: &mut L)` [src]

Loading content...