pub enum MiddlewareValidationRule {
Any(Vec<Box<MiddlewareValidationRule>>),
All(Vec<Box<MiddlewareValidationRule>>),
Not(Box<MiddlewareValidationRule>),
StatusCode(u16),
}Variants§
Any(Vec<Box<MiddlewareValidationRule>>)
if any of the rules included pass it is valid.
All(Vec<Box<MiddlewareValidationRule>>)
only if all the rules pass is it valid.
Not(Box<MiddlewareValidationRule>)
if the rule is not true then it is valid.
StatusCode(u16)
status code that will allow the request to proceed.
Trait Implementations§
Source§impl Clone for MiddlewareValidationRule
impl Clone for MiddlewareValidationRule
Source§fn clone(&self) -> MiddlewareValidationRule
fn clone(&self) -> MiddlewareValidationRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for MiddlewareValidationRule
impl ComposeSchema for MiddlewareValidationRule
Source§impl Debug for MiddlewareValidationRule
impl Debug for MiddlewareValidationRule
Source§impl<'de> Deserialize<'de> for MiddlewareValidationRule
impl<'de> Deserialize<'de> for MiddlewareValidationRule
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 JsonSchema for MiddlewareValidationRule
impl JsonSchema for MiddlewareValidationRule
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for MiddlewareValidationRule
impl Serialize for MiddlewareValidationRule
Auto Trait Implementations§
impl Freeze for MiddlewareValidationRule
impl RefUnwindSafe for MiddlewareValidationRule
impl Send for MiddlewareValidationRule
impl Sync for MiddlewareValidationRule
impl Unpin for MiddlewareValidationRule
impl UnsafeUnpin for MiddlewareValidationRule
impl UnwindSafe for MiddlewareValidationRule
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