pub struct ModelLoadingConfig {
pub max_cached_models: usize,
pub max_cache_memory_mb: usize,
pub preload_count: usize,
pub preload_interval: Duration,
pub memory_map_threshold_mb: usize,
pub enable_predictive_loading: bool,
pub warming_timeout: Duration,
pub enable_compression: bool,
}Expand description
Configuration for model loading optimization
Fields§
§max_cached_models: usizeMaximum number of models to keep in cache
max_cache_memory_mb: usizeMaximum memory usage for model cache (in MB)
preload_count: usizeNumber of models to preload based on usage patterns
preload_interval: DurationBackground preloading interval
memory_map_threshold_mb: usizeMemory mapping threshold (models larger than this use memory mapping)
enable_predictive_loading: boolEnable predictive loading based on usage patterns
warming_timeout: DurationModel warming timeout
enable_compression: boolEnable model compression in cache
Trait Implementations§
Source§impl Clone for ModelLoadingConfig
impl Clone for ModelLoadingConfig
Source§fn clone(&self) -> ModelLoadingConfig
fn clone(&self) -> ModelLoadingConfig
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 ModelLoadingConfig
impl Debug for ModelLoadingConfig
Source§impl Default for ModelLoadingConfig
impl Default for ModelLoadingConfig
Source§impl<'de> Deserialize<'de> for ModelLoadingConfig
impl<'de> Deserialize<'de> for ModelLoadingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelLoadingConfig
impl RefUnwindSafe for ModelLoadingConfig
impl Send for ModelLoadingConfig
impl Sync for ModelLoadingConfig
impl Unpin for ModelLoadingConfig
impl UnsafeUnpin for ModelLoadingConfig
impl UnwindSafe for ModelLoadingConfig
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> 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