Struct rustypy::pytypes::pytuple::PyTuple
[−]
[src]
pub struct PyTuple { pub elem: PyArg, pub idx: usize, pub next: Option<Box<PyTuple>>, }
An analog of a Python tuple, will accept an undefined number of other supported types.
Read the module docs for more information.
Fields
elem: PyArg
idx: usize
next: Option<Box<PyTuple>>
Methods
impl<'a> PyTuple
[src]
unsafe fn from_ptr(ptr: *mut PyTuple) -> PyTuple
Get a PyTuple from a previously boxed raw pointer.
fn len(&self) -> usize
Returns the length of the tuple.
fn as_ptr(self) -> *mut PyTuple
Returns self as raw pointer. Use this method when returning a PyTuple to Python.
Methods from Deref<Target = PyArg>
Trait Implementations
impl Clone for PyTuple
[src]
fn clone(&self) -> PyTuple
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for PyTuple
[src]
impl PartialEq for PyTuple
[src]
fn eq(&self, __arg_0: &PyTuple) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PyTuple) -> bool
This method tests for !=
.
impl<'a> IntoIterator for &'a PyTuple
[src]
type Item = &'a PyArg
The type of the elements being iterated over.
type IntoIter = IntoIter<&'a PyArg>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl Deref for PyTuple
[src]
type Target = PyArg
The resulting type after dereferencing
fn deref(&self) -> &PyArg
The method called to dereference a value