#[non_exhaustive]pub struct RateLimit7dSegment {
pub format: PercentFormat,
pub invert: bool,
pub config: CommonRateLimitConfig,
}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.format: PercentFormat§invert: bool§config: CommonRateLimitConfigImplementations§
Trait Implementations§
Source§impl Default for RateLimit7dSegment
impl Default for RateLimit7dSegment
Source§impl Segment for RateLimit7dSegment
impl Segment for RateLimit7dSegment
Source§fn render(&self, ctx: &DataContext, _rc: &RenderContext) -> RenderResult
fn render(&self, ctx: &DataContext, _rc: &RenderContext) -> RenderResult
Render this segment for the given context. Read more
Source§fn data_deps(&self) -> &'static [DataDep]
fn data_deps(&self) -> &'static [DataDep]
Declare which data sources this segment reads. The runtime
computes the union across all enabled segments and lazy-fetches
only those sources. Defaults to the stdin payload only; segments
that read other sources must override. See
docs/specs/data-fetching.md §Segment dependency declaration. Read moreSource§fn defaults(&self) -> SegmentDefaults
fn defaults(&self) -> SegmentDefaults
Layout defaults (priority, width bounds, separator preference).
User config may override each field via
OverriddenSegment.Source§fn shrink_to_fit(
&self,
ctx: &DataContext,
rc: &RenderContext,
target: u16,
) -> Option<RenderedSegment>
fn shrink_to_fit( &self, ctx: &DataContext, rc: &RenderContext, target: u16, ) -> Option<RenderedSegment>
Layout-pressure-aware compaction hook. The reflow loop calls
this on any segment under width pressure (truncatable or
not), asking whether it can produce a render at most
target
cells wide. It runs before truncatable end-ellipsis
truncation, so segment-side intelligence beats generic
string clipping when both apply. Default returns None (no
compact form available; engine falls through to truncatable
or drop). Segments with structured tail content override to
shed decoration while keeping the signal-bearing prefix. Read moreAuto Trait Implementations§
impl Freeze for RateLimit7dSegment
impl RefUnwindSafe for RateLimit7dSegment
impl Send for RateLimit7dSegment
impl Sync for RateLimit7dSegment
impl Unpin for RateLimit7dSegment
impl UnsafeUnpin for RateLimit7dSegment
impl UnwindSafe for RateLimit7dSegment
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