pub trait PluginRecordingPort: Send + Sync {
// Required methods
fn start_recording<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn record_element_click<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
element_info: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn finalize_recording<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
template_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractionTemplate>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn cancel_recording<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Optional: Recording port for capturing user interactions and generating templates
Implementations handle recording DOM interactions, building selectors, and inferring templates.
Not required for basic extraction; useful for the interactive recording mode.
Required Methods§
Sourcefn start_recording<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_recording<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start recording user interactions
Sourcefn record_element_click<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
element_info: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_element_click<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
element_info: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record an element selection
Sourcefn finalize_recording<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
template_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractionTemplate>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn finalize_recording<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
template_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractionTemplate>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Finalize recording and generate a template