Skip to main content

VirtualElement

Trait VirtualElement 

Source
pub trait VirtualElement<Element: 'static>:
    Clone
    + PartialEq
    + Dyn {
    // Required methods
    fn get_bounding_client_rect(&self) -> ClientRectObject;
    fn get_client_rects(&self) -> Option<Vec<ClientRectObject>>;
    fn context_element(&self) -> Option<Element>;
}
Expand description

Custom positioning reference element.

See the Rust Floating UI book for more documentation.

Required Methods§

Trait Implementations§

Source§

impl<Element: 'static> Clone for Box<dyn VirtualElement<Element>>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<Element: 'static> PartialEq for dyn VirtualElement<Element>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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: 'static> PartialEq<&Box<dyn VirtualElement<Element>>> for Box<dyn VirtualElement<Element>>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<Element: 'static, Factory: VirtualElementFactory<Element>> VirtualElement<Element> for Instance<Factory, (Element,)>

Implementors§

Source§

impl<Element: Clone + PartialEq + 'static> VirtualElement<Element> for DefaultVirtualElement<Element>