pub enum ScrollPositionAlignmentPolicy {
Explicit,
KeepVisibleAtEnd,
KeepVisibleAtStart,
}Expand description
The policy to use when applying the alignment parameter of
ScrollPosition::ensure_visible.
Variants§
Explicit
Use the alignment property of ScrollPosition::ensure_visible to decide
where to align the visible object.
KeepVisibleAtEnd
Find the bottom edge of the scroll container, and scroll the container, if necessary, to show the bottom of the object.
For example, find the bottom edge of the scroll container. If the bottom edge of the item is below the bottom edge of the scroll container, scroll the item so that the bottom of the item is just visible. If the entire item is already visible, then do nothing.
KeepVisibleAtStart
Find the top edge of the scroll container, and scroll the container if necessary to show the top of the object.
For example, find the top edge of the scroll container. If the top edge of the item is above the top edge of the scroll container, scroll the item so that the top of the item is just visible. If the entire item is already visible, then do nothing.
Trait Implementations§
impl Copy for ScrollPositionAlignmentPolicy
impl Eq for ScrollPositionAlignmentPolicy
Source§impl Hash for ScrollPositionAlignmentPolicy
impl Hash for ScrollPositionAlignmentPolicy
impl StructuralPartialEq for ScrollPositionAlignmentPolicy
Auto Trait Implementations§
impl Forget for ScrollPositionAlignmentPolicy
impl Freeze for ScrollPositionAlignmentPolicy
impl Move for ScrollPositionAlignmentPolicy
impl RefUnwindSafe for ScrollPositionAlignmentPolicy
impl Send for ScrollPositionAlignmentPolicy
impl Sync for ScrollPositionAlignmentPolicy
impl Unpin for ScrollPositionAlignmentPolicy
impl UnsafeUnpin for ScrollPositionAlignmentPolicy
impl UnwindSafe for ScrollPositionAlignmentPolicy
Blanket Implementations§
Source§impl<T> AnyEq for T
impl<T> AnyEq for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.