pub struct PredictivePreloader { /* private fields */ }Implementations§
Source§impl PredictivePreloader
impl PredictivePreloader
pub fn with_history_path(history_path: PathBuf) -> Self
Sourcepub fn predict_next(
&mut self,
task_class: &str,
recent_files: &[&str],
) -> Vec<String>
pub fn predict_next( &mut self, task_class: &str, recent_files: &[&str], ) -> Vec<String>
Returns deterministic candidates for the next read and records them for later accuracy accounting.
Sourcepub fn on_file_read(&mut self, path: &str)
pub fn on_file_read(&mut self, path: &str)
Records an observed file read, learns it for the preceding context, and marks a pending prediction as used when applicable.
pub fn accuracy(&self) -> f32
Trait Implementations§
Source§impl Debug for PredictivePreloader
impl Debug for PredictivePreloader
Auto Trait Implementations§
impl Forget for PredictivePreloader
impl Freeze for PredictivePreloader
impl Move for PredictivePreloader
impl RefUnwindSafe for PredictivePreloader
impl Send for PredictivePreloader
impl Sync for PredictivePreloader
impl Unpin for PredictivePreloader
impl UnsafeUnpin for PredictivePreloader
impl UnwindSafe for PredictivePreloader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more