Struct pyo3::PySet[][src]

pub struct PySet(_);

Represents a Python set

Methods

impl PySet
[src]

Creates a new set.

May panic when running out of memory.

Remove all elements from the set.

Return the number of items in the set. This is equivalent to len(p) on a set.

Check if set is empty.

Determine if the set contains the specified key. This is equivalent to the Python expression key in self.

Remove element from the set if it is present.

Add element to the set.

Remove and return an arbitrary element from the set

Trait Implementations

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

Performs the conversion.

impl AsRef<PyObjectRef> for PySet
[src]

Performs the conversion.

impl PyObjectWithToken for PySet
[src]

impl ToPyPointer for PySet
[src]

Gets the underlying FFI pointer, returns a borrowed pointer.

impl PartialEq for PySet
[src]

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

This method tests for !=.

impl PyTypeInfo for PySet
[src]

Type of objects to store in PyObject struct

Base class

NAME: &'static str = "PySet"

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

PyTypeObject instance for this type

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)

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

impl PyTypeObject for PySet
[src]

Initialize type object

Retrieves the type object for this Python object type.

Create PyRawObject which can be initialized with rust value

impl ToPyObject for PySet
[src]

Converts self into a Python object.

impl ToBorrowedObject for PySet
[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 PySet
[src]

Formats the value using the given formatter. Read more

impl Display for PySet
[src]

Formats the value using the given formatter. Read more

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

Extracts Self from the source PyObject.

Auto Trait Implementations

impl Send for PySet

impl Sync for PySet