Struct fastly::limits::RequestLimits
source · 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
Limit | Default value |
---|---|
Header name size | DEFAULT_MAX_HEADER_NAME_BYTES |
Header value size | DEFAULT_MAX_HEADER_VALUE_BYTES |
Method size | DEFAULT_MAX_METHOD_BYTES |
URL size | DEFAULT_MAX_URL_BYTES |
Implementations§
source§impl RequestLimits
impl RequestLimits
sourcepub fn set_all_default()
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn set_all_default()
Set all request limits to their default values.
sourcepub fn set_all_disabled()
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn set_all_disabled()
Disable all request limits.
Note that the overall WebAssembly heap size limit still applies.
sourcepub fn get_max_header_name_bytes() -> Option<usize>
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn get_max_header_name_bytes() -> Option<usize>
Get the current request header name size limit.
sourcepub fn set_max_header_name_bytes(max: Option<usize>)
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn set_max_header_name_bytes(max: Option<usize>)
Set the request header name size limit.
sourcepub fn get_max_header_value_bytes() -> Option<usize>
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn get_max_header_value_bytes() -> Option<usize>
Get the current request header value size limit.
sourcepub fn set_max_header_value_bytes(max: Option<usize>)
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn set_max_header_value_bytes(max: Option<usize>)
Set the request header value size limit.
sourcepub fn get_max_method_bytes() -> Option<usize>
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn get_max_method_bytes() -> Option<usize>
Get the current request method size limit.
sourcepub fn set_max_method_bytes(max: Option<usize>)
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn set_max_method_bytes(max: Option<usize>)
Set the request method size limit.
sourcepub fn get_max_url_bytes() -> Option<usize>
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn get_max_url_bytes() -> Option<usize>
Get the current request URL size limit.
sourcepub fn set_max_url_bytes(max: Option<usize>)
👎Deprecated since 0.9.11: Wasm-based control of these limits will be removed in future versions. Fastly’s network services resource limits do and will continue to apply; see https://docs.fastly.com/en/guides/network-services-resource-limits#request-and-response-limits
pub fn set_max_url_bytes(max: Option<usize>)
Set the request URL size limit.
Trait Implementations§
source§impl Clone for RequestLimits
impl Clone for RequestLimits
source§fn clone(&self) -> RequestLimits
fn clone(&self) -> RequestLimits
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more