pub struct ParameterConstraints {
pub allowed_pattern: Option<String>,
pub allowed_values: Option<Vec<String>>,
pub constraint_description: Option<String>,
pub max_length: Option<String>,
pub max_value: Option<String>,
pub min_length: Option<String>,
pub min_value: Option<String>,
}
Expand description
The constraints that the administrator has put on the parameter.
Fields
allowed_pattern: Option<String>
A regular expression that represents the patterns that allow for String
types. The pattern must match the entire parameter value provided.
allowed_values: Option<Vec<String>>
The values that the administrator has allowed for the parameter.
constraint_description: Option<String>
A string that explains a constraint when the constraint is violated. For example, without a constraint description, a parameter that has an allowed pattern of [A-Za-z0-9]+
displays the following error message when the user specifies an invalid value:
Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+
By adding a constraint description, such as must only contain letters (uppercase and lowercase) and numbers, you can display the following customized error message:
Malformed input-Parameter MyParameter must only contain uppercase and lowercase letters and numbers.
max_length: Option<String>
An integer value that determines the largest number of characters you want to allow for String
types.
max_value: Option<String>
A numeric value that determines the largest numeric value you want to allow for Number
types.
min_length: Option<String>
An integer value that determines the smallest number of characters you want to allow for String
types.
min_value: Option<String>
A numeric value that determines the smallest numeric value you want to allow for Number
types.
Trait Implementations
sourceimpl Clone for ParameterConstraints
impl Clone for ParameterConstraints
sourcefn clone(&self) -> ParameterConstraints
fn clone(&self) -> ParameterConstraints
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ParameterConstraints
impl Debug for ParameterConstraints
sourceimpl Default for ParameterConstraints
impl Default for ParameterConstraints
sourcefn default() -> ParameterConstraints
fn default() -> ParameterConstraints
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ParameterConstraints
impl<'de> Deserialize<'de> for ParameterConstraints
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<ParameterConstraints> for ParameterConstraints
impl PartialEq<ParameterConstraints> for ParameterConstraints
sourcefn eq(&self, other: &ParameterConstraints) -> bool
fn eq(&self, other: &ParameterConstraints) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ParameterConstraints) -> bool
fn ne(&self, other: &ParameterConstraints) -> bool
This method tests for !=
.
impl StructuralPartialEq for ParameterConstraints
Auto Trait Implementations
impl RefUnwindSafe for ParameterConstraints
impl Send for ParameterConstraints
impl Sync for ParameterConstraints
impl Unpin for ParameterConstraints
impl UnwindSafe for ParameterConstraints
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more