Skip to main content

try_extract_from_py

Function try_extract_from_py 

Source
pub fn try_extract_from_py(
    type_name: &str,
    obj: &Bound<'_, PyAny>,
) -> Option<Arc<dyn CustomDataTrait>>
Expand description

Tries to extract Arc<dyn CustomDataTrait> from a Python object using the registered extractor. Returns None if no extractor is registered or extraction fails.