ratatui-toolkit 0.2.6

DEPRECATED: this crate was renamed to `ratkit`. Please migrate to `ratkit`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Render cache getter for CacheState.

use crate::widgets::markdown_widget::state::cache_state::{CacheState, RenderCache};

impl CacheState {
    /// Get a reference to the render cache if it exists.
    ///
    /// The render cache contains the rendered lines from the last render operation.
    /// This is useful for extracting text for copy operations.
    pub fn render_cache(&self) -> Option<&RenderCache> {
        self.render.as_ref()
    }
}