Struct floating_ui_dom::ComputePositionConfig
source · pub struct ComputePositionConfig {
pub placement: Option<Placement>,
pub strategy: Option<Strategy>,
pub middleware: Option<MiddlewareVec>,
}
Expand description
Options for compute_position
.
Fields§
§placement: Option<Placement>
Where to place the floating element relative to the reference element.
Defaults to Placement::Bottom
.
strategy: Option<Strategy>
The strategy to use when positioning the floating element.
Defaults to Strategy::Absolute
.
middleware: Option<MiddlewareVec>
Vector of middleware objects to modify the positioning or provide data for rendering.
Defaults to an empty vector.
Implementations§
source§impl ComputePositionConfig
impl ComputePositionConfig
sourcepub fn middleware(self, value: MiddlewareVec) -> Self
pub fn middleware(self, value: MiddlewareVec) -> Self
Set middleware
option.
Trait Implementations§
source§impl Clone for ComputePositionConfig
impl Clone for ComputePositionConfig
source§fn clone(&self) -> ComputePositionConfig
fn clone(&self) -> ComputePositionConfig
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 Default for ComputePositionConfig
impl Default for ComputePositionConfig
source§fn default() -> ComputePositionConfig
fn default() -> ComputePositionConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ComputePositionConfig
impl !RefUnwindSafe for ComputePositionConfig
impl !Send for ComputePositionConfig
impl !Sync for ComputePositionConfig
impl Unpin for ComputePositionConfig
impl !UnwindSafe for ComputePositionConfig
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