#[non_exhaustive]pub struct CommonRateLimitConfig {
pub icon: String,
pub label: String,
pub stale_marker: String,
pub progress_width: u16,
pub invalid_progress_width: bool,
}Expand description
Common config shared by every rate-limit segment per the spec’s
§Config schema. Each concrete segment adds its own type-specific
knobs (format, invert, compact, use_days) on top.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.icon: String§label: String§stale_marker: String§progress_width: u16§invalid_progress_width: boolSet by apply_common_extras when the user supplied an
out-of-range progress_width. Segments use it to flip
format = Progress back to the per-family default so the
spec’s “fall back to percent format” rule at
rate-limit-segments.md §Edge cases is honored, not just warned.
Implementations§
Trait Implementations§
Source§impl Clone for CommonRateLimitConfig
impl Clone for CommonRateLimitConfig
Source§fn clone(&self) -> CommonRateLimitConfig
fn clone(&self) -> CommonRateLimitConfig
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 Debug for CommonRateLimitConfig
impl Debug for CommonRateLimitConfig
Source§impl PartialEq for CommonRateLimitConfig
impl PartialEq for CommonRateLimitConfig
Source§fn eq(&self, other: &CommonRateLimitConfig) -> bool
fn eq(&self, other: &CommonRateLimitConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CommonRateLimitConfig
impl StructuralPartialEq for CommonRateLimitConfig
Auto Trait Implementations§
impl Freeze for CommonRateLimitConfig
impl RefUnwindSafe for CommonRateLimitConfig
impl Send for CommonRateLimitConfig
impl Sync for CommonRateLimitConfig
impl Unpin for CommonRateLimitConfig
impl UnsafeUnpin for CommonRateLimitConfig
impl UnwindSafe for CommonRateLimitConfig
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
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.