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§

Construct with default values.

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.

Return the maximum body size in bytes allowed in any form (RAM or file). Default: 1 GiB.

Return the buffer size in bytes to use when buffering to RAM. Default: 8 KiB.

Return the buffer size in bytes to use when buffering to/from the file-system. Default: 64 KiB.

Return the size estimate, as an integer multiple of the encoded buffer size, for the deflate compression algorithm. Default: 4.

Return the size estimate, as an integer multiple of the encoded buffer size, for the gzip compression algorithm. Default: 5.

Return the size estimate, as an integer multiple of the encoded buffer size, for the Brotli compression algorithm. Default: 6.

Return the directory path in which to write temporary (BodyImage) files. Default: std::env::temp_dir()

Return the maximum initial response timeout interval. Default: None (e.g. unset)

Return the maximum streaming body timeout interval. Default: 60 seconds

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.