pub struct ValidationRules {
pub max_message_size: usize,
pub max_batch_size: usize,
pub max_string_length: usize,
pub max_array_length: usize,
pub max_object_depth: usize,
pub uri_regex: Regex,
pub method_name_regex: Regex,
pub required_fields: HashMap<String, HashSet<String>>,
}
Expand description
Validation rules configuration
Fields§
§max_message_size: usize
Maximum message size in bytes
max_batch_size: usize
Maximum batch size
max_string_length: usize
Maximum string length
max_array_length: usize
Maximum array length
max_object_depth: usize
Maximum object depth
uri_regex: Regex
URI validation regex
method_name_regex: Regex
Method name validation regex
required_fields: HashMap<String, HashSet<String>>
Required fields per message type
Trait Implementations§
Source§impl Clone for ValidationRules
impl Clone for ValidationRules
Source§fn clone(&self) -> ValidationRules
fn clone(&self) -> ValidationRules
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 ValidationRules
impl Debug for ValidationRules
Auto Trait Implementations§
impl Freeze for ValidationRules
impl RefUnwindSafe for ValidationRules
impl Send for ValidationRules
impl Sync for ValidationRules
impl Unpin for ValidationRules
impl UnwindSafe for ValidationRules
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