pub struct StaticCacheConfig {
pub max_bytes: usize,
pub initial_capacity: usize,
}Expand description
Configuration options for the static cache
Fields§
§max_bytes: usizeMaximum memory in bytes for the static cache (0 = unlimited)
initial_capacity: usizeInitial capacity for the HashMap (reduces rehashing for large SVGs)
Implementations§
Source§impl StaticCacheConfig
impl StaticCacheConfig
Sourcepub fn for_large_repeating_svgs() -> Self
pub fn for_large_repeating_svgs() -> Self
Create config optimized for large SVGs with many repeating elements
Sourcepub fn with_max_mb(mb: usize) -> Self
pub fn with_max_mb(mb: usize) -> Self
Create config with specific memory limit in megabytes
Trait Implementations§
Source§impl Clone for StaticCacheConfig
impl Clone for StaticCacheConfig
Source§fn clone(&self) -> StaticCacheConfig
fn clone(&self) -> StaticCacheConfig
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 StaticCacheConfig
impl Debug for StaticCacheConfig
Auto Trait Implementations§
impl Freeze for StaticCacheConfig
impl RefUnwindSafe for StaticCacheConfig
impl Send for StaticCacheConfig
impl Sync for StaticCacheConfig
impl Unpin for StaticCacheConfig
impl UnsafeUnpin for StaticCacheConfig
impl UnwindSafe for StaticCacheConfig
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