pub struct ListGrouper { /* private fields */ }Expand description
Tracks active list entities across consecutive blocks so that items belonging to the same logical list share a single list entity.
Uses a vec indexed by indent level. When indent decreases, deeper entries are truncated so that outer lists resume correctly.
Implementations§
Source§impl ListGrouper
impl ListGrouper
pub fn new() -> Self
Sourcepub fn try_reuse(&mut self, style: &ListStyle, indent: u32) -> Option<EntityId>
pub fn try_reuse(&mut self, style: &ListStyle, indent: u32) -> Option<EntityId>
Returns an existing list entity id if the style and indent match
a previously registered list at this level. Returns None if a
new list entity must be created (caller should then call register).
Trait Implementations§
Source§impl Default for ListGrouper
impl Default for ListGrouper
Source§fn default() -> ListGrouper
fn default() -> ListGrouper
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ListGrouper
impl RefUnwindSafe for ListGrouper
impl Send for ListGrouper
impl Sync for ListGrouper
impl Unpin for ListGrouper
impl UnsafeUnpin for ListGrouper
impl UnwindSafe for ListGrouper
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