Skip to main content

register_rust_extractor

Function register_rust_extractor 

Source
pub fn register_rust_extractor<T>() -> Result<(), Error>
where T: CustomDataTrait + for<'a, 'py> FromPyObject<'a, 'py> + Send + Sync + 'static,
Expand description

Registers a Rust custom data type for Python extraction. Call once per type at module load (e.g. in the persistence PyO3 module). Uses register_rust_extractor_factory with a factory that builds the extractor for T.

ยงErrors

Returns an error if the type name is already registered.