pub struct JsonValidatorBuilder { /* private fields */ }Expand description
Builder for creating JSON validation instances
The builder receives configuration values directly and constructs constraints internally.
Implementations§
Source§impl JsonValidatorBuilder
impl JsonValidatorBuilder
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Sets the maximum depth of nested containers
Sourcepub fn with_max_array_length(self, length: usize) -> Self
pub fn with_max_array_length(self, length: usize) -> Self
Sets the maximum number of elements in arrays
Sourcepub fn with_max_string_length(self, length: usize) -> Self
pub fn with_max_string_length(self, length: usize) -> Self
Sets the maximum length of string values
Sourcepub fn with_max_object_entries(self, count: usize) -> Self
pub fn with_max_object_entries(self, count: usize) -> Self
Sets the maximum number of entries in objects
Sourcepub fn with_max_key_length(self, length: usize) -> Self
pub fn with_max_key_length(self, length: usize) -> Self
Sets the maximum length of key names in objects
Sourcepub fn build(self) -> JsonValidator
pub fn build(self) -> JsonValidator
Builds the validation instance with the specified configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsonValidatorBuilder
impl RefUnwindSafe for JsonValidatorBuilder
impl Send for JsonValidatorBuilder
impl Sync for JsonValidatorBuilder
impl Unpin for JsonValidatorBuilder
impl UnsafeUnpin for JsonValidatorBuilder
impl UnwindSafe for JsonValidatorBuilder
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
Source§impl<C, T> Extract<T> for Cwhere
T: FromContext<C>,
impl<C, T> Extract<T> for Cwhere
T: FromContext<C>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more