pub struct FloatingOptions {
pub middleware: Vec<Middleware>,
pub offset: OffsetOptions,
pub padding: f64,
pub placement: Placement,
}Expand description
Configuration for the floating position calculation.
Fields§
§middleware: Vec<Middleware>List of Middleware strategies to apply.
offset: OffsetOptionsDistance between the trigger and the floating element in pixels.
padding: f64Distance between the floating element and the scrollable container edges.
placement: PlacementThe preferred Placement strategy.
Implementations§
Source§impl FloatingOptions
impl FloatingOptions
Sourcepub fn can_flip(&self) -> bool
pub fn can_flip(&self) -> bool
Returns true if the Middleware::Flip strategy is enabled.
Sourcepub fn can_shift(&self) -> bool
pub fn can_shift(&self) -> bool
Returns true if the Middleware::Shift strategy is enabled.
Trait Implementations§
Source§impl Clone for FloatingOptions
impl Clone for FloatingOptions
Source§fn clone(&self) -> FloatingOptions
fn clone(&self) -> FloatingOptions
Returns a duplicate 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 Debug for FloatingOptions
impl Debug for FloatingOptions
Source§impl Default for FloatingOptions
impl Default for FloatingOptions
Source§fn default() -> Self
fn default() -> Self
Returns default options: Middleware::Flip and Middleware::Shift enabled, offset: 1.0, padding: 0.0, and Placement::BottomStart.
Auto Trait Implementations§
impl Freeze for FloatingOptions
impl RefUnwindSafe for FloatingOptions
impl Send for FloatingOptions
impl Sync for FloatingOptions
impl Unpin for FloatingOptions
impl UnsafeUnpin for FloatingOptions
impl UnwindSafe for FloatingOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.