Skip to main content

ensure_rust_extractor_registered

Function ensure_rust_extractor_registered 

Source
pub fn ensure_rust_extractor_registered<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 if not already registered. If the type is already registered, returns Ok(()) without overwriting (idempotent). Use this where repeated registration can occur (e.g. module load).

ยงErrors

Does not return an error (idempotent insert into DashMap).