Wraps a Python object with ``decode``/``encode`` methods into the Rust [`LlmCodec`] trait so it can be stored in the global codec registry. The Python codec object must implement: - ``decode(request: LlmRequest) -> AnnotatedLLMRequest`` - ``encode(annotated: AnnotatedLLMRequest, original: LlmRequest) -> LlmRequest``
| 881 | /// - ``decode(request: LlmRequest) -> AnnotatedLLMRequest`` |
| 882 | /// - ``encode(annotated: AnnotatedLLMRequest, original: LlmRequest) -> LlmRequest`` |
| 883 | pub(crate) struct PyLlmCodecWrapper { |
| 884 | pub py_codec: Py<PyAny>, |
| 885 | } |
| 886 | |
| 887 | // SAFETY: The Py<PyAny> handle is GIL-independent (ref-counted via Python's |
| 888 | // allocator). All access goes through `Python::attach` which acquires the GIL. |
nothing calls this directly
no outgoing calls
no test coverage detected