pub struct IdentityLockboxValidator {
pub comment: String,
pub max_len: u32,
pub min_len: u32,
pub size: bool,
}Expand description
Validator for a IdentityLockbox.
This validator will only pass a IdentityLockbox value. Validation passes if:
- The number of bytes in the lockbox is less than or equal to
max_len - The number of bytes in the lockbox is greater than or equal to
min_len
§Defaults
Fields that aren’t specified for the validator use their defaults instead. The defaults for each field are:
- comment: “”
- max_len: u32::MAX
- min_len: 0
- size: false
§Query Checking
Queries for lockboxes are only allowed to use non default values for max_len and
min_len if size is set in the schema’s validator.
Fields§
§comment: StringAn optional comment explaining the validator.
max_len: u32Set the maximum allowed number of bytes.
min_len: u32Set the minimum allowed number of bytes.
size: boolIf true, queries against matching spots may set the min_len and max_len values
to non-defaults.
Implementations§
Trait Implementations§
Source§impl Clone for IdentityLockboxValidator
impl Clone for IdentityLockboxValidator
Source§fn clone(&self) -> IdentityLockboxValidator
fn clone(&self) -> IdentityLockboxValidator
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 IdentityLockboxValidator
impl Debug for IdentityLockboxValidator
Source§impl Default for IdentityLockboxValidator
impl Default for IdentityLockboxValidator
Source§impl<'de> Deserialize<'de> for IdentityLockboxValidatorwhere
IdentityLockboxValidator: Default,
impl<'de> Deserialize<'de> for IdentityLockboxValidatorwhere
IdentityLockboxValidator: Default,
Source§fn 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
Source§impl PartialEq for IdentityLockboxValidator
impl PartialEq for IdentityLockboxValidator
Source§impl Serialize for IdentityLockboxValidator
impl Serialize for IdentityLockboxValidator
impl StructuralPartialEq for IdentityLockboxValidator
Auto Trait Implementations§
impl Freeze for IdentityLockboxValidator
impl RefUnwindSafe for IdentityLockboxValidator
impl Send for IdentityLockboxValidator
impl Sync for IdentityLockboxValidator
impl Unpin for IdentityLockboxValidator
impl UnwindSafe for IdentityLockboxValidator
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