EitherBytes
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| Cow | Cow< 'a, [u8] > | Stores a Rust-native byte slice that can be either borrowed or owned, used for efficient data handling without Python overhead. |
| Py | Bound< 'py, PyBytes > | Stores a reference to a Python bytes object, allowing direct interaction with Python-managed memory within the enum. |
Constructor
Signature
def Cow(
data: Cow< 'a, [u8] >
) - > [EitherBytes](eitherbytes.md?sid=input_return_enums_eitherbytes)
Parameters
| Name | Type | Description |
|---|---|---|
| data | Cow< 'a, [u8] > | The byte data to be wrapped, provided as a clone-on-write byte slice. |
Signature
def Py(
data: Bound< 'py, PyBytes >
) - > [EitherBytes](eitherbytes.md?sid=input_return_enums_eitherbytes)
Parameters
| Name | Type | Description |
|---|---|---|
| data | Bound< 'py, PyBytes > | The Python bytes object to be wrapped, bound to the current Python interpreter session. |