Skip to main content

ScalingList

Struct ScalingList 

Source
pub struct ScalingList<'a> {
    pub visible: &'a [IndicatorItem],
    pub total: usize,
    pub viewport: f32,
    pub before_padding: f32,
    pub after_padding: f32,
}
Expand description

A scaling list as ScalingLazyColumnStateAdapter sees it. Device pixels.

Fields§

§visible: &'a [IndicatorItem]

The rows on screen, in order. Only the first and last are read, but the whole window is taken because that is what the adapter is handed and because a caller that trims it to two has to get the window right itself.

§total: usize

totalItemsCount — every row, on screen or not. This is the denominator the thumb’s length is a share of.

§viewport: f32

viewportSize.height.

§before_padding: f32

beforeContentPadding + beforeAutoCenteringPadding, the blank the list keeps above its first row. It counts only while the first row is on screen, which is the adapter’s own rule and not an optimisation.

§after_padding: f32

afterContentPadding + afterAutoCenteringPadding, likewise below the last row.

Trait Implementations§

Source§

impl<'a> Clone for ScalingList<'a>

Source§

fn clone(&self) -> ScalingList<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for ScalingList<'a>

Source§

impl<'a> Debug for ScalingList<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> PartialEq for ScalingList<'a>

Source§

fn eq(&self, other: &ScalingList<'a>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for ScalingList<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for ScalingList<'a>

§

impl<'a> RefUnwindSafe for ScalingList<'a>

§

impl<'a> Send for ScalingList<'a>

§

impl<'a> Sync for ScalingList<'a>

§

impl<'a> Unpin for ScalingList<'a>

§

impl<'a> UnsafeUnpin for ScalingList<'a>

§

impl<'a> UnwindSafe for ScalingList<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.