Struct body_image::Tuner

source ·
pub struct Tuner { /* private fields */ }
Expand description

A builder for Tunables. Invariants are asserted in the various setters and finish.

Implementations§

New Tuner with all Tunables defaults.

Set the maximum body size in bytes allowed in RAM.

Set the maximum body size in bytes allowed in any form (RAM or file). This must be at least as large as max_body_ram, as asserted on finish.

Set the buffer size in bytes to use when buffering to RAM.

Set the buffer size in bytes to use when buffering to/from the file-system.

Set the size estimate, as an integer multiple of the encoded buffer size, for the deflate compression algorithm.

Set the size estimate, as an integer multiple of the encoded buffer size, for the gzip compression algorithm.

Set the size estimate, as an integer multiple of the encoded buffer size, for the Brotli compression algorithm.

Set the path in which to write temporary files.

Set the maximum initial response timeout interval.

Unset (e.g. disable) response timeout

Set the maximum streaming body timeout interval.

Unset (e.g. disable) body timeout

Finish building, asserting any remaining invariants, and return a new Tunables instance.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. 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.