pub struct Offset {
pub main_axis: Px,
pub cross_axis: Px,
pub alignment_axis: Option<Px>,
}Expand description
Offset configuration inspired by Floating UI’s offset() middleware.
Fields§
§main_axis: PxDistance along the placement side axis (the “gap” between anchor and panel).
cross_axis: PxDistance along the alignment axis (skidding).
alignment_axis: Option<Px>Optional skidding override for aligned placements (Start/End).
When present and align != Center, this overrides cross_axis and flips sign for End.
For vertical placements (Top/Bottom), the direction is also flipped under RTL.
Trait Implementations§
impl Copy for Offset
impl StructuralPartialEq for Offset
Auto Trait Implementations§
impl Freeze for Offset
impl RefUnwindSafe for Offset
impl Send for Offset
impl Sync for Offset
impl Unpin for Offset
impl UnsafeUnpin for Offset
impl UnwindSafe for Offset
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