pub struct ServerlessLocalCache {
pub root: PathBuf,
pub generation: u64,
}Fields§
§root: PathBuf§generation: u64Implementations§
Source§impl ServerlessLocalCache
impl ServerlessLocalCache
pub fn new(root: impl Into<PathBuf>, generation: u64) -> Self
pub fn cache_dir(&self) -> PathBuf
pub fn path_for_request(&self, request: &ServerlessHydrationRequest) -> PathBuf
pub fn write_hydrated_range( &self, range: &ServerlessHydratedRange, ) -> RdbFileResult<PathBuf>
pub fn read_hydrated_range( &self, request: &ServerlessHydrationRequest, ) -> RdbFileResult<ServerlessHydratedRange>
pub fn remove_hydrated_range( &self, request: &ServerlessHydrationRequest, ) -> RdbFileResult<()>
pub fn cached_entries(&self) -> RdbFileResult<Vec<ServerlessCacheEntry>>
pub fn enforce_max_bytes( &self, max_bytes: u64, ) -> RdbFileResult<ServerlessCacheEvictionPlan>
Trait Implementations§
Source§impl Clone for ServerlessLocalCache
impl Clone for ServerlessLocalCache
Source§fn clone(&self) -> ServerlessLocalCache
fn clone(&self) -> ServerlessLocalCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerlessLocalCache
impl Debug for ServerlessLocalCache
impl Eq for ServerlessLocalCache
Source§impl PartialEq for ServerlessLocalCache
impl PartialEq for ServerlessLocalCache
Source§fn eq(&self, other: &ServerlessLocalCache) -> bool
fn eq(&self, other: &ServerlessLocalCache) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ServerlessLocalCache
Auto Trait Implementations§
impl Freeze for ServerlessLocalCache
impl RefUnwindSafe for ServerlessLocalCache
impl Send for ServerlessLocalCache
impl Sync for ServerlessLocalCache
impl Unpin for ServerlessLocalCache
impl UnsafeUnpin for ServerlessLocalCache
impl UnwindSafe for ServerlessLocalCache
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