Skip to main content

VirtualList

Struct VirtualList 

Source
pub struct VirtualList<'a, Msg = Callback> {
    pub count: usize,
    pub item_extent: f32,
    pub axis: Axis,
    pub build: &'a dyn Fn(usize) -> Box<dyn Widget<Msg>>,
}
Expand description

The description of a virtualised list, exposed to the render driver.

Fields§

§count: usize

Total number of items.

§item_extent: f32

The (logical) extent of one item along the axis the list scrolls: its height down a vertical list, its width across a horizontal one.

§axis: Axis

Which way the list runs.

§build: &'a dyn Fn(usize) -> Box<dyn Widget<Msg>>

Builds one item per index.

Auto Trait Implementations§

§

impl<'a, Msg = Callback> !RefUnwindSafe for VirtualList<'a, Msg>

§

impl<'a, Msg = Callback> !Send for VirtualList<'a, Msg>

§

impl<'a, Msg = Callback> !Sync for VirtualList<'a, Msg>

§

impl<'a, Msg = Callback> !UnwindSafe for VirtualList<'a, Msg>

§

impl<'a, Msg> Freeze for VirtualList<'a, Msg>
where &'a dyn Fn(usize) -> Box<dyn Widget<Msg>>: Freeze,

§

impl<'a, Msg> Unpin for VirtualList<'a, Msg>
where &'a dyn Fn(usize) -> Box<dyn Widget<Msg>>: Unpin,

§

impl<'a, Msg> UnsafeUnpin for VirtualList<'a, Msg>
where &'a dyn Fn(usize) -> Box<dyn Widget<Msg>>: UnsafeUnpin,

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> 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<Msg> IntoMsg<Msg> for Msg

Source§

fn defer(work: impl Fn() -> Msg + 'static) -> Msg

The message that stands for work’s result.
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.