numcodecs_python

Function export_codec_class

Source
pub fn export_codec_class<'py, T: DynCodecType>(
    py: Python<'py>,
    ty: T,
    module: Borrowed<'_, 'py, PyModule>,
) -> Result<Bound<'py, PyCodecClass>, PyErr>
Expand description

Export the DynCodecType ty to Python by generating a fresh PyCodecClass inside module and registering it with the PyCodecRegistry.

ยงErrors

Errors if generating or exporting the fresh PyCodecClass fails.