pub struct TieredExperiencePool { /* private fields */ }Expand description
Two-tier experience pool: project-local first, global fallback.
Queries local pool first; falls back to global when local yields no results. Records to both tiers on every edit event.
Implementations§
Source§impl TieredExperiencePool
impl TieredExperiencePool
Sourcepub fn open(
local_path: &Path,
global_path: &Path,
) -> Result<Self, ExperienceError>
pub fn open( local_path: &Path, global_path: &Path, ) -> Result<Self, ExperienceError>
Open both local and global experience pool tiers.
Sourcepub fn query_files(
&self,
description: &str,
) -> Result<Vec<(String, u32)>, ExperienceError>
pub fn query_files( &self, description: &str, ) -> Result<Vec<(String, u32)>, ExperienceError>
Query with local-first fallback to global.
Returns local results if any exist; otherwise returns global results.
Sourcepub fn record(&self, entry: &ExperienceEntry) -> Result<(), ExperienceError>
pub fn record(&self, entry: &ExperienceEntry) -> Result<(), ExperienceError>
Record to both local and global pools.
Auto Trait Implementations§
impl !Freeze for TieredExperiencePool
impl RefUnwindSafe for TieredExperiencePool
impl Send for TieredExperiencePool
impl Sync for TieredExperiencePool
impl Unpin for TieredExperiencePool
impl UnsafeUnpin for TieredExperiencePool
impl UnwindSafe for TieredExperiencePool
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