#[non_exhaustive]pub struct FieldValidationConfigurationBuilder { /* private fields */ }Expand description
A builder for FieldValidationConfiguration.
Implementations§
source§impl FieldValidationConfigurationBuilder
impl FieldValidationConfigurationBuilder
sourcepub fn type(self, input: impl Into<String>) -> Self
pub fn type(self, input: impl Into<String>) -> Self
The validation to perform on an object type.
sourcepub fn set_type(self, input: Option<String>) -> Self
pub fn set_type(self, input: Option<String>) -> Self
The validation to perform on an object type.
sourcepub fn str_values(self, input: impl Into<String>) -> Self
pub fn str_values(self, input: impl Into<String>) -> Self
Appends an item to str_values.
To override the contents of this collection use set_str_values.
The validation to perform on a string value.
sourcepub fn set_str_values(self, input: Option<Vec<String>>) -> Self
pub fn set_str_values(self, input: Option<Vec<String>>) -> Self
The validation to perform on a string value.
sourcepub fn get_str_values(&self) -> &Option<Vec<String>>
pub fn get_str_values(&self) -> &Option<Vec<String>>
The validation to perform on a string value.
sourcepub fn num_values(self, input: i32) -> Self
pub fn num_values(self, input: i32) -> Self
Appends an item to num_values.
To override the contents of this collection use set_num_values.
The validation to perform on a number value.
sourcepub fn set_num_values(self, input: Option<Vec<i32>>) -> Self
pub fn set_num_values(self, input: Option<Vec<i32>>) -> Self
The validation to perform on a number value.
sourcepub fn get_num_values(&self) -> &Option<Vec<i32>>
pub fn get_num_values(&self) -> &Option<Vec<i32>>
The validation to perform on a number value.
sourcepub fn validation_message(self, input: impl Into<String>) -> Self
pub fn validation_message(self, input: impl Into<String>) -> Self
The validation message to display.
sourcepub fn set_validation_message(self, input: Option<String>) -> Self
pub fn set_validation_message(self, input: Option<String>) -> Self
The validation message to display.
sourcepub fn get_validation_message(&self) -> &Option<String>
pub fn get_validation_message(&self) -> &Option<String>
The validation message to display.
sourcepub fn build(self) -> Result<FieldValidationConfiguration, BuildError>
pub fn build(self) -> Result<FieldValidationConfiguration, BuildError>
Consumes the builder and constructs a FieldValidationConfiguration.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for FieldValidationConfigurationBuilder
impl Clone for FieldValidationConfigurationBuilder
source§fn clone(&self) -> FieldValidationConfigurationBuilder
fn clone(&self) -> FieldValidationConfigurationBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for FieldValidationConfigurationBuilder
impl Default for FieldValidationConfigurationBuilder
source§fn default() -> FieldValidationConfigurationBuilder
fn default() -> FieldValidationConfigurationBuilder
source§impl PartialEq for FieldValidationConfigurationBuilder
impl PartialEq for FieldValidationConfigurationBuilder
source§fn eq(&self, other: &FieldValidationConfigurationBuilder) -> bool
fn eq(&self, other: &FieldValidationConfigurationBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for FieldValidationConfigurationBuilder
Auto Trait Implementations§
impl Freeze for FieldValidationConfigurationBuilder
impl RefUnwindSafe for FieldValidationConfigurationBuilder
impl Send for FieldValidationConfigurationBuilder
impl Sync for FieldValidationConfigurationBuilder
impl Unpin for FieldValidationConfigurationBuilder
impl UnwindSafe for FieldValidationConfigurationBuilder
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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