pub struct HelpRenderState { /* private fields */ }Expand description
Cached render state for Help, enabling incremental layout reuse and
dirty-rect updates for keybinding hint panels.
§Invariants
- Layout is reused only when entry count and slot widths remain compatible.
- Dirty rects always cover the full prior slot width for changed entries.
- Layout rebuilds on any change that could cause reflow.
§Failure Modes
- If a changed entry exceeds its cached slot width, we rebuild the layout.
- If enabled entry count changes, we rebuild the layout.
Implementations§
Source§impl HelpRenderState
impl HelpRenderState
Sourcepub fn stats(&self) -> HelpCacheStats
pub fn stats(&self) -> HelpCacheStats
Return cache statistics.
Sourcepub fn clear_dirty_rects(&mut self)
pub fn clear_dirty_rects(&mut self)
Clear recorded dirty rects.
Sourcepub fn take_dirty_rects(&mut self) -> Vec<Rect>
pub fn take_dirty_rects(&mut self) -> Vec<Rect>
Take dirty rects for logging/inspection.
Sourcepub fn dirty_rects(&self) -> &[Rect]
pub fn dirty_rects(&self) -> &[Rect]
Read dirty rects without clearing.
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset cache stats (useful for perf logging).
Trait Implementations§
Source§impl Debug for HelpRenderState
impl Debug for HelpRenderState
Source§impl Default for HelpRenderState
impl Default for HelpRenderState
Source§fn default() -> HelpRenderState
fn default() -> HelpRenderState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HelpRenderState
impl RefUnwindSafe for HelpRenderState
impl Send for HelpRenderState
impl Sync for HelpRenderState
impl Unpin for HelpRenderState
impl UnwindSafe for HelpRenderState
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