BuildSet
This trait defines the interface for constructing and managing a set-like collection of Python objects. It provides methods for adding items to the set and retrieving the current count of elements within the collection.
Methods
build_add()
def build_add(
item: Py< PyAny >
) - > PyResult< () >
Adds a Python object to the build set collection.
Parameters
| Name | Type | Description |
|---|---|---|
| item | Py< PyAny > | The Python object to be inserted into the set |
Returns
| Type | Description |
|---|---|
PyResult< () > | A result indicating success or a Python exception if the addition fails |
build_len()
def build_len() - > usize
Returns the total number of items currently contained within the build set.
Returns
| Type | Description |
|---|---|
usize | The count of elements in the set |