Expand description
Base crate for virtualization and pagination for Leptos.
This crate contains common code for the crates leptos-pagination and leptos-virtualization. You probably want don’t want to use this crate directly.
§Loading data
Wether you use pagination or virtualization you have to provide the data to display.
This is done through implementing one of the various Loader traits. Depending on your use case
you should implement the trait that best fits your needs:
MemoryLoader: If your dataset is already in memory like in aVec,HashSet, array, …PaginatedLoader: If your data source provides data in pages (independent of if you use UI pagination or virtualization).ExactLoader: If your data source can provide an exact range of items (start index to end index).Loader: If none of the above fit your needs, you can implement this trait to provide your own loading logic.
Please refer to the documentation and the examples to see how to implement these traits.
Modules§
Structs§
- Exact
Loader Marker - Item
Window - This is bascially a signal of a slice of the internal cache.
- Loaded
Items - Return type of
Loader::load_items. - Loader
Marker - Memory
Loader Marker - Paginated
Loader Marker
Enums§
- Paginated
Count - Return type of
PaginatedLoader::count.
Traits§
- Exact
Loader - Trait for loading items on-demand from an data source that let’s you request precise ranges.
- Internal
Loader - This is the trait for the actually used internal loaders. This trait is automatically implemented for all the user facing loader traits.
- Loader
- Loader trait for loading items on-demand from a data source.
- Memory
Loader - Loader trait for loading items on-demand from an in-memory data source.
- Paginated
Loader - Loader trait for loading items on-demand from a paginated data source.