leptos_windowing/lib.rs
1//! Base crate for virtualization and pagination for Leptos.
2//!
3//! This crate contains common code for the crates leptos-pagination and leptos-virtualization.
4//! You probably want don't want to use this crate directly.
5//!
6//! ## Loading data
7//!
8//! Wether you use pagination or virtualization you have to provide the data to display.
9//! This is done through implementing one of the various `Loader` traits. Depending on your use case
10//! you should implement the trait that best fits your needs:
11//!
12//! - [`MemoryLoader`]: If your dataset is already in memory like in a `Vec`, `HashSet`, array, ...
13//! - [`PaginatedLoader`]: If your data source provides data in pages (independent of if you use UI pagination or virtualization).
14//! - [`ExactLoader`]: If your data source can provide an exact range of items (start index to end index).
15//! - [`Loader`]: If none of the above fit your needs, you can implement this trait to provide your own loading logic.
16//!
17//! Please refer to the documentation and the examples to see how to implement these traits.
18
19pub mod cache;
20pub mod hook;
21pub mod item_state;
22mod loaders;
23mod window;
24
25pub use loaders::*;
26pub use window::*;