Middleware

Trait Middleware 

Source
pub trait Middleware<Element, Window>:
    Clone
    + PartialEq
    + Dyn
where Element: Clone + 'static, Window: Clone + '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.

Trait Implementations§

Source§

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

Source§

fn clone(&self) -> Box<dyn Middleware<Element, Window>>

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, Window> PartialEq<&Box<dyn Middleware<Element, Window>>> for Box<dyn Middleware<Element, Window>>
where Element: Clone + 'static, Window: Clone + 'static,

Source§

fn eq(&self, other: &&Box<dyn Middleware<Element, Window>>) -> 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, Window> PartialEq for dyn Middleware<Element, Window>
where Element: Clone + 'static, Window: Clone + 'static,

Source§

fn eq(&self, other: &(dyn Middleware<Element, Window> + 'static)) -> 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, Window, Factory> Middleware<Element, Window> for Instance<Factory, (Element, Window)>
where Element: Clone + 'static, Window: Clone + 'static, Factory: MiddlewareFactory<Element, Window>,

Source§

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

Source§

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

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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