Struct body_image::Tunables
source · 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 res_timeout(&self) -> Option<Duration>
pub fn res_timeout(&self) -> Option<Duration>
Return the maximum initial response timeout interval. Default: None (e.g. unset)
sourcepub fn body_timeout(&self) -> Option<Duration>
pub fn body_timeout(&self) -> Option<Duration>
Return the maximum streaming body timeout interval. Default: 60 seconds