Skip to main content

SessionEngine

Trait SessionEngine 

Source
pub trait SessionEngine<F>: Send + Sync {
    // Required methods
    fn engine_id(&self) -> &str;
    fn spawn(
        &self,
        request: &SessionSpawnRequest,
    ) -> Result<Box<dyn DocumentSession<F>>, SessionError>;

    // Provided methods
    fn spawn_request(
        &self,
        _spawn: &SessionSpawnRequest,
        _request: &SessionDocumentRequest,
    ) -> Result<SessionRequestSpawnResult<F>, SessionError> { ... }
    fn a11y_capability(&self) -> A11yCapability { ... }
}

Required Methods§

Source

fn engine_id(&self) -> &str

Stable engine identifier. Must match the engine_id of the EngineRouteDecision that selected this engine.

Source

fn spawn( &self, request: &SessionSpawnRequest, ) -> Result<Box<dyn DocumentSession<F>>, SessionError>

Provided Methods§

Source

fn spawn_request( &self, _spawn: &SessionSpawnRequest, _request: &SessionDocumentRequest, ) -> Result<SessionRequestSpawnResult<F>, SessionError>

Optional exact-request construction through this selected factory.

Source

fn a11y_capability(&self) -> A11yCapability

Sessions lay real content out through a real layout engine, so unlike surface engines they default to A11yCapability::Partial; a lane with a full semantic tree overrides to Full.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§