pub trait Middleware<Element: Clone + 'static, Window: Clone + 'static>:
Clone
+ PartialEq
+ Dyn {
// Required methods
fn name(&self) -> &'static str;
fn compute(
&self,
state: MiddlewareState<'_, Element, Window>,
) -> MiddlewareReturn;
}Expand description
Middleware used by compute_position.
Required Methods§
Sourcefn compute(
&self,
state: MiddlewareState<'_, Element, Window>,
) -> MiddlewareReturn
fn compute( &self, state: MiddlewareState<'_, Element, Window>, ) -> MiddlewareReturn
Executes this middleware.
Trait Implementations§
Source§impl<Element: Clone + 'static, Window: Clone + 'static> Clone for Box<dyn Middleware<Element, Window>>
impl<Element: Clone + 'static, Window: Clone + 'static> Clone for Box<dyn Middleware<Element, Window>>
Source§impl<Element: Clone + 'static, Window: Clone + 'static> PartialEq for dyn Middleware<Element, Window>
impl<Element: Clone + 'static, Window: Clone + 'static> PartialEq for dyn Middleware<Element, Window>
Source§impl<Element: Clone + 'static, Window: Clone + 'static> PartialEq<&Box<dyn Middleware<Element, Window>>> for Box<dyn Middleware<Element, Window>>
impl<Element: Clone + 'static, Window: Clone + 'static> PartialEq<&Box<dyn Middleware<Element, Window>>> for Box<dyn Middleware<Element, Window>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".