EitherString
This class represents a string value that can be either a Rust-native Cow string or a reference to a Python-managed PyString. It provides a flexible interface for handling string data across the Rust-Python boundary, allowing for efficient memory management and interoperability between the two environments.
Attributes
| Attribute | Type | Description |
|---|---|---|
| Cow | Cow< 'a, str > | Stores a Rust-native string using copy-on-write semantics for efficient memory management of borrowed or owned string data. |
| Py | Bound< 'py, PyString > | Holds a reference to a Python-managed string object within the current Python interpreter context. |