Struct pyo3::PyList [] [src]

pub struct PyList(_);

Represents a Python list.

Methods

impl PyList
[src]

[src]

Construct a new list with the given elements.

[src]

Construct a new empty list.

[src]

Gets the length of the list.

[src]

Check if list is empty.

[src]

Gets the item at the specified index.

Panics if the index is out of range.

[src]

Gets the item at the specified index.

Panics if the index is out of range.

[src]

Sets the item at the specified index.

Panics if the index is out of range.

[src]

Appends an item at the list.

[src]

Inserts an item at the specified index.

Panics if the index is out of range.

[src]

Returns an iterator over the tuple items.

Trait Implementations

impl<'a> From<&'a PyList> for &'a PyObjectRef
[src]

[src]

Performs the conversion.

impl AsRef<PyObjectRef> for PyList
[src]

[src]

Performs the conversion.

impl PyObjectWithToken for PyList
[src]

[src]

impl ToPyPointer for PyList
[src]

[src]

Gets the underlying FFI pointer, returns a borrowed pointer.

impl PartialEq for PyList
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PyTypeInfo for PyList
[src]

Type of objects to store in PyObject struct

Base class

NAME: &'static str = "PyList"

Class name

SIZE: usize = ::std::mem::size_of::<::ffi::PyObject>()

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

OFFSET: isize = 0

Type instance offset inside PyObject structure

[src]

PyTypeObject instance for this type

[src]

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

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

Class doc string

FLAGS: usize = 0

Type flags (ie PY_TYPE_FLAG_GC, PY_TYPE_FLAG_WEAKREF)

[src]

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

impl PyTypeObject for PyList
[src]

[src]

Initialize type object

[src]

Retrieves the type object for this Python object type.

[src]

Create PyRawObject which can be initialized with rust value

impl ToPyObject for PyList
[src]

[src]

Converts self into a Python object.

impl ToBorrowedObject for PyList
[src]

[src]

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

impl Debug for PyList
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for PyList
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> FromPyObject<'a> for &'a PyList
[src]

[src]

Extracts Self from the source PyObject.

impl<'a> IntoIterator for &'a PyList
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

Auto Trait Implementations

impl Send for PyList

impl Sync for PyList