pub enum ItemAlignment {
Start,
Center,
End,
Nearest,
}Expand description
Where ScrollController::scroll_to_item lands a row in the viewport.
Every alignment is clamped to the list’s [0, max_offset] range, so a row
too near either end of the content to reach the requested position stops
at the edge instead (the first row can never be centered).
Variants§
Start
The row’s top edge at the viewport’s top edge.
Center
The row’s center at the viewport’s center.
End
The row’s bottom edge at the viewport’s bottom edge.
Nearest
The least movement that shows the whole row: nothing at all when it is
already fully visible, ItemAlignment::Start when it sits above the
viewport (or is taller than it), ItemAlignment::End when below.
Trait Implementations§
Source§impl Clone for ItemAlignment
impl Clone for ItemAlignment
impl Copy for ItemAlignment
Source§impl Debug for ItemAlignment
impl Debug for ItemAlignment
Source§impl Default for ItemAlignment
impl Default for ItemAlignment
impl Eq for ItemAlignment
Source§impl Hash for ItemAlignment
impl Hash for ItemAlignment
Source§impl PartialEq for ItemAlignment
impl PartialEq for ItemAlignment
impl StructuralPartialEq for ItemAlignment
Auto Trait Implementations§
impl Freeze for ItemAlignment
impl RefUnwindSafe for ItemAlignment
impl Send for ItemAlignment
impl Sync for ItemAlignment
impl Unpin for ItemAlignment
impl UnsafeUnpin for ItemAlignment
impl UnwindSafe for ItemAlignment
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.