pub struct PlanCache { /* private fields */ }Expand description
See the module documentation. One per process (the app’s Core).
Implementations§
Source§impl PlanCache
impl PlanCache
pub fn new() -> Self
Sourcepub fn with_probe_budget(budget: Duration) -> Self
pub fn with_probe_budget(budget: Duration) -> Self
A cache whose planner runs wait budget for their write probes
(default crate::access::PROBE_BUDGET).
Sourcepub fn invalidate(&self)
pub fn invalidate(&self)
Drops the cached plan; the next request plans again. A plan being computed now is returned to its requests but not kept.
Sourcepub fn probes(&self) -> &ProbeCache
pub fn probes(&self) -> &ProbeCache
The write probes of client files, kept per file fingerprint; the app’s views probe files outside the plan (manifests, skill folders) through it too.
Sourcepub fn plan(
&self,
ax: &ApplyEnv<'_>,
open: &OpenStore<'_>,
) -> Result<Arc<CachedPlan>, CoreError>
pub fn plan( &self, ax: &ApplyEnv<'_>, open: &OpenStore<'_>, ) -> Result<Arc<CachedPlan>, CoreError>
The full plan of this machine: the cached one when everything it was
planned from reads the same, else a new one. open opens the store
(or returns None when there is none yet) over the file system it
is given, so the store’s reads are noted too.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PlanCache
impl Forget for PlanCache
impl Move for PlanCache
impl RefUnwindSafe for PlanCachewhere
Mutex<State>: RefUnwindSafe,
Mutex<()>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
Mutex<HashMap<PathBuf, Cached>>: RefUnwindSafe,
impl Send for PlanCache
impl Sync for PlanCache
impl Unpin for PlanCache
impl UnsafeUnpin for PlanCachewhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const ArcInner<CachedPlan> is !null: UnsafeUnpin,
PhantomData<ArcInner<CachedPlan>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(Read, Seen)>: UnsafeUnpin,
*const ArcInner<Mutex<HashMap<PathBuf, Cached>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<HashMap<PathBuf, Cached>>>>: UnsafeUnpin,
impl UnwindSafe for PlanCachewhere
Mutex<State>: UnwindSafe,
Mutex<()>: UnwindSafe,
Arc<Mutex<HashMap<PathBuf, Cached>>>: UnwindSafe,
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