pub trait SectionProvider: 'static {
// Required methods
fn section_count(&self) -> usize;
fn items_in_section(&self, section: usize) -> usize;
fn section_title(&self, section: usize) -> String;
// Provided method
fn section_counts(&self) -> Vec<usize> { ... }
}Expand description
Partitions a flat model into display sections.
Required Methods§
Sourcefn section_count(&self) -> usize
fn section_count(&self) -> usize
Number of sections.
Sourcefn items_in_section(&self, section: usize) -> usize
fn items_in_section(&self, section: usize) -> usize
Number of items in section.
Sourcefn section_title(&self, section: usize) -> String
fn section_title(&self, section: usize) -> String
Display title for section.
Provided Methods§
Sourcefn section_counts(&self) -> Vec<usize>
fn section_counts(&self) -> Vec<usize>
Per-section item counts, in order. Used by the layout strategy.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".