pub struct RenderMemo {
pub declarations: StructuralMemo<Rc<str>>,
pub constructs: StructuralMemo<Rc<str>>,
/* private fields */
}Expand description
rendered strings shared by the renderer (RenderMemo): identical declarations and identical constructs (colors,
functions, parentheses, binary expressions, …) are rendered once. a memo is only shared by renders that use the
same options. the source map locations are not memoized: they are computed from the rendered string
Fields§
§declarations: StructuralMemo<Rc<str>>rendered declarations (name:value), by name and value tokens
constructs: StructuralMemo<Rc<str>>rendered constructs: colors and tokens with sub tokens
Implementations§
Source§impl RenderMemo
impl RenderMemo
Sourcepub fn release(memo: RenderMemo)
pub fn release(memo: RenderMemo)
clear a memo that is no longer used and keep it for the next renders (4 memos at most)
Trait Implementations§
Auto Trait Implementations§
impl !Send for RenderMemo
impl !Sync for RenderMemo
impl Forget for RenderMemo
impl Freeze for RenderMemo
impl Move for RenderMemo
impl RefUnwindSafe for RenderMemo
impl Unpin for RenderMemo
impl UnsafeUnpin for RenderMemo
impl UnwindSafe for RenderMemo
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