pub struct RequestLimits { /* private fields */ }
Expand description

The limits for components of an HTTP request.

This is primarily relevant for the client request, and should be set before the client request is read with a method like Request::from_client().

Since the fastly::main attribute macro automatically reads the client request before application code has a chance to run, you should not use the macro if you need to customize the limits.

Default values

LimitDefault value
Header name sizeDEFAULT_MAX_HEADER_NAME_BYTES
Header value sizeDEFAULT_MAX_HEADER_VALUE_BYTES
Method sizeDEFAULT_MAX_METHOD_BYTES
URL sizeDEFAULT_MAX_URL_BYTES

Implementations

Set all request limits to their default values.

Disable all request limits.

Note that the overall WebAssembly heap size limit still applies.

Get the current request header name size limit.

Set the request header name size limit.

Get the current request header value size limit.

Set the request header value size limit.

Get the current request method size limit.

Set the request method size limit.

Get the current request URL size limit.

Set the request URL size limit.

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

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.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.