Struct cpython::PyInt [] [src]

pub struct PyInt(_);

In Python 2.x, represents a Python long object. In Python 3.x, represents a Python int object. Both PyInt and PyLong refer to the same type on Python 3.x.

You can usually avoid directly working with this type by using ToPyObject and extract with the primitive Rust integer types.

Trait Implementations

impl ToPyObject for PyLong
[src]

Identity conversion: allows using existing PyObject instances where T: ToPyObject is expected.

Converts self into a Python object.

Converts self into a Python object. Read more

Converts self into a Python object and calls the specified closure on the native FFI pointer underlying the Python object. Read more

impl<'source> FromPyObject<'source> for PyLong
[src]

Extracts Self from the source PyObject.

impl<'source> FromPyObject<'source> for &'source PyLong
[src]

Extracts Self from the source PyObject.

impl PythonObject for PyLong
[src]

Casts the Python object to PyObject.

Casts the Python object to PyObject.

Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.

Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.

impl PythonObjectWithCheckedDowncast for PyLong
[src]

Cast from PyObject to a concrete Python object type.

Cast from PyObject to a concrete Python object type.

impl PythonObjectWithTypeObject for PyLong
[src]

Retrieves the type object for this Python object type.