pub struct LayerCache { /* private fields */ }Expand description
CPU-side cache of rendered subtrees.
Implementations§
Source§impl LayerCache
impl LayerCache
pub fn new(capacity: usize) -> Self
pub fn get(&self, key: LayerKey) -> Option<Arc<RenderList>>
pub fn insert(&mut self, key: LayerKey, list: RenderList) -> Arc<RenderList> ⓘ
Sourcepub fn invalidate_element(&mut self, element_id: u64)
pub fn invalidate_element(&mut self, element_id: u64)
Drops every cached revision of element_id.
pub fn invalidate_all(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LayerCache
impl RefUnwindSafe for LayerCache
impl Send for LayerCache
impl Sync for LayerCache
impl Unpin for LayerCache
impl UnsafeUnpin for LayerCache
impl UnwindSafe for LayerCache
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