pub struct Tunables { /* private fields */ }Expand description
A collection of size limits and performance tuning constants. Setters are
available via Tuner.
Implementations§
Source§impl Tunables
impl Tunables
Sourcepub fn max_body_ram(&self) -> u64
pub fn max_body_ram(&self) -> u64
Return the maximum body size in bytes allowed in RAM, e.g. before writing to a temporary file, or memory mapping instead of direct, bulk read. Default: 192 KiB.
Sourcepub fn max_body(&self) -> u64
pub fn max_body(&self) -> u64
Return the maximum body size in bytes allowed in any form (RAM or file). Default: 1 GiB.
Sourcepub fn buffer_size_ram(&self) -> usize
pub fn buffer_size_ram(&self) -> usize
Return the buffer size in bytes to use when buffering to RAM. Default: 8 KiB.
Sourcepub fn buffer_size_fs(&self) -> usize
pub fn buffer_size_fs(&self) -> usize
Return the buffer size in bytes to use when buffering to/from the file-system. Default: 64 KiB.
Sourcepub fn size_estimate_deflate(&self) -> u16
pub fn size_estimate_deflate(&self) -> u16
Return the size estimate, as an integer multiple of the encoded buffer size, for the deflate compression algorithm. Default: 4.
Sourcepub fn size_estimate_gzip(&self) -> u16
pub fn size_estimate_gzip(&self) -> u16
Return the size estimate, as an integer multiple of the encoded buffer size, for the gzip compression algorithm. Default: 5.
Sourcepub fn size_estimate_brotli(&self) -> u16
pub fn size_estimate_brotli(&self) -> u16
Return the size estimate, as an integer multiple of the encoded buffer size, for the Brotli compression algorithm. Default: 6.
Sourcepub fn temp_dir(&self) -> &Path
pub fn temp_dir(&self) -> &Path
Return the directory path in which to write temporary (BodyImage)
files. Default: std::env::temp_dir()
Sourcepub fn temp_dir_rc(&self) -> Arc<Path>
pub fn temp_dir_rc(&self) -> Arc<Path>
Return a reference to the directory path in which to write temporary
(BodyImage) files. Default: std::env::temp_dir()