PageSessionManager

Trait PageSessionManager 

Source
pub trait PageSessionManager {
    // Required methods
    fn export_session<'life0, 'async_trait>(
        self: &'life0 Arc<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<PageSession>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn import_session<'life0, 'life1, 'async_trait>(
        self: &'life0 Arc<Self>,
        session: &'life1 PageSession,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn export_session_to_file<'life0, 'life1, 'async_trait>(
        self: &'life0 Arc<Self>,
        path: &'life1 Path,
    ) -> Pin<Box<dyn Future<Output = Result<PageSession>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn import_session_from_file<'life0, 'life1, 'async_trait>(
        self: &'life0 Arc<Self>,
        path: &'life1 Path,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Session management trait for Page

Required Methods§

Source

fn export_session<'life0, 'async_trait>( self: &'life0 Arc<Self>, ) -> Pin<Box<dyn Future<Output = Result<PageSession>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Export complete page session (cookies + storage)

Source

fn import_session<'life0, 'life1, 'async_trait>( self: &'life0 Arc<Self>, session: &'life1 PageSession, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Import complete page session (cookies + storage) Note: This will navigate to the session URL first

Source

fn export_session_to_file<'life0, 'life1, 'async_trait>( self: &'life0 Arc<Self>, path: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<PageSession>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Export session and save to file

Source

fn import_session_from_file<'life0, 'life1, 'async_trait>( self: &'life0 Arc<Self>, path: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load session from file and import

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§