pub struct WorkspaceConfig {
pub initial_size: usize,
pub max_size: usize,
pub growth_factor: f64,
pub strategy: AllocationStrategy,
pub auto_expand: bool,
pub enable_defragmentation: bool,
pub defrag_threshold: f64,
pub num_buckets: usize,
}Expand description
Workspace configuration.
Fields§
§initial_size: usizeInitial workspace size (bytes)
max_size: usizeMaximum workspace size (bytes)
growth_factor: f64Growth factor when expanding
strategy: AllocationStrategyAllocation strategy
auto_expand: boolEnable automatic expansion
enable_defragmentation: boolEnable defragmentation
defrag_threshold: f64Defragmentation threshold (fragmentation ratio)
num_buckets: usizeNumber of size buckets for pooling
Implementations§
Source§impl WorkspaceConfig
impl WorkspaceConfig
Sourcepub fn large_model() -> Self
pub fn large_model() -> Self
Create configuration for large models.
Sourcepub fn small_model() -> Self
pub fn small_model() -> Self
Create configuration for small models.
Sourcepub fn memory_optimized() -> Self
pub fn memory_optimized() -> Self
Create configuration optimized for memory.
Trait Implementations§
Source§impl Clone for WorkspaceConfig
impl Clone for WorkspaceConfig
Source§fn clone(&self) -> WorkspaceConfig
fn clone(&self) -> WorkspaceConfig
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 WorkspaceConfig
impl Debug for WorkspaceConfig
Source§impl Default for WorkspaceConfig
impl Default for WorkspaceConfig
Source§impl<'de> Deserialize<'de> for WorkspaceConfig
impl<'de> Deserialize<'de> for WorkspaceConfig
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 WorkspaceConfig
impl RefUnwindSafe for WorkspaceConfig
impl Send for WorkspaceConfig
impl Sync for WorkspaceConfig
impl Unpin for WorkspaceConfig
impl UnwindSafe for WorkspaceConfig
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