pub enum VirtualAnchorPolicy {
ViewportFraction {
y_fraction: f32,
},
FirstVisible,
LastVisible,
}Expand description
Policy used to pick the next dynamic virtual-list anchor after each layout pass. The previous anchor solves the current frame; this policy rebases the next frame onto a coherent in-viewport row point.
Variants§
ViewportFraction
Pick the row point nearest y_fraction through the viewport.
0.0 is the top, 1.0 is the bottom. Good default for feeds.
FirstVisible
Prefer the first fully visible row; fall back to the first partially visible row.
LastVisible
Prefer the last fully visible row; fall back to the last partially visible row.
Trait Implementations§
Source§impl Clone for VirtualAnchorPolicy
impl Clone for VirtualAnchorPolicy
Source§fn clone(&self) -> VirtualAnchorPolicy
fn clone(&self) -> VirtualAnchorPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VirtualAnchorPolicy
impl Debug for VirtualAnchorPolicy
Source§impl Default for VirtualAnchorPolicy
impl Default for VirtualAnchorPolicy
Source§impl PartialEq for VirtualAnchorPolicy
impl PartialEq for VirtualAnchorPolicy
Source§fn eq(&self, other: &VirtualAnchorPolicy) -> bool
fn eq(&self, other: &VirtualAnchorPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for VirtualAnchorPolicy
impl StructuralPartialEq for VirtualAnchorPolicy
Auto Trait Implementations§
impl Freeze for VirtualAnchorPolicy
impl RefUnwindSafe for VirtualAnchorPolicy
impl Send for VirtualAnchorPolicy
impl Sync for VirtualAnchorPolicy
impl Unpin for VirtualAnchorPolicy
impl UnsafeUnpin for VirtualAnchorPolicy
impl UnwindSafe for VirtualAnchorPolicy
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.