pub struct JsonConfig { /* private fields */ }Expand description
Configuration for JSON request body parsing.
This struct controls how JSON payloads are processed, including size limits and content-type validation.
§Default Settings
- Maximum body size: 512,000 bytes (500 KB)
- Content-type validation: None (accepts any content-type)
§Example
use foxtive_ntex::http::server::JsonConfig;
// Use default configuration (50 KB limit)
let config = JsonConfig::default();
// Custom size limit
let config = JsonConfig::default().limit(1024 * 1024); // 1 MBImplementations§
Trait Implementations§
Source§impl Clone for JsonConfig
impl Clone for JsonConfig
Source§fn clone(&self) -> JsonConfig
fn clone(&self) -> JsonConfig
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 moreAuto Trait Implementations§
impl Freeze for JsonConfig
impl RefUnwindSafe for JsonConfig
impl Send for JsonConfig
impl Sync for JsonConfig
impl Unpin for JsonConfig
impl UnsafeUnpin for JsonConfig
impl UnwindSafe for JsonConfig
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