pub struct RequestConfig { /* private fields */ }Expand description
Configuration for HTTP request parsing security limits.
This struct defines various limits and constraints to prevent denial-of-service attacks and other security vulnerabilities when parsing HTTP requests.
Implementations§
Source§impl RequestConfig
impl RequestConfig
Sourcepub fn new() -> RequestConfig
pub fn new() -> RequestConfig
Creates a new RequestConfig with default values.
§Returns
RequestConfig- A new config instance with default values.
Sourcepub fn high_security() -> RequestConfig
pub fn high_security() -> RequestConfig
Creates a config optimized for high-security environments.
This configuration uses more restrictive limits to provide maximum protection against various attacks.
§Returns
RequestConfig- A new config with high-security settings.
Source§impl RequestConfig
impl RequestConfig
pub fn get_buffer_size(&self) -> &usize
pub fn get_mut_buffer_size(&mut self) -> &mut usize
pub fn set_buffer_size(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_request_line_length(&self) -> &usize
pub fn get_mut_max_request_line_length(&mut self) -> &mut usize
pub fn set_max_request_line_length(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_path_length(&self) -> &usize
pub fn get_mut_max_path_length(&mut self) -> &mut usize
pub fn set_max_path_length(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_query_length(&self) -> &usize
pub fn get_mut_max_query_length(&mut self) -> &mut usize
pub fn set_max_query_length(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_header_line_length(&self) -> &usize
pub fn get_mut_max_header_line_length(&mut self) -> &mut usize
pub fn set_max_header_line_length(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_header_count(&self) -> &usize
pub fn get_mut_max_header_count(&mut self) -> &mut usize
pub fn set_max_header_count(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_header_key_length(&self) -> &usize
pub fn get_mut_max_header_key_length(&mut self) -> &mut usize
pub fn set_max_header_key_length(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_header_value_length(&self) -> &usize
pub fn get_mut_max_header_value_length(&mut self) -> &mut usize
pub fn set_max_header_value_length(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_body_size(&self) -> &usize
pub fn get_mut_max_body_size(&mut self) -> &mut usize
pub fn set_max_body_size(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_ws_frame_size(&self) -> &usize
pub fn get_mut_max_ws_frame_size(&mut self) -> &mut usize
pub fn set_max_ws_frame_size(&mut self, val: usize) -> &mut RequestConfig
pub fn get_max_ws_frames(&self) -> &usize
pub fn get_mut_max_ws_frames(&mut self) -> &mut usize
pub fn set_max_ws_frames(&mut self, val: usize) -> &mut RequestConfig
pub fn get_http_read_timeout_ms(&self) -> &u64
pub fn get_mut_http_read_timeout_ms(&mut self) -> &mut u64
pub fn set_http_read_timeout_ms(&mut self, val: u64) -> &mut RequestConfig
pub fn get_ws_read_timeout_ms(&self) -> &u64
pub fn get_mut_ws_read_timeout_ms(&mut self) -> &mut u64
pub fn set_ws_read_timeout_ms(&mut self, val: u64) -> &mut RequestConfig
Trait Implementations§
Source§impl Clone for RequestConfig
impl Clone for RequestConfig
Source§fn clone(&self) -> RequestConfig
fn clone(&self) -> RequestConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestConfig
impl Debug for RequestConfig
Source§impl Default for RequestConfig
impl Default for RequestConfig
Source§fn default() -> RequestConfig
fn default() -> RequestConfig
Creates a RequestConfig with secure default values.
§Returns
RequestConfig- A new config instance with secure defaults.
Source§impl<'de> Deserialize<'de> for RequestConfig
impl<'de> Deserialize<'de> for RequestConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RequestConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RequestConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RequestConfig
impl Display for RequestConfig
Source§impl PartialEq for RequestConfig
impl PartialEq for RequestConfig
Source§impl Serialize for RequestConfig
impl Serialize for RequestConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for RequestConfig
impl Eq for RequestConfig
impl StructuralPartialEq for RequestConfig
Auto Trait Implementations§
impl Freeze for RequestConfig
impl RefUnwindSafe for RequestConfig
impl Send for RequestConfig
impl Sync for RequestConfig
impl Unpin for RequestConfig
impl UnwindSafe for RequestConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more