Skip to main content

MiddlewareFactory

Trait MiddlewareFactory 

Source
pub trait MiddlewareFactory<Element: Clone + 'static, Window: Clone + 'static>:
    Clone
    + PartialEq
    + Sized
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn compute(
        &self,
        state: MiddlewareState<'_, Element, Window>,
    ) -> MiddlewareReturn;
}
Expand description

Middleware used by compute_position.

Required Methods§

Source

fn name(&self) -> &'static str

The name of this middleware.

Source

fn compute( &self, state: MiddlewareState<'_, Element, Window>, ) -> MiddlewareReturn

Executes this middleware.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§