pub trait PyAttributeExtractor {
// Required methods
fn extract_attr_with_context(
&self,
attr: &str,
context: &str,
) -> PyResult<Bound<'_, PyAny>>;
fn extract_type_name(&self, context: &str) -> PyResult<String>;
}
Expand description
Trait for extracting Python attributes with consistent error handling.
Required Methods§
Sourcefn extract_attr_with_context(
&self,
attr: &str,
context: &str,
) -> PyResult<Bound<'_, PyAny>>
fn extract_attr_with_context( &self, attr: &str, context: &str, ) -> PyResult<Bound<'_, PyAny>>
Extract an attribute with context-aware error messages.
Sourcefn extract_type_name(&self, context: &str) -> PyResult<String>
fn extract_type_name(&self, context: &str) -> PyResult<String>
Extract a type name with error handling.