#[non_exhaustive]pub struct ValueValidation {
pub values: Vec<String>,
/* private fields */
}Expand description
Validation based on a list of allowed values.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.values: Vec<String>Required. List of allowed values for the parameter.
Implementations§
Source§impl ValueValidation
impl ValueValidation
pub fn new() -> Self
Sourcepub fn set_values<T, V>(self, v: T) -> Self
pub fn set_values<T, V>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for ValueValidation
impl Clone for ValueValidation
Source§fn clone(&self) -> ValueValidation
fn clone(&self) -> ValueValidation
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 ValueValidation
impl Debug for ValueValidation
Source§impl Default for ValueValidation
impl Default for ValueValidation
Source§fn default() -> ValueValidation
fn default() -> ValueValidation
Returns the “default value” for a type. Read more
Source§impl Message for ValueValidation
impl Message for ValueValidation
Source§impl PartialEq for ValueValidation
impl PartialEq for ValueValidation
impl StructuralPartialEq for ValueValidation
Auto Trait Implementations§
impl Freeze for ValueValidation
impl RefUnwindSafe for ValueValidation
impl Send for ValueValidation
impl Sync for ValueValidation
impl Unpin for ValueValidation
impl UnsafeUnpin for ValueValidation
impl UnwindSafe for ValueValidation
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