Enum iroh_dns_server::http::RateLimitConfig  
source · pub enum RateLimitConfig {
    Disabled,
    Simple,
    Smart,
}Expand description
Config for http server rate limit.
Variants§
Disabled
Disable rate limit.
Simple
Enable rate limit based on the connection’s peer IP address.
https://docs.rs/tower_governor/latest/tower_governor/key_extractor/struct.PeerIpKeyExtractor.html
Smart
Enable rate limit based on headers commonly used by reverse proxies.
Uses headers commonly used by reverse proxies to extract the original IP address, falling back to the connection’s peer IP address. https://docs.rs/tower_governor/latest/tower_governor/key_extractor/struct.SmartIpKeyExtractor.html
Trait Implementations§
source§impl Clone for RateLimitConfig
 
impl Clone for RateLimitConfig
source§fn clone(&self) -> RateLimitConfig
 
fn clone(&self) -> RateLimitConfig
Returns a copy 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 RateLimitConfig
 
impl Debug for RateLimitConfig
source§impl Default for &RateLimitConfig
 
impl Default for &RateLimitConfig
source§impl Default for RateLimitConfig
 
impl Default for RateLimitConfig
source§fn default() -> RateLimitConfig
 
fn default() -> RateLimitConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RateLimitConfig
 
impl<'de> Deserialize<'de> for RateLimitConfig
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
Auto Trait Implementations§
impl Freeze for RateLimitConfig
impl RefUnwindSafe for RateLimitConfig
impl Send for RateLimitConfig
impl Sync for RateLimitConfig
impl Unpin for RateLimitConfig
impl UnwindSafe for RateLimitConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
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