Trait Middleware

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

Source

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

The name of this middleware.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Element: Clone + 'static, Window: Clone + 'static> PartialEq<&Box<dyn Middleware<Element, Window>>> for Box<dyn Middleware<Element, Window>>

Source§

fn eq(&self, other: &&Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Element: Clone + 'static, Window: Clone + 'static> PartialEq for dyn Middleware<Element, Window>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementations on Foreign Types§

Source§

impl<Element: Clone + 'static, Window: Clone + 'static, Factory: MiddlewareFactory<Element, Window>> Middleware<Element, Window> for Instance<Factory, (Element, Window)>

Source§

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

Source§

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

Implementors§

Source§

impl<Element: Clone + PartialEq + 'static, Window: Clone + PartialEq + 'static> Middleware<Element, Window> for Inline<'static, Element, Window>

Source§

impl<Element: Clone + PartialEq + 'static, Window: Clone + PartialEq + 'static> Middleware<Element, Window> for Shift<'static, Element, Window>

Source§

impl<Element: Clone + PartialEq, Window: Clone + PartialEq> Middleware<Element, Window> for Arrow<'static, Element, Window>

Source§

impl<Element: Clone + PartialEq, Window: Clone + PartialEq> Middleware<Element, Window> for AutoPlacement<'static, Element, Window>

Source§

impl<Element: Clone + PartialEq, Window: Clone + PartialEq> Middleware<Element, Window> for Flip<'static, Element, Window>

Source§

impl<Element: Clone + PartialEq, Window: Clone + PartialEq> Middleware<Element, Window> for Hide<'static, Element, Window>

Source§

impl<Element: Clone + PartialEq, Window: Clone + PartialEq> Middleware<Element, Window> for Offset<'static, Element, Window>

Source§

impl<Element: Clone + PartialEq, Window: Clone + PartialEq> Middleware<Element, Window> for Size<'static, Element, Window>