pub struct IdempotencyConfig { /* private fields */ }Expand description
Configuration controlling TTLs, memory limits, methods, and required prefixes for IdempotencyPlugin.
Implementations§
Source§impl IdempotencyConfig
Fluent configuration builders for IdempotencyConfig.
impl IdempotencyConfig
Fluent configuration builders for IdempotencyConfig.
Sourcepub fn with_header_name<S>(self, name: S) -> Self
pub fn with_header_name<S>(self, name: S) -> Self
Sourcepub fn with_ttl_ms(self, ttl_ms: u64) -> Self
pub fn with_ttl_ms(self, ttl_ms: u64) -> Self
Sourcepub fn with_in_flight_ttl_ms(self, in_flight_ttl_ms: u64) -> Self
pub fn with_in_flight_ttl_ms(self, in_flight_ttl_ms: u64) -> Self
Sourcepub fn with_limits(self, max_entries: usize, max_bytes: usize) -> Self
pub fn with_limits(self, max_entries: usize, max_bytes: usize) -> Self
Sourcepub fn with_require_key_prefixes<I, S>(self, prefixes: I) -> Self
pub fn with_require_key_prefixes<I, S>(self, prefixes: I) -> Self
Sourcepub fn with_methods(self, methods: Vec<Method>) -> Self
pub fn with_methods(self, methods: Vec<Method>) -> Self
Sourcepub fn with_cache_server_errors(self, cache_server_errors: bool) -> Self
pub fn with_cache_server_errors(self, cache_server_errors: bool) -> Self
Source§impl IdempotencyConfig
impl IdempotencyConfig
pub fn get_header_name(&self) -> &String
pub fn get_mut_header_name(&mut self) -> &mut String
pub fn set_header_name(&mut self, val: String) -> &mut Self
pub fn get_ttl_ms(&self) -> u64
pub fn get_mut_ttl_ms(&mut self) -> &mut u64
pub fn set_ttl_ms(&mut self, val: u64) -> &mut Self
pub fn get_in_flight_ttl_ms(&self) -> u64
pub fn get_mut_in_flight_ttl_ms(&mut self) -> &mut u64
pub fn set_in_flight_ttl_ms(&mut self, val: u64) -> &mut Self
pub fn get_max_entries(&self) -> usize
pub fn get_mut_max_entries(&mut self) -> &mut usize
pub fn set_max_entries(&mut self, val: usize) -> &mut Self
pub fn get_max_bytes(&self) -> usize
pub fn get_mut_max_bytes(&mut self) -> &mut usize
pub fn set_max_bytes(&mut self, val: usize) -> &mut Self
pub fn get_max_body_bytes(&self) -> usize
pub fn get_mut_max_body_bytes(&mut self) -> &mut usize
pub fn set_max_body_bytes(&mut self, val: usize) -> &mut Self
pub fn get_max_key_len(&self) -> usize
pub fn get_mut_max_key_len(&mut self) -> &mut usize
pub fn set_max_key_len(&mut self, val: usize) -> &mut Self
pub fn get_methods(&self) -> &Vec<Method>
pub fn get_mut_methods(&mut self) -> &mut Vec<Method>
pub fn set_methods(&mut self, val: Vec<Method>) -> &mut Self
pub fn get_require_key_prefixes(&self) -> &Vec<String>
pub fn get_mut_require_key_prefixes(&mut self) -> &mut Vec<String>
pub fn set_require_key_prefixes(&mut self, val: Vec<String>) -> &mut Self
pub fn get_cache_server_errors(&self) -> bool
pub fn get_mut_cache_server_errors(&mut self) -> &mut bool
pub fn set_cache_server_errors(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for IdempotencyConfig
impl Clone for IdempotencyConfig
Source§impl Debug for IdempotencyConfig
impl Debug for IdempotencyConfig
Source§impl Default for IdempotencyConfig
Default construction for IdempotencyConfig.
impl Default for IdempotencyConfig
Default construction for IdempotencyConfig.
Source§fn default() -> Self
fn default() -> Self
Constructs a default IdempotencyConfig covering POST/PUT/PATCH/DELETE with 24 h TTL.
§Returns
Self- Default configuration.
impl Eq for IdempotencyConfig
Source§impl PartialEq for IdempotencyConfig
impl PartialEq for IdempotencyConfig
impl StructuralPartialEq for IdempotencyConfig
Auto Trait Implementations§
impl Forget for IdempotencyConfig
impl Freeze for IdempotencyConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Method>: Freeze,
PhantomData<String>: Freeze,
impl Move for IdempotencyConfig
impl RefUnwindSafe for IdempotencyConfig
impl Send for IdempotencyConfigwhere
RawVecInner: Send,
impl Sync for IdempotencyConfigwhere
RawVecInner: Sync,
impl Unpin for IdempotencyConfig
impl UnsafeUnpin for IdempotencyConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Method>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for IdempotencyConfigwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.