Skip to main content

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

AttributeTypeDescription
CowCow< 'a, str >Stores a Rust-native string using copy-on-write semantics for efficient memory management of borrowed or owned string data.
PyBound< 'py, PyString >Holds a reference to a Python-managed string object within the current Python interpreter context.