pub struct VariableList<K> {
pub state: ListState,
/* private fields */
}Expand description
A tail-following list that builds visible rows plus 500px of overscan.
Keys must be unique. Call sync before rendering and invalidate when an
offscreen item’s height changes. Use state.remeasure() after font changes.
Fields§
§state: ListStateImplementations§
Source§impl<K: Clone + Eq + 'static> VariableList<K>
impl<K: Clone + Eq + 'static> VariableList<K>
Sourcepub fn sync(&self, next: Vec<K>)
pub fn sync(&self, next: Vec<K>)
Reconcile insertions/removals while retaining the visible item’s pixel anchor.
pub fn invalidate(&self, key: &K)
Sourcepub fn set_end_inset(&self, inset: Pixels)
pub fn set_end_inset(&self, inset: Pixels)
Keep the scrollbar clear of floating controls at the bottom.
pub fn visible_range(&self) -> Range<usize> ⓘ
pub fn scroll_to(&self, index: usize)
Sourcepub fn focus_item(&self, index: usize, focus: Option<FocusHandle>)
pub fn focus_item(&self, index: usize, focus: Option<FocusHandle>)
Keep keyboard interaction alive for a selected item outside the viewport.
pub fn render( &self, render: impl FnMut(usize, &mut Window, &mut App) -> AnyElement + 'static, on_visible: impl Fn(Range<usize>, &mut Window, &mut App) + 'static, ) -> Div
Trait Implementations§
Source§impl<K: Clone> Clone for VariableList<K>
impl<K: Clone> Clone for VariableList<K>
Source§fn clone(&self) -> VariableList<K>
fn clone(&self) -> VariableList<K>
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 moreAuto Trait Implementations§
impl<K> !RefUnwindSafe for VariableList<K>
impl<K> !Send for VariableList<K>
impl<K> !Sync for VariableList<K>
impl<K> !UnwindSafe for VariableList<K>
impl<K> Freeze for VariableList<K>
impl<K> Unpin for VariableList<K>
impl<K> UnsafeUnpin for VariableList<K>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().