Trait pyo3::typeob::PyTypeInfo [] [src]

pub trait PyTypeInfo {
    type Type;
    type BaseType: PyTypeInfo;

    const NAME: &'static str;
    const DESCRIPTION: &'static str;
    const SIZE: usize;
    const OFFSET: isize;
    const FLAGS: usize;

    unsafe fn type_object() -> &'static mut PyTypeObject;

    fn is_instance(ptr: *mut PyObject) -> bool { ... }
fn is_exact_instance(ptr: *mut PyObject) -> bool { ... } }

Python type information.

Associated Types

Type of objects to store in PyObject struct

Base class

Associated Constants

Class name

DESCRIPTION: &'static str = "\u{0}"

Class doc string

Size of the rust PyObject structure (PyObject + rust structure)

Type instance offset inside PyObject structure

FLAGS: usize = 0

Type flags (ie PY_TYPE_FLAG_GC, PY_TYPE_FLAG_WEAKREF)

Required Methods

PyTypeObject instance for this type

Provided Methods

Check if *mut ffi::PyObject is instance of this type

Check if *mut ffi::PyObject is exact instance of this type

Implementations on Foreign Types

impl<'a, T: ?Sized> PyTypeInfo for &'a T where
    T: PyTypeInfo
[src]

[src]

[src]

[src]

Implementors