pub enum ScrollAlignment {
Start,
Center,
End,
Auto,
}Expand description
Alignment behavior when programmatically scrolling to an item.
Controls where the target item is positioned within the viewport after a scroll-to-index operation. This mirrors the alignment options found in TanStack Virtual.
Variants§
Start
Position the item at the start of the viewport.
Center
Position the item at the center of the viewport.
End
Position the item at the end of the viewport.
Auto
Automatically determine the minimal scroll to make the item visible.
If the item is already fully visible, no scroll occurs. Otherwise, the viewport scrolls the minimum amount needed to bring the item into view.
Trait Implementations§
Source§impl Clone for ScrollAlignment
impl Clone for ScrollAlignment
Source§fn clone(&self) -> ScrollAlignment
fn clone(&self) -> ScrollAlignment
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 ScrollAlignment
impl Debug for ScrollAlignment
Source§impl Default for ScrollAlignment
impl Default for ScrollAlignment
Source§impl PartialEq for ScrollAlignment
impl PartialEq for ScrollAlignment
impl Copy for ScrollAlignment
impl Eq for ScrollAlignment
impl StructuralPartialEq for ScrollAlignment
Auto Trait Implementations§
impl Freeze for ScrollAlignment
impl RefUnwindSafe for ScrollAlignment
impl Send for ScrollAlignment
impl Sync for ScrollAlignment
impl Unpin for ScrollAlignment
impl UnsafeUnpin for ScrollAlignment
impl UnwindSafe for ScrollAlignment
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