pub struct SpeculativePrefetcher { /* private fields */ }Expand description
Predictor de navegación de alta velocidad para la navegación sin latencia (zero-stutter).
Implementations§
Source§impl SpeculativePrefetcher
impl SpeculativePrefetcher
pub fn new(prediction_window_secs: f64, cache_capacity: usize) -> Self
Sourcepub fn update_position(&mut self, current_center_time: f64)
pub fn update_position(&mut self, current_center_time: f64)
Actualiza el estado de navegación según la posición actual del viewport. Calcula la velocidad $\vec{v} = \frac{\Delta x}{\Delta t}$ e inercia.
Sourcepub fn current_velocity(&self) -> f64
pub fn current_velocity(&self) -> f64
Obtiene la velocidad actual estimada del desplazamiento.
Sourcepub fn predict_future_range(&self, current_span: f64) -> (f64, f64)
pub fn predict_future_range(&self, current_span: f64) -> (f64, f64)
Calcula la posición futura predecida $T_{\text{futuro}} = T_{\text{actual}} + \vec{v} \cdot \Delta t_{\text{preview}}$.
Sourcepub fn prefetch_mmap(
&mut self,
reader: &MmapReader,
offset_bytes: usize,
length_bytes: usize,
) -> Result<()>
pub fn prefetch_mmap( &mut self, reader: &MmapReader, offset_bytes: usize, length_bytes: usize, ) -> Result<()>
Emite la solicitud de precarga al kernel usando madvise (Advice::WillNeed).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpeculativePrefetcher
impl RefUnwindSafe for SpeculativePrefetcher
impl Send for SpeculativePrefetcher
impl Sync for SpeculativePrefetcher
impl Unpin for SpeculativePrefetcher
impl UnsafeUnpin for SpeculativePrefetcher
impl UnwindSafe for SpeculativePrefetcher
Blanket Implementations§
impl<T> Allocation for T
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
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