pub struct CacheView { /* private fields */ }Expand description
Read-only view over the platform cache.
Adapter-facing code receives this type instead of the mutable cache handle so cache writes stay owned by the data and execution engines.
Implementations§
Source§impl CacheView
impl CacheView
Sourcepub fn try_borrow(&self) -> Result<Ref<'_, Cache>, BorrowError>
pub fn try_borrow(&self) -> Result<Ref<'_, Cache>, BorrowError>
Tries to borrow the cache without panicking when an engine owns a mutable borrow.
§Errors
Returns an error when the cache is mutably borrowed.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CacheView
impl !Send for CacheView
impl !Sync for CacheView
impl !UnwindSafe for CacheView
impl Freeze for CacheView
impl Unpin for CacheView
impl UnsafeUnpin for CacheView
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