pub struct RateLimitingRuleConditions {
pub continent: Vec<RateLimitingRuleConditionsContinentItem>,
pub country: Vec<RateLimitingRuleConditionsCountryItem>,
pub method: Vec<RateLimitingRuleConditionsMethodItem>,
pub path: Option<String>,
pub regex: bool,
}
Expand description
Conditions that must be met for this rule to apply.
JSON schema
{
"description": "Conditions that must be met for this rule to apply.",
"type": "object",
"properties": {
"continent": {
"description": "Continents that this rule applies to.",
"type": "array",
"items": {
"type": "string",
"enum": [
"AF",
"AN",
"AS",
"EU",
"NA",
"OC",
"SA"
]
}
},
"country": {
"description": "Countries (ISO 3166-1 alpha-2 codes) that this rule applies to.",
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"method": {
"description": "HTTP methods that this rule applies to.",
"type": "array",
"items": {
"type": "string",
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"TRACE"
]
}
},
"path": {
"description": "Path pattern to match. Can be exact path or regex pattern.",
"type": "string"
},
"regex": {
"description": "Whether the path is a regex pattern.",
"default": false,
"type": "boolean"
}
}
}
Fields§
§continent: Vec<RateLimitingRuleConditionsContinentItem>
Continents that this rule applies to.
country: Vec<RateLimitingRuleConditionsCountryItem>
Countries (ISO 3166-1 alpha-2 codes) that this rule applies to.
method: Vec<RateLimitingRuleConditionsMethodItem>
HTTP methods that this rule applies to.
path: Option<String>
Path pattern to match. Can be exact path or regex pattern.
regex: bool
Whether the path is a regex pattern.
Implementations§
Source§impl RateLimitingRuleConditions
impl RateLimitingRuleConditions
pub fn builder() -> RateLimitingRuleConditions
Trait Implementations§
Source§impl Clone for RateLimitingRuleConditions
impl Clone for RateLimitingRuleConditions
Source§fn clone(&self) -> RateLimitingRuleConditions
fn clone(&self) -> RateLimitingRuleConditions
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 RateLimitingRuleConditions
impl Debug for RateLimitingRuleConditions
Source§impl Default for RateLimitingRuleConditions
impl Default for RateLimitingRuleConditions
Source§impl<'de> Deserialize<'de> for RateLimitingRuleConditions
impl<'de> Deserialize<'de> for RateLimitingRuleConditions
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 From<&RateLimitingRuleConditions> for RateLimitingRuleConditions
impl From<&RateLimitingRuleConditions> for RateLimitingRuleConditions
Source§fn from(value: &RateLimitingRuleConditions) -> Self
fn from(value: &RateLimitingRuleConditions) -> Self
Converts to this type from the input type.
Source§impl From<RateLimitingRuleConditions> for RateLimitingRuleConditions
impl From<RateLimitingRuleConditions> for RateLimitingRuleConditions
Source§fn from(value: RateLimitingRuleConditions) -> Self
fn from(value: RateLimitingRuleConditions) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for RateLimitingRuleConditions
impl JsonSchema for RateLimitingRuleConditions
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl TryFrom<RateLimitingRuleConditions> for RateLimitingRuleConditions
impl TryFrom<RateLimitingRuleConditions> for RateLimitingRuleConditions
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: RateLimitingRuleConditions) -> Result<Self, ConversionError>
fn try_from(value: RateLimitingRuleConditions) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for RateLimitingRuleConditions
impl RefUnwindSafe for RateLimitingRuleConditions
impl Send for RateLimitingRuleConditions
impl Sync for RateLimitingRuleConditions
impl Unpin for RateLimitingRuleConditions
impl UnwindSafe for RateLimitingRuleConditions
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