Trait floating_ui_core::middleware::Limiter

source ·
pub trait Limiter<Element: Clone + 'static, Window: Clone + 'static>:
    Clone
    + PartialEq
    + Dyn {
    // Required method
    fn compute(&self, state: MiddlewareState<'_, Element, Window>) -> Coords;
}
Expand description

Limiter used by Shift middleware. Limits the shifting done in order to prevent detachment.

Required Methods§

source

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

Trait Implementations§

source§

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

source§

fn clone(&self) -> Self

Returns a copy 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 Limiter<Element, Window>>> for Box<dyn Limiter<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 Limiter<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: LimiterFactory<Element, Window>> Limiter<Element, Window> for Instance<Factory, (Element, Window)>

source§

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

Implementors§

source§

impl<Element: Clone + 'static, Window: Clone + 'static> Limiter<Element, Window> for DefaultLimiter

source§

impl<Element: Clone + PartialEq, Window: Clone + PartialEq> Limiter<Element, Window> for LimitShift<'static, Element, Window>