pub struct SmartStrategyConfig {
pub prefetch_enabled: bool,
pub prefetch_threshold: f64,
pub prefetch_window_size: usize,
pub prefetch_batch_size: usize,
pub compression_enabled: bool,
pub compression_threshold: usize,
pub min_compression_ratio: f64,
pub compression_sample_rate: f64,
}Expand description
智能策略配置
Fields§
§prefetch_enabled: bool是否启用自动预取
prefetch_threshold: f64预取触发阈值(命中率低于此值时触发预取)
prefetch_window_size: usize预取窗口大小(用于计算命中率的请求数)
prefetch_batch_size: usize预取批量大小
compression_enabled: bool是否启用自动压缩
compression_threshold: usize压缩阈值(字节大小,超过此值才考虑压缩)
min_compression_ratio: f64最小压缩率(压缩后大小/原始大小 < 此值时才压缩)
compression_sample_rate: f64压缩采样率(用于启发式检查的采样比例)
Trait Implementations§
Source§impl Clone for SmartStrategyConfig
impl Clone for SmartStrategyConfig
Source§fn clone(&self) -> SmartStrategyConfig
fn clone(&self) -> SmartStrategyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SmartStrategyConfig
impl Debug for SmartStrategyConfig
Auto Trait Implementations§
impl Freeze for SmartStrategyConfig
impl RefUnwindSafe for SmartStrategyConfig
impl Send for SmartStrategyConfig
impl Sync for SmartStrategyConfig
impl Unpin for SmartStrategyConfig
impl UnwindSafe for SmartStrategyConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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