pub struct CacheKeyBuilder { /* private fields */ }Expand description
Utility helpers for building view-cache cache keys.
The view-cache boundary (ElementContext::view_cache) relies on a deterministic u64 key to
decide whether cached output can be reused. Callers should include any inputs that affect
rendered output but may not otherwise force a re-render (e.g. text style, clip/mask geometry,
view-specific configuration).
Implementations§
Source§impl CacheKeyBuilder
impl CacheKeyBuilder
pub fn new() -> Self
pub fn write_u64(&mut self, value: u64)
pub fn write_u32(&mut self, value: u32)
pub fn write_bool(&mut self, value: bool)
pub fn write_px(&mut self, value: Px)
pub fn write_rect(&mut self, rect: Rect)
pub fn write_corners(&mut self, corners: Corners)
pub fn write_text_style(&mut self, style: &TextStyle)
pub fn finish(self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheKeyBuilder
impl RefUnwindSafe for CacheKeyBuilder
impl Send for CacheKeyBuilder
impl Sync for CacheKeyBuilder
impl Unpin for CacheKeyBuilder
impl UnsafeUnpin for CacheKeyBuilder
impl UnwindSafe for CacheKeyBuilder
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