Struct cpython::PyTuple [] [src]

pub struct PyTuple(_);

Represents a Python tuple object.

Methods

impl PyTuple
[src]

[src]

Construct a new tuple with the given elements.

[src]

Retrieves the empty tuple.

[src]

Gets the length of the tuple.

[src]

Gets the item at the specified index.

Panics if the index is out of range.

[src]

[src]

Trait Implementations

impl ToPyObject for PyTuple
[src]

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

[src]

Converts self into a Python object.

[src]

Converts self into a Python object. Read more

[src]

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 PyTuple
[src]

[src]

Extracts Self from the source PyObject.

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

[src]

Extracts Self from the source PyObject.

impl PythonObject for PyTuple
[src]

[src]

Casts the Python object to PyObject.

[src]

Casts the Python object to PyObject.

[src]

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

[src]

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

impl PythonObjectWithCheckedDowncast for PyTuple
[src]

[src]

Cast from PyObject to a concrete Python object type.

[src]

Cast from PyObject to a concrete Python object type.

impl PythonObjectWithTypeObject for PyTuple
[src]

[src]

Retrieves the type object for this Python object type.