Struct cpython::PyTuple [−][src]
pub struct PyTuple(_);
Expand description
Represents a Python tuple object.
Implementations
Construct a new tuple with the given elements.
Gets the item at the specified index.
Panics if the index is out of range.
Trait Implementations
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.
Casts the Python object to PyObject.
fn downcast_from<'p>(
py: Python<'p>,
obj: PyObject
) -> Result<PyTuple, PythonObjectDowncastError<'p>>
fn downcast_from<'p>(
py: Python<'p>,
obj: PyObject
) -> Result<PyTuple, PythonObjectDowncastError<'p>>
Cast from PyObject to a concrete Python object type.
fn downcast_borrow_from<'a, 'p>(
py: Python<'p>,
obj: &'a PyObject
) -> Result<&'a PyTuple, PythonObjectDowncastError<'p>>
fn downcast_borrow_from<'a, 'p>(
py: Python<'p>,
obj: &'a PyObject
) -> Result<&'a PyTuple, PythonObjectDowncastError<'p>>
Cast from PyObject to a concrete Python object type.
Retrieves the type object for this Python object type.
Identity conversion: allows using existing PyObject
instances where
T: ToPyObject
is expected.
type ObjectType = PyTuple
Converts self into a Python object.
Converts self into a Python object. Read more