pub struct LimitCountBuilder {Show 22 fields
pub count: Option<i64>,
pub time_window: Option<i64>,
pub key_type: Option<LimitCountKeyType>,
pub key: Option<String>,
pub rejected_code: Option<i64>,
pub rejected_msg: Option<String>,
pub policy: Option<LimitCountPolicy>,
pub allow_degradation: Option<bool>,
pub show_limit_quota_headers: Option<bool>,
pub group: Option<String>,
pub redis_host: Option<String>,
pub redis_port: Option<i64>,
pub redis_username: Option<String>,
pub redis_password: Option<String>,
pub redis_ssl: Option<bool>,
pub redis_ssl_verify: Option<bool>,
pub redis_database: Option<i64>,
pub redis_timeout: Option<i64>,
pub redis_cluster_nodes: Option<Vec<String>>,
pub redis_cluster_name: Option<String>,
pub redis_cluster_ssl: Option<bool>,
pub redis_cluster_ssl_verify: Option<bool>,
}Expand description
Builder to create a LimitCount
Fields§
§count: Option<i64>§time_window: Option<i64>§key_type: Option<LimitCountKeyType>§key: Option<String>§rejected_code: Option<i64>§rejected_msg: Option<String>§policy: Option<LimitCountPolicy>§allow_degradation: Option<bool>§show_limit_quota_headers: Option<bool>§group: Option<String>§redis_host: Option<String>§redis_port: Option<i64>§redis_username: Option<String>§redis_password: Option<String>§redis_ssl: Option<bool>§redis_ssl_verify: Option<bool>§redis_database: Option<i64>§redis_timeout: Option<i64>§redis_cluster_nodes: Option<Vec<String>>§redis_cluster_name: Option<String>§redis_cluster_ssl: Option<bool>§redis_cluster_ssl_verify: Option<bool>Implementations§
Source§impl LimitCountBuilder
impl LimitCountBuilder
pub fn new() -> Self
Sourcepub fn with_count(self, count: i64) -> Self
pub fn with_count(self, count: i64) -> Self
Maximum number of requests to allow.
pub fn with_time_window(self, time_window: i64) -> Self
pub fn with_key_type(self, key_type: LimitCountKeyType) -> Self
pub fn with_key(self, key: impl Into<String>) -> Self
pub fn with_rejected_code(self, rejected_code: i64) -> Self
pub fn with_rejected_msg(self, rejected_msg: impl Into<String>) -> Self
pub fn with_policy(self, policy: LimitCountPolicy) -> Self
pub fn with_allow_degradation(self, allow_degradation: bool) -> Self
pub fn with_show_limit_quota_headers( self, show_limit_quota_headers: bool, ) -> Self
pub fn with_group(self, group: impl Into<String>) -> Self
pub fn with_redis_host(self, redis_host: impl Into<String>) -> Self
pub fn with_redis_port(self, redis_port: i64) -> Self
pub fn with_redis_username(self, redis_username: impl Into<String>) -> Self
pub fn with_redis_password(self, redis_password: impl Into<String>) -> Self
pub fn with_redis_ssl(self, redis_ssl: bool) -> Self
pub fn with_redis_ssl_verify(self, redis_ssl_verify: bool) -> Self
pub fn with_redis_database(self, redis_database: i64) -> Self
pub fn with_redis_timeout(self, redis_timeout: i64) -> Self
pub fn with_redis_cluster_nodes(self, redis_cluster_nodes: Vec<String>) -> Self
pub fn with_redis_cluster_name( self, redis_cluster_name: impl Into<String>, ) -> Self
pub fn with_redis_cluster_ssl(self, redis_cluster_ssl: bool) -> Self
pub fn with_redis_cluster_ssl_verify( self, redis_cluster_ssl_verify: bool, ) -> Self
pub fn build(self) -> Result<LimitCount, ApisixClientError>
Trait Implementations§
Source§impl Clone for LimitCountBuilder
impl Clone for LimitCountBuilder
Source§fn clone(&self) -> LimitCountBuilder
fn clone(&self) -> LimitCountBuilder
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 LimitCountBuilder
impl Debug for LimitCountBuilder
Source§impl Default for LimitCountBuilder
impl Default for LimitCountBuilder
Source§fn default() -> LimitCountBuilder
fn default() -> LimitCountBuilder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LimitCountBuilder
impl<'de> Deserialize<'de> for LimitCountBuilder
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<LimitCount> for LimitCountBuilder
impl From<LimitCount> for LimitCountBuilder
Source§fn from(item: LimitCount) -> Self
fn from(item: LimitCount) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LimitCountBuilder
impl PartialEq for LimitCountBuilder
Source§impl Serialize for LimitCountBuilder
impl Serialize for LimitCountBuilder
Source§impl Validate for LimitCountBuilder
impl Validate for LimitCountBuilder
Source§impl<'v_a> ValidateArgs<'v_a> for LimitCountBuilder
impl<'v_a> ValidateArgs<'v_a> for LimitCountBuilder
impl StructuralPartialEq for LimitCountBuilder
Auto Trait Implementations§
impl Freeze for LimitCountBuilder
impl RefUnwindSafe for LimitCountBuilder
impl Send for LimitCountBuilder
impl Sync for LimitCountBuilder
impl Unpin for LimitCountBuilder
impl UnwindSafe for LimitCountBuilder
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