pub struct ScrollAxisRange {
pub value: f32,
pub max_value: f32,
pub reverse: bool,
}Expand description
How far a container has scrolled along one axis and how far it can go.
This is Compose’s ScrollAxisRange (verticalScrollAxisRange,
horizontalScrollAxisRange). A lazy list has no whole extent to give, so
it reports the first visible item as the value and one more than that as
the end while it can still scroll; a reader only needs to know whether it
can page on.
Fields§
§value: f32§max_value: f32§reverse: boolImplementations§
Source§impl ScrollAxisRange
impl ScrollAxisRange
pub fn new(value: f32, max_value: f32, reverse: bool) -> ScrollAxisRange
pub fn can_scroll_forward(&self) -> bool
pub fn can_scroll_backward(&self) -> bool
Trait Implementations§
Source§impl Clone for ScrollAxisRange
impl Clone for ScrollAxisRange
Source§fn clone(&self) -> ScrollAxisRange
fn clone(&self) -> ScrollAxisRange
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 moreimpl Copy for ScrollAxisRange
Source§impl Debug for ScrollAxisRange
impl Debug for ScrollAxisRange
Source§impl PartialEq for ScrollAxisRange
impl PartialEq for ScrollAxisRange
impl StructuralPartialEq for ScrollAxisRange
Auto Trait Implementations§
impl Freeze for ScrollAxisRange
impl RefUnwindSafe for ScrollAxisRange
impl Send for ScrollAxisRange
impl Sync for ScrollAxisRange
impl Unpin for ScrollAxisRange
impl UnsafeUnpin for ScrollAxisRange
impl UnwindSafe for ScrollAxisRange
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