Struct fog_pack::validator::MultiValidator [−][src]
“Multi” validator that checks with several validators at once.
This validator will accept any value that passes at least one of its contained validators. This can be used like an “any of” operator, or a logical OR of validators.
When going through the contained validators, some rules are followed to avoid possible cyclic references:
- Contained Multi-validators are skipped
- Contained Ref validators that refer to a Multi-validator are skipped.
- Contained Ref validators that refer to a Ref validator are skipped.
More succintly, the banned sequences are: Multi->Multi, Multi->Ref->Multi, Multi->Ref->Ref.
Query Checking
The validator for a query must be accepted by at least one of the validators in the Multi-validator. Contained validators that violate the cyclic reference rules are skipped (see above).
Implementations
impl MultiValidator[src]
pub fn new() -> Self[src]
Make a new validator with the default configuration.
pub fn push(self, validator: Validator) -> Self[src]
Add a new validator to the list.
pub fn build(self) -> Validator[src]
Build this into a Validator enum.
pub fn iter(&self) -> Iter<'_, Validator>[src]
Trait Implementations
impl Clone for MultiValidator[src]
fn clone(&self) -> MultiValidator[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for MultiValidator[src]
impl Default for MultiValidator[src]
impl<'de> Deserialize<'de> for MultiValidator[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl PartialEq<MultiValidator> for MultiValidator[src]
fn eq(&self, other: &MultiValidator) -> bool[src]
fn ne(&self, other: &MultiValidator) -> bool[src]
impl Serialize for MultiValidator[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl StructuralPartialEq for MultiValidator[src]
Auto Trait Implementations
impl RefUnwindSafe for MultiValidator
impl Send for MultiValidator
impl Sync for MultiValidator
impl Unpin for MultiValidator
impl UnwindSafe for MultiValidator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,