pub struct LockIdValidator {
pub comment: String,
pub in_list: Vec<LockId>,
pub nin_list: Vec<LockId>,
pub query: bool,
}Expand description
Validator for a cryptographic LockId.
This validator will only pass a LockId value. Validation passes if:
- If the
inlist is not empty, the LockId must be among the ones in the list. - The LockId must not be among the ones in the
ninlist.
§Defaults
Fields that aren’t specified for the validator use their defaults instead. The defaults for each field are:
- comment: “”
- in_list: empty
- nin_list: empty
- query: false
Fields§
§comment: StringAn optional comment explaining the validator.
in_list: Vec<LockId>A vector of specific allowed values, stored under the in field. If empty, this vector is not checked against.
nin_list: Vec<LockId>A vector of specific unallowed values, stored under the nin field.
query: boolIf true, queries against matching spots may have values in the in or nin lists.
Implementations§
Trait Implementations§
Source§impl Clone for LockIdValidator
impl Clone for LockIdValidator
Source§fn clone(&self) -> LockIdValidator
fn clone(&self) -> LockIdValidator
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 LockIdValidator
impl Debug for LockIdValidator
Source§impl Default for LockIdValidator
impl Default for LockIdValidator
Source§fn default() -> LockIdValidator
fn default() -> LockIdValidator
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LockIdValidatorwhere
LockIdValidator: Default,
impl<'de> Deserialize<'de> for LockIdValidatorwhere
LockIdValidator: 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 LockIdValidator
impl PartialEq for LockIdValidator
Source§impl Serialize for LockIdValidator
impl Serialize for LockIdValidator
impl StructuralPartialEq for LockIdValidator
Auto Trait Implementations§
impl Freeze for LockIdValidator
impl RefUnwindSafe for LockIdValidator
impl Send for LockIdValidator
impl Sync for LockIdValidator
impl Unpin for LockIdValidator
impl UnwindSafe for LockIdValidator
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