Skip to main content

List

Struct List 

Source
pub struct List<K: Clone + Eq + Hash + 'static> { /* private fields */ }
Expand description

Lazily indexed rows with fixed height or measured height estimates. Factories receive a reactive index and stable key and run once per mounted key. Only the render window and one focused key are read. The focused row may stay mounted outside that window; blur releases it. Ordinary each intentionally renders everything.

Implementations§

Source§

impl<K: Clone + Eq + Hash> List<K>

Source

pub fn table_rows(self, offset: impl Into<Vary<u32>>) -> Self

Windowed structural rows inside an application’s semantic Table. The scroll root/surface stay generic; callers supply ColumnHeader/Cell content. Coordinates include an explicit offset (for example one header row).

Source

pub fn name(self, value: impl Into<Vary<String>>) -> Self

Source

pub fn height(self, value: f64) -> Self

Source

pub fn row_height(self, value: f64) -> Self

Source

pub fn measure(self, estimate: f64) -> Self

Enable real row Resize measurements, using this estimate until known. Row wrappers have automatic height and a 1px minimum. The sparse index allocates no full-data array; unmeasured/evicted rows use the estimate.

Source

pub fn measure_limit(self, value: usize) -> Self

Retained height metadata, independent of UI instances. At least the live render window is protected, even if it contains more rows than this limit.

Source

pub fn locate(self, locate: impl Fn(&K) -> Option<usize> + 'static) -> Self

O(1)/O(log n) stable-key lookup for anchoring across large data edits. No source scan is supplied by the framework. Results are validated.

Source

pub fn revision(self, value: impl Into<Vary<u64>>) -> Self

Explicit data edit version for sources whose key closure is not reactive. Ordinary scrolls never relocate cached height metadata.

Source

pub fn overscan(self, value: usize) -> Self

Source

pub fn row_limit(self, value: usize) -> Self

Reject an oversized render window before reading keys or mounting rows. Includes overscan; at most one additional focused row is allowed. This does not truncate visible data or silently change layout geometry.

Source

pub fn scroll_limit(self, value: f64) -> Self

Source

pub fn position(self, value: impl Into<Vary<f64>>) -> Self

Programmatic logical offset. on_scroll may echo its reported value back into this source without issuing a new seek or cancelling navigation.

Source

pub fn on_scroll(self, callback: impl FnMut(f64) + 'static) -> Self

Source

pub fn inspect(self, callback: impl FnMut(ListStats) + 'static) -> Self

Trait Implementations§

Source§

impl<K: Clone + Eq + Hash + 'static> Widget for List<K>

Source§

fn build(&mut self, scope: &Scope) -> Result

Source§

fn mount(self, parent: &Scope) -> Result<Mounted>
where Self: Sized,

Source§

fn show_in(self, parent: &Scope) -> Result
where Self: Sized,

Auto Trait Implementations§

§

impl<K> !RefUnwindSafe for List<K>

§

impl<K> !Send for List<K>

§

impl<K> !Sync for List<K>

§

impl<K> !UnwindSafe for List<K>

§

impl<K> Freeze for List<K>
where Option<Rc<dyn Fn(usize) -> K>>: Freeze, Option<Rc<dyn Fn(&K) -> Option<usize>>>: Freeze, Option<Box<dyn FnMut(Cage<usize>, K) -> Box<dyn Widget>>>: Freeze,

§

impl<K> Unpin for List<K>
where Option<Rc<dyn Fn(usize) -> K>>: Unpin, Option<Rc<dyn Fn(&K) -> Option<usize>>>: Unpin, Option<Box<dyn FnMut(Cage<usize>, K) -> Box<dyn Widget>>>: Unpin,

§

impl<K> UnsafeUnpin for List<K>
where Option<Rc<dyn Fn(usize) -> K>>: UnsafeUnpin, Option<Rc<dyn Fn(&K) -> Option<usize>>>: UnsafeUnpin, Option<Box<dyn FnMut(Cage<usize>, K) -> Box<dyn Widget>>>: 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<W> IntoChildren for W
where W: Widget,

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.