Skip to main content

PluginRecordingPort

Trait PluginRecordingPort 

Source
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§

Source

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

Source

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

Source

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

Source

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,

Cancel an active recording

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§