FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CellModelPool

    struct · ferroui-controls-treedatagrid · v0.5.0

    struct CellModelPool
    

    The cells of the columns of a presentation suspended for reuse (CellModelPool<TModel>).

    View source

    Members

    MAXIMUM_CELLS

    const MAXIMUM_CELLS: usize
    

    The most cells the pool keeps (MaximumCells).

    Source

    new

    fn new() -> Self
    

    Source

    touch_column

    fn touch_column(self: &mut Self, column: &ColumnRef) -> bool
    

    Whether the pool has a bucket for column (_columns.TryGetValue); a hit makes the bucket the most recently used one.

    Source

    pop

    fn pop(self: &mut Self, column: &ColumnRef) -> Option<CellRef>
    

    Removes the most recently pooled cell of column (node.Value.Cells.Pop()).

    Source

    add

    fn add(self: &mut Self, column: &ColumnRef, cell: CellRef, evicted: &mut Vec<CellRef>)
    

    Keeps a suspended cell for column (the second half of TryAdd); the cells evicted to keep the pool within its bounds are added to evicted, for the caller to dispose.

    Source

    clear

    fn clear(self: &mut Self) -> Vec<CellRef>
    

    Removes every cell (Clear); returns them for the caller to dispose.

    Source

    count

    fn count(self: &Self) -> usize
    

    The number of cells kept.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Default

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.