pub struct ListSectionsDriver {
pub key_at: Box<dyn Fn(usize) -> u64>,
pub build: Box<dyn Fn(usize, RNode) -> BuiltRow>,
}Expand description
The section half the list() piece supplies (docs/list.md “Sections”): a key per item and
a header builder. A header row precedes every item whose key differs from the item before.
Fields§
§key_at: Box<dyn Fn(usize) -> u64>The section key of item index in the current snapshot (the piece snapshots keys with
its rows, and rotates them with a committed move, so this needs no app access).
build: Box<dyn Fn(usize, RNode) -> BuiltRow>Build the header of the section that starts at item first into anchor: the same
contract as ListDriver::build, and its rebind writer takes the section’s first item.
Auto Trait Implementations§
impl !RefUnwindSafe for ListSectionsDriver
impl !Send for ListSectionsDriver
impl !Sync for ListSectionsDriver
impl !UnwindSafe for ListSectionsDriver
impl Freeze for ListSectionsDriver
impl Unpin for ListSectionsDriver
impl UnsafeUnpin for ListSectionsDriver
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<T> ErasedDestructor for Twhere
T: 'static,
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 more