Struct floating_ui_dom::ShiftOptions
source · pub struct ShiftOptions<Element, Window>{
pub detect_overflow: Option<DetectOverflowOptions<Element>>,
pub main_axis: Option<bool>,
pub cross_axis: Option<bool>,
pub limiter: Option<Box<dyn Limiter<Element, Window>>>,
}
Expand description
Options for Shift
middleware.
Fields§
§detect_overflow: Option<DetectOverflowOptions<Element>>
Options for detect_overflow
.
Defaults to DetectOverflowOptions::default
.
main_axis: Option<bool>
The axis that runs along the alignment of the floating element. Determines whether overflow along this axis is checked to perform shifting.
Defaults to true
.
cross_axis: Option<bool>
The axis that runs along the side of the floating element. Determines whether overflow along this axis is checked to perform shifting.
Defaults to false
.
limiter: Option<Box<dyn Limiter<Element, Window>>>
Accepts a limiter that limits the shifting done in order to prevent detachment.
Defaults to DefaultLimiter
.
Implementations§
source§impl<Element, Window> ShiftOptions<Element, Window>
impl<Element, Window> ShiftOptions<Element, Window>
sourcepub fn detect_overflow(
self,
value: DetectOverflowOptions<Element>
) -> ShiftOptions<Element, Window>
pub fn detect_overflow( self, value: DetectOverflowOptions<Element> ) -> ShiftOptions<Element, Window>
Set detect_overflow
option.
sourcepub fn main_axis(self, value: bool) -> ShiftOptions<Element, Window>
pub fn main_axis(self, value: bool) -> ShiftOptions<Element, Window>
Set main_axis
option.
sourcepub fn cross_axis(self, value: bool) -> ShiftOptions<Element, Window>
pub fn cross_axis(self, value: bool) -> ShiftOptions<Element, Window>
Set cross_axis
option.
sourcepub fn limiter(
self,
value: Box<dyn Limiter<Element, Window>>
) -> ShiftOptions<Element, Window>
pub fn limiter( self, value: Box<dyn Limiter<Element, Window>> ) -> ShiftOptions<Element, Window>
Set limiter
option.
Trait Implementations§
source§impl<Element, Window> Clone for ShiftOptions<Element, Window>
impl<Element, Window> Clone for ShiftOptions<Element, Window>
source§fn clone(&self) -> ShiftOptions<Element, Window>
fn clone(&self) -> ShiftOptions<Element, Window>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Element, Window> Default for ShiftOptions<Element, Window>
impl<Element, Window> Default for ShiftOptions<Element, Window>
source§fn default() -> ShiftOptions<Element, Window>
fn default() -> ShiftOptions<Element, Window>
Returns the “default value” for a type. Read more
source§impl<'a, Element, Window> MiddlewareWithOptions<Element, Window, ShiftOptions<Element, Window>> for Shift<'a, Element, Window>
impl<'a, Element, Window> MiddlewareWithOptions<Element, Window, ShiftOptions<Element, Window>> for Shift<'a, Element, Window>
source§fn options(
&self
) -> &Derivable<'_, Element, Window, ShiftOptions<Element, Window>>
fn options( &self ) -> &Derivable<'_, Element, Window, ShiftOptions<Element, Window>>
The options passed to this middleware.
Auto Trait Implementations§
impl<Element, Window> Freeze for ShiftOptions<Element, Window>where
Element: Freeze,
impl<Element, Window> !RefUnwindSafe for ShiftOptions<Element, Window>
impl<Element, Window> !Send for ShiftOptions<Element, Window>
impl<Element, Window> !Sync for ShiftOptions<Element, Window>
impl<Element, Window> Unpin for ShiftOptions<Element, Window>where
Element: Unpin,
impl<Element, Window> !UnwindSafe for ShiftOptions<Element, Window>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more