pub struct Store(/* private fields */);Expand description
存储句柄,克隆很便宜(内部是 Arc)。
Implementations§
Source§impl Store
impl Store
pub fn open(cfg: Config) -> Result<Store>
pub fn config(&self) -> &Config
pub fn cache(&self) -> Cache<'_>
pub fn snapshots(&self) -> Snapshots<'_>
pub fn items(&self) -> Items<'_>
pub fn tasks(&self) -> Tasks<'_>
pub fn stats(&self) -> Stats
Sourcepub fn gc(&self) -> Result<GcReport>
pub fn gc(&self) -> Result<GcReport>
供 pagesift gc:超过 Config::max_bytes 时按 LRU 淘汰缓存和快照内容,然后压缩。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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