Skip to main content

RateLimitUnit

Enum RateLimitUnit 

Source
pub enum RateLimitUnit {
    Second,
    Minute,
    Hour,
}
Expand description

Typed closed-set enum for the three canonical :politicas :rate-limit :window units — Second / Minute / Hour — the rate_limit_codec round-trips losslessly ("<n>/s" / "<n>/m" / "<n>/h").

The {"s" ↔ 1s, "m" ↔ 60s, "h" ↔ 3600s} bijection every consumer of the :politicas :rate-limit unit surface reads from ([rate_limit_codec::parse]’s unit → Duration dispatch, [rate_limit_codec::render]’s Duration → unit projection, the [is_canonical_rate_limit_window] predicate the AplicacaoSpec::validate_politicas gate keys off, the future M4 per-Aplicacao Envoy config reconciler’s local_rate_limit.token_bucket.fill_interval projection) now lives inside this typed enum’s match self arms — a future rate-limit-unit addition (a "d" day suffix once Envoy’s rate_limit_action grows daily-bucket support) is one new variant plus the exhaustiveness arms on the four methods, so every consumer picks it up by compile-time construction rather than a runtime table-scan miss.

The prior RATE_LIMIT_UNIT_TABLE: &[(&str, u64)] slice-of-tuples was scanned via find_map at every projection call — an untyped runtime walk that carried no compile-time link between the parse arm’s accepted suffixes, the render arm’s emitted suffixes, and the validate gate’s accepted windows. A future rate-limit-unit addition that landed one row without threading through the other consumers (or a copy-paste flip that collapsed two rows onto one suffix) would silently split the accepted-set across the three consumers — the parse arm accepts "d" and rejects "s", the render arm emits "h" for a 24h window that parse can’t round-trip, the validate gate misses one canonical window. Lifting the pairs onto a typed closed-set enum with exhaustive match arms makes any such half-landed extension a caixa-core build error (the compiler enforces arm coverage on every method), not a silent per-consumer drift surfacing at apply time. Same “closed-set typed-enum discriminator” discipline the sibling PlacementStrategy (cc8f749), crate::supervisor::RestartStrategy, crate::supervisor::RestartPolicy, crate::upgrade::UpgradeInstruction, and crate::CaixaKind closed-set typed enums carry on their respective closed-set axes — extended onto the seventh closed-set typed-enum discriminator axis on the caixa typed surface (the :politicas :rate-limit :window canonical-unit axis).

Variants§

§

Second

1-second window — canonical author-surface suffix "s" ("<n>/s"), maps onto Envoy’s local_rate_limit.token_bucket.fill_interval with a 1s magnitude.

§

Minute

1-minute window — canonical author-surface suffix "m" ("<n>/m"), maps onto Envoy’s local_rate_limit.token_bucket.fill_interval with a 60s magnitude.

§

Hour

1-hour window — canonical author-surface suffix "h" ("<n>/h"), maps onto Envoy’s local_rate_limit.token_bucket.fill_interval with a 3600s magnitude.

Implementations§

Source§

impl RateLimitUnit

Source

pub const fn is_second(&self) -> bool

Source

pub const fn is_minute(&self) -> bool

Source

pub const fn is_hour(&self) -> bool

Source§

impl RateLimitUnit

Source

pub const ALL: &'static [Self]

Exhaustive iteration surface for every consumer that reads the full canonical-unit set (the byte-parity witness against the prior RATE_LIMIT_UNIT_TABLE shape, the future M4 admission webhook’s accepted-suffix listing in its rejection body, any future round-trip fuzz harness). A future variant addition to RateLimitUnit extends this slice as a single edit and every consumer picks up the new entry by construction — the compiler- checked exhaustiveness on the sibling method match arms is the build-time guarantee that no arm forgets to grow.

Source

pub const SUFFIXES: &'static [&'static str]

Substrate-canonical exhaustive accept-set on the RateLimitUnit lowercase canonical-suffix byte-string axis — the closed three-arm roster of every byte-string Self::as_suffix returns, routed byte-for-byte through the paired RATE_LIMIT_UNIT_SUFFIX_SECOND / RATE_LIMIT_UNIT_SUFFIX_MINUTE / RATE_LIMIT_UNIT_SUFFIX_HOUR lifted pub const roster the Self::as_suffix emitter (and the std::fmt::Display / AsRef<str> / From<{Self,&Self}> for {&'static str, String, Cow<'static, str>, Box<str>, Arc<str>} trait triple + quintuple routed through it) walks, and the same three strings the paired Self::from_suffix reverse projection accepts.

Peer of the sibling crate::CaixaKind::LABELS (427fe75) / WitShape::LABELS (9d9f585) rosters on the lowercase kebab census-label byte-string axis, the sibling crate::CaixaKind::WIRE_NAMES (bd708bd) / crate::supervisor::RestartStrategy::WIRE_NAMES (3033f45) / crate::supervisor::RestartPolicy::WIRE_NAMES (ce9412b) / PlacementStrategy::WIRE_NAMES (3e5b194) rosters on the PascalCase wire byte-string axis, and the sibling crate::upgrade::UpgradeInstruction::LISP_FORMS (1898d77) / crate::upgrade::UpgradeInstruction::WIRE_FORMS (cc42c0e) rosters on the OTP-appup discriminator’s two-axis roster split — the same closed-set exhaustive-accept-set roster discipline extended here onto the M3 :politicas :rate-limit :window canonical-unit closed-set typed enum on the caixa surface, closing the eighth substrate-side closed-set typed enum on the roster-discipline axis and the third (and last) M3 mesh-shape closed-set typed enum (alongside the peer PlacementStrategy::WIRE_NAMES on the :placement :estrategia axis and the peer WitShape::LABELS on the :contratos :wit census-label axis) to converge onto the discipline.

Downstream consumers of the closed accepted-suffix set — a future feira app graph --by-rate-limit-unit histogram column whose per-arm-header emission walks every arm’s canonical suffix to render zero-count arms as well as present arms, a future M4 mesh.pleme.io/v1alpha1/Aplicacao CR admission-webhook rejection body enumerating the accepted-:politicas :rate-limit canonical suffixes verbatim, a future feira app policy census per-Aplicacao :politicas :rate-limit :window histogram whose accept-set enumeration reads the roster verbatim, a future tracing::field::valuable::Value::List structured-log accepted-suffix emit, any future round-trip fuzz harness that sweeps every arm’s canonical suffix — now reach for one lifted substrate-primitive roster rather than open-coding a three-string array-literal (["s", "m", "h"]) whose arm-set has no compile-time link back to the typed RateLimitUnit enum. A future arm addition (a "d" day suffix once Envoy’s rate_limit_action grows daily-bucket support, a "ms" sub-second window once high-throughput per-edge policies come into scope per MESH-COMPOSITION §III.2 #3 — both trajectory items the sibling Self::window_from_suffix doc block already names) extends this roster as a single edit — paired with the Self::as_suffix match’s compiler-checked exhaustiveness on the new arm — and every consumer picks up the new canonical suffix by construction rather than a coordinated array-literal rewrite across every downstream site.

Length is pinned load-bearing at RateLimitUnit::ALL.len() (three) by [tests::rate_limit_unit_suffixes_covers_every_arm], every variant’s Self::as_suffix projection is pinned to a member of the roster so a silent skew between the emitter’s arm-set and this const’s arm-set trips at caixa-core test time rather than at a downstream consumer’s accepted-set enumeration miss, and every entry is further pinned to open with an ASCII lowercase byte so a silent collapse of the canonical-suffix axis with any hypothetical peer PascalCase discriminator axis (an entry byte-identical to a sibling variant’s Debug-derived PascalCase byte-string that would let a suffix-axis consumer accept the discriminator vocabulary) trips here rather than at a downstream K8s-CR round-trip miss.

Source

pub const fn as_suffix(self) -> &'static str

Canonical author-surface suffix — the "s" / "m" / "h" byte- string every <n>/<unit> rate-limit shape carries after its / separator. The single source of truth the codec’s parse and render arms both dispatch on: the parse arm matches an incoming suffix against every RateLimitUnit::ALL entry’s as_suffix output; the render arm emits the entry’s as_suffix verbatim after the rate magnitude.

The three arms return the paired RATE_LIMIT_UNIT_SUFFIX_SECOND / RATE_LIMIT_UNIT_SUFFIX_MINUTE / RATE_LIMIT_UNIT_SUFFIX_HOUR lifted constants so every substrate consumer that dispatches on the unit’s canonical suffix reads the same byte-string the paired Self::from_suffix reverse projection accepts and the sibling Self::SUFFIXES roster enumerates — a future rebrand of the suffix byte-strings reaches this emitter, the paired reverse projection, the roster, and every trait impl routed through the emitter through one caixa-core edit rather than a coordinated per-arm inline-literal rewrite that would silently split the surfaces on any missed site.

Source

pub const fn window(self) -> Duration

Canonical Duration for this unit — the token-bucket refill period the RateLimit::window axis carries when the surrounding slot’s :rate-limit author surface named this unit.

Source

pub fn from_suffix(suffix: &str) -> Option<Self>

Parse the <n>/<unit>-shaped suffix into the typed enum, or None when suffix is outside the closed-set arm-string set Self::as_suffix emits. The single str → Self projection [rate_limit_codec::parse] consumes.

Source

pub const fn from_window(window: Duration) -> Option<Self>

Recognize a canonical rate-limit Duration as one of the three arms, or None when window carries sub-second residue or a second-magnitude outside the closed-set arm-window set Self::window emits. The single Duration → Self projection [rate_limit_codec::render] + [is_canonical_rate_limit_window] both consume.

pub const fn — the reverse Duration → Self projection now carries the same const-eval-surface posture the sibling pub const fn Self::as_suffix / Self::window scalar- projection accessors on this closed-set typed enum already carry, and the paired pub const fn RateLimit::canonical_unit typed-RateLimit-projection sibling composes through in const context. Routes byte-for-byte through the peer pub const fn Self::window canonical-Duration projection so any future arm-magnitude edit on the sibling accessor reaches this reverse resolver by construction — the s == Self::<Arm>.window().as_secs() per-arm probes each dispatch through one pub const fn on the substrate primitive rather than a hand-authored per-arm second- magnitude literal that would silently drift on any future Self::window arm-magnitude edit.

Prior to the const lift the body dispatched through Self::ALL.iter().copied().find(|u| u.window() == window) — an iterator-driven linear scan whose iterator methods (.iter() / .copied() / .find()) and Duration-side PartialEq dispatch each carry non-const bounds on stable Rust 1.94, so any downstream substrate-side const-context consumer of the reverse resolver (a module-scope const _:() = assert!(RateLimitUnit::from_window(<canonical>).is_some()) invariant pin on a typed fixture, a future M4 mesh.pleme.io/v1alpha1/Aplicacao CR materializer admission- webhook const fn per-:politicas canonical-window floor over a typed RateLimit scalar, any future const fn per-:contratos-edge rate-limit-override overlay resolver over the substrate primitive that wants to fan on the canonical unit at compile time) surfaced as a downstream E0015 far from the resolver’s own declaration. The pub const fn posture closes the drift structurally at caixa-core build time.

Pinned load-bearing at the substrate-primitive level by [tests::rate_limit_unit_from_window_accessor_is_const_fn] (const- eval-surface pin via const fn wrapper) and [tests::rate_limit_unit_from_window_composes_through_window_accessor] (composition-witness pin against the peer Self::window scalar dispatch).

Source

pub fn window_from_suffix(suffix: &str) -> Option<Duration>

Canonical rate-limit Duration for a unit suffix, or None when suffix is outside the closed-set arm-string set Self::as_suffix emits. Composes Self::from_suffix with Self::window — the single &str → Duration projection [rate_limit_codec::parse] consumes.

The peer Duration → &'static str axis folded onto the substrate primitive RateLimit::canonical_unit typed accessor once both production consumers ([rate_limit_codec::render] and AplicacaoSpec::validate_politicas’s canonical-window gate) migrated (61421a6): the free helper’s Duration → &str projection is now the two-step composition rl.canonical_unit().map(RateLimitUnit::as_suffix) every consumer reads through the typed accessor. This lift closes the peer &str → Duration axis by folding the vestigial module-private rate_limit_window_from_unit delegate onto this associated method — the codec’s parse arm and every future wire-side consumer of the &str → Duration projection (a future admission-webhook that reads a :rate-limit shape off a CR spec’s raw string value before it’s promoted to a validated typed slot, a future feira lint shape-probe that reads the author-surface bytes verbatim) now reach for exactly one typed dispatch on the substrate primitive.

Same “closed-set typed-enum discriminator with canonical projections per axis” discipline the sibling Self::as_suffix / Self::window / Self::from_suffix / Self::from_window methods carry — this associated method closes the fifth (and last unlifted) projection axis on the arm-table, so the closed-set enum now owns every str ↔ Duration ↔ Self typed dispatch every consumer of the :politicas :rate-limit :window axis reaches through. A future rate-limit-unit addition (a "d" day suffix once Envoy’s rate_limit_action grows daily-bucket support, a "ms" sub-second window once high-throughput per-edge policies come into scope per MESH-COMPOSITION §III.2 #3) is one new variant plus one arm per method — the compiler enforces exhaustiveness on every consumer’s match self arms and picks the new unit up by construction across all five projections.

Trait Implementations§

Source§

impl AsRef<str> for RateLimitUnit

Substrate-canonical AsRef<str> projection on the M3 :politicas :rate-limit closed-set typed unit-suffix enum — routes through the same RateLimitUnit::as_suffix pub const fn scalar accessor the paired std::fmt::Display impl already delegates through, so any future consumer that binds a RateLimitUnit through the standard-library impl AsRef<str> bound (a std::process::Command::arg shell-out that composes the canonical suffix into an Envoy sidecar config-CLI’s per-:politicas --rate-limit-unit <s|m|h> arg on the future CiliumClusterwideEnvoyConfig overlay MESH-COMPOSITION §III.2 #3 names, a tracing::field::Value::Str-arm structured-log recorder on the future app-operator’s per-:politicas :rate-limit reconcile step, a std::collections::HashMap lookup keyed on the canonical suffix through map.get::<str>(unit.as_ref()) on a future per-unit token-bucket-refill dispatch table the future M4 admission-webhook rejection body composes) reaches the paired "s" / "m" / "h" byte-string through one substrate-primitive dispatch rather than an open-coded .as_suffix() re-inlining at every wire-up.

Deliberately routes through the canonical suffix axis, not the second-magnitude RateLimitUnit::window axis — AsRef<str> and [fmt::Display] land on the same author-surface-canonical byte- string the codec’s parse and render arms both dispatch on, while the token-bucket-refill period stays reachable only through the explicit RateLimitUnit::window / RateLimitUnit::from_window paths.

Same “route the trait impl through the substrate-primitive accessor” discipline the sibling crate::CaixaVersion AsRef<str> impl (16d5c7e), the paired M2 crate::supervisor::RestartStrategy AsRef<str> impl (63eb1a4), the paired M2 crate::supervisor::RestartPolicy AsRef<str> impl (419ea81), the M3 PlacementStrategy AsRef<str> impl (d86edd2), and the top-level crate::CaixaKind AsRef<str> impl (cd2091f) carry — closes the substrate primitive’s AsRef<str> projection axis onto the last remaining closed-set typed enum with a [fmt::Display] surface, so every closed-set typed enum / newtype on the caixa surface (top-level :kind, both M2 :supervisor-slot per-child and sibling-restart typed enums, the M3 :placement :estrategia typed enum, the M3 :politicas :rate-limit unit-suffix typed enum, and the :versao typed newtype) now carries the paired AsRef<str> + [fmt::Display] + as_* triple through one lifted-const family.

Pinned load-bearing by [tests::rate_limit_unit_as_ref_str_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three-arm closed set) and [tests::rate_limit_unit_as_ref_str_routes_through_display_via_shared_accessor] (three-path convergence: AsRef<str> + Display + as_suffix all resolve to the same byte-string per arm) — any future silent detour that routes the impl through a divergent projection (a per-arm inline match self { … } re-inlining that opens a compile- time link to the un-lifted arm-literal, a swap onto the second-magnitude RateLimitUnit::window axis that would collide the canonical-suffix / token-bucket-refill two-axis split) trips at caixa-core test time under assert_eq! rather than at a downstream impl AsRef<str>-bound consumer’s silent split.

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for RateLimitUnit

Source§

fn clone(&self) -> RateLimitUnit

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RateLimitUnit

Source§

impl Debug for RateLimitUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RateLimitUnit

Source§

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 Display for RateLimitUnit

Route std::fmt::Display through RateLimitUnit::as_suffix, so every consumer that formats a canonical rate-limit unit as user- facing text (future M4 admission-webhook rejection bodies naming the accepted-suffix set, future feira app graph per-:politicas unit column) lands on the same "s" / "m" / "h" byte-string the codec’s parse arm accepts and the render arm emits. Same as_str-through-Display convergence discipline the sibling PlacementStrategy, crate::CaixaKind, crate::supervisor::RestartStrategy, and crate::supervisor::RestartPolicy closed-set typed enums carry.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RateLimitUnit

Source§

impl From<&RateLimitUnit> for &'static str

Trait-idiomatic forward projection on RateLimitUnit from a borrowed input onto the &'static str axis — the borrowed-input companion to the paired owned-input [From<RateLimitUnit> for &'static str] impl immediately above. Routes byte-for-byte through the same substrate-primitive RateLimitUnit::as_suffix pub const fn accessor so every consumer that binds a &RateLimitUnit through the standard-library .into() / [From<&Self> for &'static str] axis (a RateLimitUnit::ALL.iter().map(<&'static str>::from).collect::<Vec<_>>() per-arm accept-set materializer — whose iterator over &'static [RateLimitUnit] yields &RateLimitUnit, not RateLimitUnit, so the owned-input From<RateLimitUnit> axis alone forces every call site through an explicit .copied() / dereference / Copy-bound restatement rather than the direct trait-idiomatic projection; a future generic <T: Copy + for<'a> Into<&'static str>>- bound diagnostic column over the substrate-wide closed-set typed-enum family that walks the iter().map(Into::into) shape verbatim; the future M4 mesh.pleme.io/v1alpha1/Aplicacao CR admission-webhook rejection body that composes the accepted-:politicas :rate-limit canonical-suffix enumeration from an iterated RateLimitUnit::ALL.iter().map(|u| u.into()) pipe rather than a per- arm match u { … } cascade; a future HashMap::<&'static str, RateLimitUnit>::from_iter( RateLimitUnit::ALL.iter().map(|u| (u.into(), *u)))-style per-unit reverse-lookup table the sibling TryFrom<&str> impl cannot compose without this borrowed-input axis in place) reaches the same three-arm "s" / "m" / "h" canonical-suffix emit-set the paired owned-input [From<RateLimitUnit> for &'static str], the sibling std::fmt::Display, AsRef<str>, and RateLimitUnit::as_suffix surfaces already return.

Eighth peer on the substrate-wide trait-idiomatic borrowed-input forward-projection family opened on crate::dep::DepList (64aa742) and extended onto crate::CaixaKind (5ab993a), crate::CaixaDialeto (807b0b5), the paired M2 OTP-shape crate::supervisor::RestartStrategy (e941836) and crate::supervisor::RestartPolicy (842c7f3), and the M3 mesh-primitive slot enums PlacementStrategy (4d941d8) and WitShape (3187bd0). Rust’s From trait does not auto-derive the From<&Self> sibling from a From<Self> impl (the blanket impl<T, U> From<&T> for U where T: Copy, U: From<T> does not exist in core), so every closed-set typed enum that carries the owned- input axis but not the borrowed-input axis forces every borrowed-input call site through a .copied() / <&'static str>::from(*unit) / unit.as_suffix() detour whose type bounds have no compile-time link to the substrate primitive. RateLimitUnit is the third (and last) M3-mesh-primitive-defining closed-set typed enum to converge onto the substrate-wide borrowed-input campaign — the PlacementStrategy first-mover (4d941d8) opened the M3-slot arm on the :placement :estrategia axis, the WitShape follow-on (3187bd0) closed the :contratos :wit census-label axis, and this lift closes the :politicas :rate-limit canonical-suffix axis the caixa-mesh renderer keys off end-to-end for per-Aplicacao Envoy local_rate_limit.token_bucket.fill_interval overlay emission.

Same three-path convergence discipline as the paired owned-input impl (this borrowed-input axis, the paired owned-input [From<RateLimitUnit> for &'static str], and RateLimitUnit::as_suffix all route through the same three-arm inline canonical-suffix byte-strings), so a future variant rename or per-arm serde-attribute drift reaches every one of the six sibling forward-projection paths (std::fmt::Display, AsRef<str>, [Self::as_suffix], [From<Self> for &'static str], this [From<&Self> for &'static str], and the un-renamed serde::Serialize derive that also emits [Self::as_suffix]’s bytes) through exactly one caixa-core edit.

Deliberately routes through the canonical-suffix axis, not the second-magnitude RateLimitUnit::window axis — the borrowed-input From lands on the same author-surface-canonical byte-string the codec’s parse and render arms both dispatch on, while the token- bucket-refill period stays reachable only through the explicit RateLimitUnit::window / RateLimitUnit::from_window paths, so the canonical-suffix / token-bucket-refill two-axis split the sibling AsRef<str> impl already carries reaches the borrowed-input axis by construction.

The RateLimitUnit::as_suffix emit and RateLimitUnit::from_suffix parse share the same three inline canonical-suffix byte-strings by construction — so the borrowed-input forward axis and the reverse TryFrom<&str> axis compose directly without the intermediate wire-vocab hop the peer crate::CaixaKind axis pair requires. The round-trip witness pin below locks this direct composition on the M3 slot enum’s trait-idiomatic axis pair.

Pinned load-bearing by [tests::rate_limit_unit_from_borrowed_into_static_str_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three-arm emit-set via a borrowed input, plus a const-context materialization witness for the &'static str lifetime promise, plus a blanket .into() shape) and [tests::rate_limit_unit_from_owned_and_borrowed_into_static_str_agree_on_every_arm] (cross-axis partition pin against the paired owned-input [From<RateLimitUnit> for &'static str] impl, plus a .iter().map(Into::into) pipe witness over RateLimitUnit::ALL, plus a direct round-trip witness through TryFrom<&str> that closes the two-way &Self → &'static str → Self round-trip on the M3 slot enum’s trait-idiomatic axis pair without the wire-vocab intermediate the peer crate::CaixaKind axis pair requires).

Source§

fn from(unit: &RateLimitUnit) -> &'static str

Converts to this type from the input type.
Source§

impl From<&RateLimitUnit> for String

Trait-idiomatic borrowed-input, owned-String output forward projection on the M3 mesh-primitive :politicas :rate-limit canonical-suffix RateLimitUnit closed-set typed enum — the fourth (and closing) corner of the {Self, &Self} × {&'static str, String} 2×2 trait-idiomatic projection family on this third (and last) M3-mesh-primitive-defining slot enum. Routes byte-for-byte through the substrate-primitive RateLimitUnit::as_suffix pub const fn accessor (via str::to_owned) so every consumer that holds a borrowed [&RateLimitUnit] and needs an owned String — a future serde_json::Value::String(String::from(&unit)) structured-payload composer over a borrowed field, a future Iterator::map over &[RateLimitUnit] that projects to owned keys through .iter().map(String::from) (whose iterator yields &RateLimitUnit, not RateLimitUnit, so the owned-input [From<RateLimitUnit> for String] axis alone forces every call site through an explicit .copied() / spurious Copy deref restatement rather than the direct trait-idiomatic projection), a future HashMap::<String, RateLimitUnit>::from_iter that keys off a borrowed- iteration axis where dereferencing the unit would force an unnecessary Copy at every step, the future M4 mesh.pleme.io/v1alpha1/Aplicacao CR admission-webhook rejection body composer that names the accepted-:politicas :rate-limit canonical-suffix enumeration through an iterated RateLimitUnit::ALL.iter().map(String::from).collect() pipe rather than a per-arm cascade, the future caixa-mesh renderer per-Aplicacao Envoy local_rate_limit.token_bucket.fill_interval overlay composer whose borrowed-iteration axis over declared units projects to owned keys by construction — reaches the same three-arm "s" / "m" / "h" canonical-suffix byte-string the paired std::fmt::Display, AsRef<str>, RateLimitUnit::as_suffix, and the three other trait-idiomatic forward-projection impls ([From<RateLimitUnit> for &'static str], [From<&RateLimitUnit> for &'static str], [From<RateLimitUnit> for String]) already return.

Eighth peer on the substrate-wide trait-idiomatic borrowed-input, owned-String output forward-projection family opened on crate::supervisor::RestartStrategy (579385f), closed on the M2 OTP-shape sibling axis pair by crate::supervisor::RestartPolicy (8465740), extended onto the two-list dep-graph peer by crate::dep::DepList (e0cb617), onto the top-level crate::CaixaKind peer by (e76436d), onto the dialect-classification peer by crate::CaixaDialeto (d3c0d1d), onto the first M3 mesh-slot peer by PlacementStrategy (d3dc000), and onto the second M3 mesh-slot peer by WitShape (d638fd3) — closes the {Self, &Self} × {&'static str, String} 2×2 projection corner across the whole M3 mesh-primitive triple, keeping the M3 slot-enum sweep in lockstep with the M2 OTP-shape sibling pair’s earlier closure. Third (and last) M3-mesh-primitive-defining closed-set typed enum to reach the 2×2-completion corner — the PlacementStrategy first-mover (d3dc000) closed the :placement :estrategia distribution-strategy axis, WitShape (d638fd3) closed the :contratos :wit census-label axis, and this lift closes the :politicas :rate-limit canonical-suffix axis the caixa-mesh renderer keys off end-to-end for per-Aplicacao Envoy local_rate_limit.token_bucket.fill_interval overlay emission.

Rust’s standard library does not carry a blanket impl<T: AsRef<str>> From<&T> for String (nor an impl<T: fmt::Display> From<&T> for String), so every closed-set typed enum that carries the paired AsRef<str> / std::fmt::Display / [From<Self> for &'static str] / [From<&Self> for &'static str] / [From<Self> for String] quintuple but not the borrowed-input owned-String axis forces every borrowed-input owned-string call site through a unit.as_suffix().to_owned() / String::from(*unit) (with a spurious Copy) / unit.to_string() (through std::fmt::Display) detour whose type bounds have no compile-time link to the substrate primitive.

Same three-path convergence discipline as the paired owned-input impl (this borrowed-input axis, the paired owned-input [From<RateLimitUnit> for String], and RateLimitUnit::as_suffix all route through the same three-arm inline canonical-suffix byte-strings), so a future variant rename or per-arm serde-attribute drift reaches every one of the paired forward-projection paths through exactly one caixa-core edit.

Same as the peer crate::supervisor::RestartStrategy / crate::supervisor::RestartPolicy / crate::dep::DepList / crate::CaixaDialeto / PlacementStrategy / WitShape borrowed-input owned-String axis pairs (whose forward emit and reverse parse share one vocabulary by construction) and unlike the peer crate::CaixaKind pair (whose forward emit lands on the lowercase Portuguese diagnostic vocabulary while the reverse parse lands on the PascalCase wire vocabulary, forcing the round-trip through an intermediate crate::CaixaKind::wire_name hop), RateLimitUnit’s RateLimitUnit::as_suffix emit and RateLimitUnit::from_suffix parse resolve through the same three inline canonical-suffix byte-strings by construction (there is no wire/diagnostic axis split on this M3 slot enum — both halves of the round-trip route through the same three match-arm-inline &'static str values "s" / "m" / "h"), so the borrowed-input owned-String projection this impl exposes composes directly with the paired trait-idiomatic reverse TryFrom<&str> axis on the owned-String’s String::as_str borrow — no intermediate wire-vocab hop required.

Deliberately routes through the canonical-suffix axis, not the second-magnitude RateLimitUnit::window axis — the borrowed-input owned-String From lands on the same author-surface-canonical byte-string the codec’s parse and render arms both dispatch on, while the token-bucket-refill period stays reachable only through the explicit RateLimitUnit::window / RateLimitUnit::from_window paths, so the canonical-suffix / token-bucket-refill two-axis split the sibling axes already carry reaches the borrowed-input owned- String axis by construction.

The remaining six closed-set typed enums on the caixa substrate surface (PathShapeViolation, InvariantKind, ArchVerdict, Severity, FixSafety, Semantic, FerriteRuntime) are the future targets of this 2×2-completion campaign — each carries the same paired quintuple that this borrowed-input owned-String axis extends onto.

Pinned load-bearing by [tests::rate_limit_unit_from_into_borrowed_owned_string_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three-arm emit-set through the borrowed-input surface) and [tests::rate_limit_unit_from_into_borrowed_owned_string_agrees_with_paired_axes_on_every_arm] (cross-axis partition pin against the paired owned-input owned- String [From<RateLimitUnit> for String] impl, the paired borrowed-input owned-[&'static str] [From<&RateLimitUnit> for &'static str] impl, the paired owned- input owned-[&'static str] [From<RateLimitUnit> for &'static str] impl, and the sibling ToString::to_string surface routed through std::fmt::Display, plus a .iter().map(String::from) pipe witness over RateLimitUnit::ALL (whose iterator yields &RateLimitUnit by construction, so the borrowed-input owned- String axis is what routes the pipe through the substrate- primitive RateLimitUnit::as_suffix accessor without a spurious Copy deref), plus a direct round-trip witness through TryFrom<&str> on the owned-String’s String::as_str borrow that closes the two-way &Self → String → Self round-trip on the trait-idiomatic borrowed-input owned-String forward + reverse axis pair — no intermediate wire-vocab hop like the peer crate::CaixaKind axis pair requires).

Source§

fn from(unit: &RateLimitUnit) -> String

Converts to this type from the input type.
Source§

impl From<&RateLimitUnit> for Cow<'static, str>

Trait-idiomatic borrowed-input, std::borrow::Cow<'static, str> output forward projection on the M3-mesh-primitive-defining :politicas :rate-limit canonical-suffix RateLimitUnit closed-set typed enum — the borrowed-input companion to the paired owned-input [From<RateLimitUnit> for std::borrow::Cow<'static, str>] impl immediately above (1d59925). Routes byte-for-byte through the same substrate-primitive RateLimitUnit::as_suffix pub const fn accessor (via std::borrow::Cow::Borrowed) so every consumer that holds a &RateLimitUnit and needs a std::borrow::Cow<'static, str> — a RateLimitUnit::ALL.iter().map(std::borrow::Cow::from).collect::<Vec<_>>() per-arm accept-set materializer whose iterator over &'static [RateLimitUnit] yields &RateLimitUnit (not RateLimitUnit, so the paired owned-input [From<RateLimitUnit> for std::borrow::Cow<'static, str>] axis alone forces every call site through an explicit .copied() / dereference / Copy-bound restatement rather than the direct trait-idiomatic projection), a future generic <T: for<'a> Into<std::borrow::Cow<'static, str>>>-bound emitter on a per-:politicas :rate-limit diagnostic column that walks the iter().map(Into::into) shape verbatim, the future M4 mesh.pleme.io/v1alpha1/Aplicacao CR admission-webhook rejection body that composes the accepted-:politicas :rate-limit canonical-suffix enumeration from an iterated RateLimitUnit::ALL.iter().map(|u| u.into()) pipe rather than a per-arm match u { … } cascade — reaches the same three-arm inline "s" / "m" / "h" canonical-suffix byte-string the paired std::fmt::Display, AsRef<str>, RateLimitUnit::as_suffix, the four {Self, &Self} × {&'static str, String} 2×2 trait-idiomatic forward-projection corners, and the paired owned-input [From<RateLimitUnit> for std::borrow::Cow<'static, str>] impl already return.

Deliberately returns std::borrow::Cow::Borrowed rather than std::borrow::Cow::Owned — the substrate-primitive RateLimitUnit::as_suffix accessor’s return carries the &'static str lifetime by construction (each match arm resolves to one of the three inline "s" / "m" / "h" byte-strings with static lifetime), so the zero-alloc borrowed arm is the type-correct projection with no runtime allocation on the borrowed-input surface just as on the paired owned-input surface.

Closes the {Self, &Self} input-shape corner on the M3-mesh-shape :politicas :rate-limit canonical-suffix std::borrow::Cow<'static, str> axis opened one commit prior (1d59925) on the paired owned-input [From<RateLimitUnit> for std::borrow::Cow<'static, str>] impl — third-and-last M3-mesh-primitive-defining peer on the axis, closing the whole M3-mesh-shape tier of the substrate-wide std::borrow::Cow<'static, str> forward-projection campaign. One commit after the sibling PlacementStrategy :placement :estrategia distribution-strategy peer (eee504d owned-input + afdf0f4 borrowed-input) and the first-mover WitShape :contratos :wit census-label peer (8634dec owned-input + 25690ef borrowed-input) closed the first and second M3-mesh-primitive- defining slot enums, exactly as d45c409 closed the axis on the top-level crate::CaixaKind one commit after the owning half (99c1735) landed and as 9b3e4b3 / ee577fd closed it on the M2 OTP-shape crate::supervisor::RestartStrategy / crate::supervisor::RestartPolicy sibling peers one commit after their owning halves (7dd28b3 / 0612398) landed. Rust’s standard library does not carry a blanket impl<T: AsRef<str>> From<&T> for Cow<'static, str> (nor an impl<T: fmt::Display> From<&T> for Cow<'static, str>), so every closed-set fieldless typed enum peer on the substrate that carries the paired owned-input [Cow<'static, str>] axis but not the borrowed-input axis forces every borrowed-input [Cow<'static, str>]-parameterized call site through a spurious Copy deref (std::borrow::Cow::from(*unit)) or a std::borrow::Cow::Borrowed(unit.as_suffix()) open-code whose type bounds have no compile-time link to the substrate primitive.

The outside-M3 substrate-wide peers (crate::render::PathShapeViolation and the outside-caixa-core peers InvariantKind, ArchVerdict) are the remaining future targets of the campaign; closing this borrowed-input corner on RateLimitUnit closes the whole M3-mesh-shape tier of the substrate-wide std::borrow::Cow<'static, str> axis on the M3-mesh-primitive-defining triple.

Pinned load-bearing by [tests::rate_limit_unit_from_borrowed_into_static_cow_str_routes_through_as_suffix_accessor] (byte-parity + zero-alloc std::borrow::Cow::Borrowed-arm pin against RateLimitUnit::as_suffix across the three-arm RateLimitUnit::ALL through the borrowed-input surface) and [tests::rate_limit_unit_from_borrowed_into_static_cow_str_agrees_with_paired_axes_on_every_arm] (cross-axis partition pin against the paired owned-input [From<RateLimitUnit> for std::borrow::Cow<'static, str>], the paired borrowed-input owned-&'static str [From<&RateLimitUnit> for &'static str], and the paired borrowed-input owned-String [From<&RateLimitUnit> for String] impls, plus a .iter().map(std::borrow::Cow::from) pipe witness over RateLimitUnit::ALL — whose iterator yields &RateLimitUnit by construction, so the borrowed-input [Cow<'static, str>] axis is what routes the pipe through the substrate-primitive RateLimitUnit::as_suffix accessor with the zero-alloc [Cow::Borrowed] arm by construction and without a spurious Copy deref).

Source§

fn from(unit: &RateLimitUnit) -> Cow<'static, str>

Converts to this type from the input type.
Source§

impl From<&RateLimitUnit> for Box<str>

Trait-idiomatic borrowed-input, Box<str> output forward projection on the M3-mesh-primitive-defining :politicas :rate-limit canonical-suffix RateLimitUnit closed-set fieldless typed enum — the borrowed-input companion to the paired owned-input [From<RateLimitUnit> for Box<str>] impl (8f7eb1a, opening the third-and-last M3-mesh-primitive peer of the M3 mesh-shape tier) that closes the {Self, &Self} input-shape corner of the substrate- wide Box<str> forward-projection axis on the last un-lifted M3-mesh-primitive-defining slot enum, routing byte-for-byte through the substrate-primitive RateLimitUnit::as_suffix pub const fn accessor via Box::<str>::from on the returned &'static str. Every consumer that holds a &RateLimitUnit and needs a Box<str> — a RateLimitUnit::ALL.iter().map(Box::<str>::from).collect::<Vec<_>>() per-arm accept-set materializer (whose iterator over &'static [RateLimitUnit] yields &RateLimitUnit, not RateLimitUnit, so the paired owned-input [From<RateLimitUnit> for Box<str>] axis alone forces every call site through an explicit Copy deref or a .copied() restatement rather than the direct trait-idiomatic projection), a per-Aplicacao rate-limit-suffix census-key materializer holding &RateLimitUnit through a caixa-mesh renderer’s borrow lifetime, a future admission-webhook rejection body whose per-arm Box<str> field composes from a borrowed &RateLimitUnit handle, a future feira app graph --by-rate-limit-unit histogram-column emitter that stashes each arm as an owned Box<str> label through an iterator over RateLimitUnit::ALL — reaches the substrate-primitive RateLimitUnit::as_suffix accessor through this impl and no other, without a Box::<str>::from(unit.as_suffix()) open-code whose type bounds have no compile-time link back to the substrate primitive.

Rust’s standard library carries impl From<&str> for Box<str> and impl From<String> for Box<str> but no blanket impl<T: AsRef<str>> From<&T> for Box<str> (nor a Copy-based impl<T: Copy, U: From<T>> From<&T> for U), so every closed-set fieldless typed enum peer on the substrate that carries the paired owned-input Box<str> axis but not the borrowed-input axis forces every borrowed-input Box<str>-parameterized call site through a spurious Copy deref (Box::<str>::from((*unit).as_suffix())) or a Box::<str>::from(unit.as_suffix()) open-code whose type bounds have no compile-time link back to the substrate primitive.

Closes the {Self, &Self} input-shape corner on the third-and-last peer of the M3-mesh-shape tier of the substrate-wide trait-idiomatic Box<str> forward-projection campaign, closing the whole M3 mesh-shape tier on the M3-mesh-primitive-defining triple, exactly as 57ca75e closed the second peer (WitShape) one commit after its owning half (bdca41a) landed on that enum, as 3c971b2 closed the first peer (PlacementStrategy) one commit after its owning half (6d73e84), and as cb1d068 closed the paired M2-OTP-shape tier’s second peer (crate::supervisor::RestartPolicy) one commit after its owning half (0a1b313). Leaves the outside-M3 substrate-wide peers (crate::render::PathShapeViolation and the outside-caixa-core peers) as the remaining future targets of the campaign.

Pinned load-bearing by [tests::rate_limit_unit_from_borrowed_into_box_str_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three-arm RateLimitUnit::ALL emit-set on the borrowed-input surface, plus a blanket-derived Into shape witness, a cross- axis partition pin against the paired owned-input [From<RateLimitUnit> for Box<str>] and the sibling borrowed-input {&'static str, String, Cow<'static, str>} return-shape axes, and a .iter().map(Box::<str>::from) pipe witness over RateLimitUnit::ALL — whose iterator yields &RateLimitUnit by construction, so the borrowed-input Box<str> axis is what routes the pipe through the substrate-primitive RateLimitUnit::as_suffix accessor without a spurious Copy deref).

Source§

fn from(unit: &RateLimitUnit) -> Box<str>

Converts to this type from the input type.
Source§

impl From<&RateLimitUnit> for Arc<str>

Trait-idiomatic borrowed-input, std::sync::Arc<str> output forward projection on the M3-mesh-primitive-defining :politicas :rate-limit canonical-suffix RateLimitUnit closed-set fieldless typed enum — the borrowed-input companion to the paired owned-input [From<RateLimitUnit> for std::sync::Arc<str>] impl (c481bfe, one commit prior) that closes the {Self, &Self} input-shape corner of the M3-mesh-shape tier of the substrate-wide std::sync::Arc<str> forward-projection campaign on the third — and last — M3-mesh-primitive- defining slot enum, closing the whole M3 mesh-shape tier of the std::sync::Arc<str> axis on the M3-mesh-primitive-defining triple, routing byte-for-byte through the substrate-primitive RateLimitUnit::as_suffix pub const fn accessor via std::sync::Arc::<str>::from on the returned &'static str.

Every consumer that holds a &RateLimitUnit and needs a std::sync::Arc<str> — a RateLimitUnit::ALL.iter().map(std::sync::Arc::<str>::from).collect::<Vec<_>>() per-arm accept-set materializer (whose iterator over &'static [RateLimitUnit] yields &RateLimitUnit, not RateLimitUnit, so the paired owned-input [From<RateLimitUnit> for std::sync::Arc<str>] axis alone forces every call site through an explicit Copy deref or a .copied() restatement rather than the direct trait-idiomatic projection), a future caixa-mesh renderer’s per-Aplicacao :politicas :rate-limit canonical-suffix census-key shared-ownership materializer holding a &RateLimitUnit through a per-Aplicacao borrow lifetime and cloning the shared-ownership label into concurrent per- cluster reconcile tasks through std::sync::Arc::clone rather than a per-task allocation, a future admission-webhook rejection body whose per-arm Sync + Send-safe diagnostic column composes from a borrowed &RateLimitUnit handle across an .await boundary — reaches the substrate-primitive RateLimitUnit::as_suffix accessor through this impl and no other, without a std::sync::Arc::<str>::from(unit.as_suffix()) open-code whose type bounds have no compile-time link back to the substrate primitive.

Rust’s standard library carries impl From<&str> for std::sync::Arc<str> and impl From<String> for std::sync::Arc<str> but no blanket impl<T: AsRef<str>> From<&T> for std::sync::Arc<str> (nor a Copy-based impl<T: Copy, U: From<T>> From<&T> for U), so every closed-set fieldless typed enum peer on the substrate that carries the paired owned-input std::sync::Arc<str> axis but not the borrowed- input axis forces every borrowed-input std::sync::Arc<str>-parameterized call site through a spurious Copy deref (std::sync::Arc::<str>::from((*unit).as_suffix())) or a std::sync::Arc::<str>::from(unit.as_suffix()) open-code whose type bounds have no compile-time link back to the substrate primitive.

Closes the {Self, &Self} input-shape corner on the third-and-last peer of the M3-mesh-shape tier of the substrate-wide trait-idiomatic std::sync::Arc<str> forward-projection campaign, closing the whole M3 mesh-shape tier of the std::sync::Arc<str> axis on the M3-mesh-primitive-defining triple, exactly as 941748c closed the second peer (WitShape) one commit after its owning half (9a59b77) landed on that enum, as cc87908 closed the first peer (PlacementStrategy) one commit after its owning half (977d577), and as df7040c closed the paired Box<str> tier’s third owned-input peer on this same enum one commit after its owning half (8f7eb1a). Leaves the outside-M3 substrate- wide peers (crate::render::PathShapeViolation and the outside- caixa-core peers) as the remaining future targets of the std::sync::Arc<str> axis.

Pinned load-bearing by [tests::rate_limit_unit_from_borrowed_into_arc_str_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three- arm RateLimitUnit::ALL emit-set on the borrowed-input surface, plus a blanket-derived Into shape witness, a cross-axis partition pin against the paired owned-input [From<RateLimitUnit> for std::sync::Arc<str>] and the sibling borrowed-input {&'static str, String, Cow<'static, str>, Box<str>} return-shape axes, and a .iter().map(std::sync::Arc::<str>::from) pipe witness over RateLimitUnit::ALL — whose iterator yields &RateLimitUnit by construction, so the borrowed-input std::sync::Arc<str> axis is what routes the pipe through the substrate-primitive RateLimitUnit::as_suffix accessor without a spurious Copy deref).

Source§

fn from(unit: &RateLimitUnit) -> Arc<str>

Converts to this type from the input type.
Source§

impl From<RateLimitUnit> for &'static str

Standard-library trait-idiomatic forward projection on the RateLimitUnit closed-set typed enum. Routes byte-for-byte through the paired substrate-primitive RateLimitUnit::as_suffix pub const fn accessor so <&'static str>::from(unit) / unit.into::<&'static str>() reaches the same three-arm "s" / "m" / "h" canonical-suffix emit-set the sibling method-named accessor dispatches through and the sibling [std::fmt::Display for RateLimitUnit] / [AsRef<str> for RateLimitUnit] impls also route through.

Extends the substrate-wide closed-set-enum trait-idiomatic forward-projection family (crate::supervisor::RestartStrategy via 523157d, crate::supervisor::RestartPolicy via 9fb37d0, crate::CaixaKind via edb827b, crate::CaixaDialeto via c189a6f, PlacementStrategy via afa3562, WitShape via 56998ec) onto the third M3-mesh-primitive-defining slot enum on the caixa surface — the :politicas :rate-limit canonical-unit-suffix closed set the caixa-mesh renderer keys off end-to-end for per-Aplicacao Envoy local_rate_limit.token_bucket.fill_interval overlay emission. Pairs with the sibling [TryFrom<&str> for RateLimitUnit] impl (bf78400) to close the two-way Self ↔ &'static str round-trip on the trait-idiomatic axis pair, mirroring the pre-existing method-named RateLimitUnit::as_suffix + RateLimitUnit::from_suffix pair on the substrate-primitive axis pair.

Return type is &'static str by construction — every RateLimitUnit::as_suffix arm resolves to an inline "s" / "m" / "h" &'static str literal, so the trait’s return-type promise is upheld structurally without a String::leak cast or a per-arm inline literal outside the paired RateLimitUnit::as_suffix dispatch.

Deliberately routes through the canonical-suffix axis, not the second-magnitude RateLimitUnit::window axis — every closed-set forward-projection path on the caixa surface lands on the same author-surface-canonical byte-string the codec’s parse and render arms both dispatch on, while the token-bucket-refill period stays reachable only through the explicit RateLimitUnit::window / RateLimitUnit::from_window paths.

The paired RateLimitUnit::as_suffix accessor’s three-arm emit-set is the single source of truth — every future arm addition (a "d" day suffix once Envoy’s rate_limit_action grows daily-bucket support, a "ms" sub-second window once high-throughput per-edge policies come into scope per MESH-COMPOSITION §III.2 #3 — both trajectory items the sibling RateLimitUnit::window_from_suffix doc block already names) grows the trait-idiomatic forward axis by construction: one caixa-core edit on RateLimitUnit::as_suffix extends every one of the sibling forward-projection paths (std::fmt::Display, AsRef<str>, RateLimitUnit::as_suffix itself, and this [From<Self> for &'static str]) without a coordinated rewrite across every future Into<&'static str>-bound consumer’s arm-set.

Pinned load-bearing by [tests::rate_limit_unit_from_into_static_str_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three-arm emit-set, plus a const-context materialization witness for the &'static str lifetime promise routed through the paired RateLimitUnit::as_suffix pub const fn accessor, plus a paired .into() shape assertion covering the blanket-derived Into<&'static str> shape) and [tests::rate_limit_unit_from_into_static_str_and_as_suffix_partition_the_emit_set] (partition pin asserting <&'static str as From<RateLimitUnit>>::from and RateLimitUnit::as_suffix agree on every arm, plus a two-way direct round-trip witness through the paired trait-idiomatic TryFrom<&str> axis that closes the two-way Self ↔ &'static str round-trip on the trait-idiomatic axis pair — the emit-side RateLimitUnit::as_suffix and the parse-side RateLimitUnit::from_suffix dispatch on the same three inline canonical-suffix byte-strings by construction, so round-tripping composes the two trait impls directly).

Source§

fn from(unit: RateLimitUnit) -> &'static str

Converts to this type from the input type.
Source§

impl From<RateLimitUnit> for String

Trait-idiomatic forward projection on the M3 mesh-primitive :politicas :rate-limit canonical-suffix RateLimitUnit closed-set typed enum from an owned input onto the owned-String axis — routes byte-for-byte through the substrate-primitive RateLimitUnit::as_suffix pub const fn accessor so every consumer that binds a RateLimitUnit through the standard-library .into() / [From<Self> for String] (equivalently Into<String>) axis reaches the same three-arm "s" / "m" / "h" canonical-suffix byte-string the paired owned-input [From<RateLimitUnit> for &'static str] (7fdfbf4), the borrowed-input [From<&RateLimitUnit> for &'static str] (f4b9e6b), the sibling std::fmt::Display, AsRef<str>, and RateLimitUnit::as_suffix surfaces already return.

Extends the trait-idiomatic owned-String forward-projection family (opened on crate::supervisor::RestartStrategy — 7baa18a — the first-mover on the M2 OTP-shape sibling-restart-strategy axis, extended onto crate::supervisor::RestartPolicy — 7851725 — the second-of-two-in-M2 per-child restart-decision axis, then onto crate::CaixaKind — 231a18c — the structurally most fundamental closed-set fieldless typed enum on the caixa surface, then onto crate::CaixaDialeto — 88942cd — the dialect-classification axis, then onto crate::dep::DepList — 32b0ee8 — the two-list dep-graph axis, then onto PlacementStrategy — 1154c2f — the first M3 mesh-primitive-defining slot enum, then onto WitShape — 79a8723 — the second M3 mesh-primitive-defining slot enum on the caixa surface) onto the eighth peer: the M3 mesh-primitive :politicas :rate-limit canonical-suffix axis RateLimitUnit carries. Third (and last) M3-mesh-primitive-defining closed-set typed enum to converge onto this owned-String forward-projection campaign — the caixa-mesh renderer keys off this axis end-to-end for per-Aplicacao Envoy local_rate_limit.token_bucket.fill_interval overlay emission, so every future consumer that promotes canonical-suffix output onto an owned-heap-string carrier (the future M4 admission-webhook rejection body’s accepted-:politicas :rate-limit enumeration, a future HashMap::<String, RateLimitUnit>::from_iter(…) owned-key per-unit lookup, a future serde_json::Value::String(unit.into()) structured- payload composer) now reaches the substrate-primitive accessor through one uniform trait dispatch.

Rust’s standard library does not carry a blanket impl<T: AsRef<str>> From<T> for String (nor an impl<T: fmt::Display> From<T> for String), so every closed-set typed enum that carries the paired AsRef<str> / std::fmt::Display / [From<Self> for &'static str] / [From<&Self> for &'static str] quadruple but not the owned-String axis forces every owned-string call site through a .to_string() / .as_suffix().to_owned() / String::from(unit.as_suffix()) detour whose type bounds have no compile-time link to the substrate primitive.

Same as the peer crate::supervisor::RestartStrategy / crate::supervisor::RestartPolicy / crate::CaixaDialeto / crate::dep::DepList / PlacementStrategy / WitShape owned-String axis pairs (whose forward emit and reverse parse share one vocabulary by construction), RateLimitUnit’s RateLimitUnit::as_suffix emit and RateLimitUnit::from_suffix parse resolve through the same three inline canonical-suffix byte-strings by construction (there is no wire/diagnostic axis split on this enum — both halves route through the same three match-arm- inline &'static str values "s" / "m" / "h"), so the owned-String forward projection this impl exposes composes directly with the paired trait-idiomatic reverse TryFrom<&str> axis on the owned-String’s String::as_str borrow — no intermediate wire-vocab hop like the peer crate::CaixaKind axis pair requires.

Deliberately routes through the canonical-suffix axis, not the second-magnitude RateLimitUnit::window axis — the owned-String From lands on the same author-surface-canonical byte-string the codec’s parse and render arms both dispatch on, while the token- bucket-refill period stays reachable only through the explicit RateLimitUnit::window / RateLimitUnit::from_window paths, so the canonical-suffix / token-bucket-refill two-axis split the sibling owned-input and borrowed-input &'static str axes already carry reaches the owned-String axis by construction.

The remaining seven closed-set typed enums on the caixa substrate surface (PathShapeViolation, InvariantKind, ArchVerdict, Severity, FixSafety, Semantic, FerriteRuntime) are the future targets of this campaign — each carries the same paired AsRef<str> / std::fmt::Display / [From<Self> for &'static str] / [From<&Self> for &'static str] quadruple that this owned-String axis extends onto.

Pinned load-bearing by [tests::rate_limit_unit_from_into_owned_string_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three-arm RateLimitUnit::ALL emit-set plus a blanket .into::<String>() shape witness) and [tests::rate_limit_unit_from_into_owned_string_and_static_str_agree_on_every_arm] (cross-axis partition against the sibling owned-&'static str axis and the ToString::to_string surface, a .iter().copied().map(String::from) pipe witness over RateLimitUnit::ALL, plus a direct Self → String → Self round-trip via TryFrom<&str> on the owned-String’s String::as_str borrow — composes directly without the wire-vocab intermediate hop the peer crate::CaixaKind axis pair requires).

Source§

fn from(unit: RateLimitUnit) -> String

Converts to this type from the input type.
Source§

impl From<RateLimitUnit> for Cow<'static, str>

Trait-idiomatic forward projection on the M3 mesh-primitive :politicas :rate-limit canonical-suffix RateLimitUnit closed-set typed enum from an owned input onto the std::borrow::Cow<'static, str> axis — routes byte-for-byte through the substrate-primitive RateLimitUnit::as_suffix pub const fn accessor (via std::borrow::Cow::Borrowed) so every consumer that binds a RateLimitUnit through the standard-library .into() / [From<Self> for std::borrow::Cow<'static, str>] (equivalently Into<std::borrow::Cow<'static, str>>) axis reaches the same three-arm inline "s" / "m" / "h" canonical-suffix byte- string the paired [From<RateLimitUnit> for &'static str], [From<&RateLimitUnit> for &'static str], [From<RateLimitUnit> for String], and [From<&RateLimitUnit> for String] 2×2 trait-idiomatic forward-projection corners, the sibling std::fmt::Display, AsRef<str>, and RateLimitUnit::as_suffix surfaces already return, rather than an open-coded per-call-site std::borrow::Cow::Borrowed(unit.as_suffix()) / std::borrow::Cow::Owned(unit.to_string()) composition whose type bounds have no compile-time link back to the substrate primitive.

Deliberately returns std::borrow::Cow::Borrowed rather than std::borrow::Cow::Owned — the substrate-primitive RateLimitUnit::as_suffix accessor’s return carries the &'static str lifetime by construction (each match arm resolves to one of the three inline "s" / "m" / "h" byte- strings with static lifetime), so the zero-alloc borrowed arm is the type-correct projection with no runtime allocation. The paired std::borrow::Cow::Owned arm stays reachable at the call site through the existing [From<RateLimitUnit> for String] axis composed with std::borrow::Cow::from on the resulting owned String — a caller who chose to mutate the projection lands on the owned arm by their own composition, not by the substrate-primitive projection silently allocating on their behalf.

Rust’s standard library carries no blanket impl<T: AsRef<str>> From<T> for Cow<'static, str> (nor an impl<T: fmt::Display> From<T> for Cow<'static, str>), so the paired sibling [From<RateLimitUnit> for &'static str], [From<RateLimitUnit> for String], AsRef<str>, and std::fmt::Display surfaces do not implicitly extend to a [Cow<'static, str>]-bound call site — every such site is forced through a Cow::Borrowed(unit.as_suffix()) / Cow::Owned(unit.to_string()) open-code whose type bounds have no compile-time link back to the substrate primitive until this lift.

Third — and last — M3-mesh-primitive-defining peer on the substrate-wide trait-idiomatic std::borrow::Cow<'static, str> forward-projection campaign, closing the M3-mesh-shape tier of the axis onto its final closed-set fieldless typed enum. The WitShape :contratos :wit census-label first-mover (8634dec owned-input + 25690ef borrowed-input) opened the tier on the first M3-mesh-primitive peer; the paired PlacementStrategy :placement :estrategia distribution-strategy peer (eee504d owned-input + afdf0f4 borrowed-input) extended it onto the second peer. The CaixaKind top-level first-mover (99c1735 owned-input + d45c409 borrowed-input) opened the axis on the structurally most fundamental closed-set fieldless typed enum; the paired M2 OTP-shape crate::supervisor::RestartStrategy (7dd28b3 + 9b3e4b3) and crate::supervisor::RestartPolicy (0612398 + ee577fd) closed the M2 OTP-shape tier. The outside-M3 substrate-wide peers (crate::dep::DepList, crate::CaixaDialeto, crate::render::PathShapeViolation, and the outside- caixa-core peers InvariantKind, ArchVerdict, Severity, FixSafety, Semantic, FerriteRuntime) are the remaining future targets of this campaign; closing the owned-input corner on RateLimitUnit leaves only the paired borrowed-input [From<&RateLimitUnit> for std::borrow::Cow<'static, str>] {Self, &Self}-closer as the last un-lifted axis on the M3-mesh-primitive triple.

Same three-path convergence discipline as the paired sibling [From<RateLimitUnit> for &'static str] / [From<RateLimitUnit> for String] / std::fmt::Display / AsRef<str> surfaces (this [Cow<'static, str>] axis, the paired sibling surfaces, and RateLimitUnit::as_suffix all route through the same three inline "s" / "m" / "h" byte- strings by construction), so a future variant addition, rename, or per-arm suffix drift reaches every forward-projection path through exactly one caixa-core edit at the RateLimitUnit::as_suffix match head.

Pinned load-bearing by [tests::rate_limit_unit_from_into_static_cow_str_routes_through_as_suffix_accessor] (byte-parity + zero-alloc std::borrow::Cow::Borrowed-arm pin against RateLimitUnit::as_suffix across the three-arm RateLimitUnit::ALL) and [tests::rate_limit_unit_from_into_static_cow_str_agrees_with_paired_axes_on_every_arm] (cross-axis partition pin against the paired [From<RateLimitUnit> for &'static str], [From<RateLimitUnit> for String], and ToString-through-std::fmt::Display axes, plus a .iter().copied().map(Cow::from) pipe witness over RateLimitUnit::ALL that materializes the three-arm accept-set through the [Cow<'static, str>] axis alone and pins the zero-alloc discipline on every element).

Source§

fn from(unit: RateLimitUnit) -> Cow<'static, str>

Converts to this type from the input type.
Source§

impl From<RateLimitUnit> for Box<str>

Trait-idiomatic owned-input, Box<str> output forward projection on the M3-mesh-primitive-defining :politicas :rate-limit canonical- suffix RateLimitUnit closed-set fieldless typed enum. Routes byte- for-byte through the substrate-primitive RateLimitUnit::as_suffix pub const fn accessor via Box::<str>::from on the returned &'static str, so every consumer that binds a let key: Box<str> = unit.into();-shaped call site — a per-Aplicacao rate-limit-suffix census-key materializer that stashes the :politicas :rate-limit canonical-suffix discriminator in a Box<str>-typed heap-owned scalar for cheap clone (the shared- nothing per-suffix accept-set the future M4 mesh.pleme.io/v1alpha1/Aplicacao CR reconciliation scheduler carries when it fans on the rate-limit partition), a future admission-webhook rejection body whose per-arm Box<str> field composes from an owned RateLimitUnit handle, a future feira app graph --by-rate-limit-unit histogram-column emitter that stashes each arm as an owned Box<str> label — reaches the same three-arm inline "s" / "m" / "h" canonical-suffix byte-string the sibling {Self, &Self} × {&'static str, String, Cow<'static, str>} forward-projection corner already returns.

Rust’s standard library carries impl From<&str> for Box<str> and impl From<String> for Box<str> but no blanket impl<T: AsRef<str>> From<T> for Box<str>, so this axis is a distinct trait-idiomatic surface that a downstream RateLimitUnit → Box<str> .into() reaches through this impl and no other — without a Box::from(unit.as_suffix()) open-code whose type bounds have no compile-time link back to the substrate primitive.

Extends the M3-mesh-shape tier of the substrate-wide trait-idiomatic Box<str> forward-projection campaign onto its third — and last — M3-mesh-primitive-defining slot enum, closing the owned-input surface of the whole M3 mesh-shape tier. The PlacementStrategy :placement :estrategia distribution-strategy first-mover (6d73e84 owned-input + 3c971b2 borrowed-input) opened the tier; the paired WitShape :contratos :wit census-label peer (bdca41a owned-input + 57ca75e borrowed-input) extended it onto the second peer. Same discipline as the peer crate::supervisor::RestartStrategy / crate::supervisor::RestartPolicy M2-OTP-shape Box<str> axes: forward emit (this impl, the sibling {&'static str, String, Cow<'static, str>} forward-projection corner, std::fmt::Display, AsRef<str>, RateLimitUnit::as_suffix) and reverse parse (RateLimitUnit::from_suffix, TryFrom<&str>) route through the same three inline "s" / "m" / "h" canonical- suffix byte-strings RateLimitUnit::as_suffix returns by construction, so the round-trip composes directly without a canonical-suffix intermediate hop.

Leaves the paired borrowed-input [From<&RateLimitUnit> for Box<str>] {Self, &Self}-closer as the last un-lifted axis on the M3-mesh-primitive triple — closing that borrowed-input corner closes the whole M3 mesh-shape tier of the substrate-wide Box<str> forward-projection campaign.

Pinned load-bearing by [tests::rate_limit_unit_from_into_box_str_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three-arm RateLimitUnit::ALL emit-set on the owned-input surface, plus a blanket-derived Into shape witness).

Source§

fn from(unit: RateLimitUnit) -> Box<str>

Converts to this type from the input type.
Source§

impl From<RateLimitUnit> for Arc<str>

Trait-idiomatic owned-input, std::sync::Arc<str> output forward projection on the M3-mesh-primitive-defining :politicas :rate-limit canonical-suffix RateLimitUnit closed-set fieldless typed enum — extends the M3-mesh-shape tier of the substrate-wide trait-idiomatic std::sync::Arc<str> forward-projection campaign onto its third — and last — M3-mesh-primitive-defining slot enum. The PlacementStrategy :placement :estrategia distribution-strategy first-mover (977d577 owned-input + cc87908 borrowed-input) opened the tier; the paired WitShape :contratos :wit census-label peer (9a59b77 owned-input + 941748c borrowed-input) extended it onto the second peer. Routes byte-for-byte through the substrate-primitive RateLimitUnit::as_suffix pub const fn accessor via std::sync::Arc::<str>::from on the returned &'static str.

Every consumer that binds a RateLimitUnit through the standard- library .into() / [From<Self> for std::sync::Arc<str>] (equivalently Into<std::sync::Arc<str>>) axis — a future caixa-mesh renderer’s per-Aplicacao :politicas :rate-limit canonical-suffix census-key materializer holding a shared-ownership per-arm Sync + Send-safe label across concurrent tokio-scheduled reconcile loops (cloning through std::sync::Arc::clone rather than allocating per-task), a future admission-webhook’s per-request rejection body whose per-arm shared-ownership diagnostic column composes from a moved RateLimitUnit handle across an .await boundary through a <T: Into<std::sync::Arc<str>>>-bound structured- log dispatch, a future <T: Into<std::sync::Arc<str>>>-bound tracing-span attributes collector recording an owned RateLimitUnit per-arm field onto the parent span’s shared- ownership context — reaches the same three-arm inline "s" / "m" / "h" canonical-suffix byte-string the sibling {Self, &Self} × {&'static str, String, Cow<'static, str>, Box<str>} forward-projection corner already returns.

Rust’s standard library carries impl From<&str> for std::sync::Arc<str> and impl From<String> for std::sync::Arc<str> but no blanket impl<T: AsRef<str>> From<T> for std::sync::Arc<str> (nor an impl<T: fmt::Display> From<T> for std::sync::Arc<str>), so this axis is a distinct trait-idiomatic surface that a let key: std::sync::Arc<str> = unit.into();-shaped call site reaches through this impl and no other — a paired std::sync::Arc::<str>::from(unit.as_suffix()) open-code has no compile-time link back to the substrate primitive, and a two-step std::sync::Arc::<str>::from(String::from(unit)) composition through the owned-String axis allocates twice (once into the intermediate String, once into the std::sync::Arc<str> on the From<String> conversion) where the single-step trait impl allocates once. The shared-ownership + Sync + Send contract std::sync::Arc<str> provides is the distinct value the sibling Box<str> axis’s owned- move return-shape cannot provide — a per-Aplicacao :politicas :rate-limit canonical-suffix census-label reachable from multiple concurrent per-cluster reconcile tasks through the same three-arm canonical-suffix byte-string, without a .clone()-per-task materialization the owned-move Box<str> axis would force.

Third — and last — peer on the M3-mesh-shape tier of the substrate- wide trait-idiomatic std::sync::Arc<str> forward-projection campaign; closes the owned-input surface of the whole M3 mesh-shape tier on the M3-mesh-primitive-defining triple, exactly as 8f7eb1a closed the paired Box<str> tier’s third owned-input peer on this same enum. Leaves the paired borrowed-input [From<&RateLimitUnit> for std::sync::Arc<str>] {Self, &Self}-closer as the last un-lifted axis on the M3-mesh-primitive triple — closing that borrowed-input corner closes the whole M3 mesh-shape tier of the substrate-wide std::sync::Arc<str> forward-projection campaign.

Pinned load-bearing by [tests::rate_limit_unit_from_into_arc_str_routes_through_as_suffix_accessor] (byte-parity pin against RateLimitUnit::as_suffix across the three-arm RateLimitUnit::ALL emit-set on the owned-input surface, plus a blanket-derived Into shape witness and cross-axis byte- parity pins against the sibling owned-input {&'static str, String, Cow<'static, str>, Box<str>} return-shape axes).

Source§

fn from(unit: RateLimitUnit) -> Arc<str>

Converts to this type from the input type.
Source§

impl Hash for RateLimitUnit

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for RateLimitUnit

Source§

fn eq(&self, other: &RateLimitUnit) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RateLimitUnit

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RateLimitUnit

Source§

impl TryFrom<&str> for RateLimitUnit

Trait-idiomatic reverse projection on the M3-mesh-primitive-defining RateLimitUnit closed-set typed enum — routes byte-for-byte through the paired substrate-primitive RateLimitUnit::from_suffix Option<Self> accessor so every future consumer that binds a canonical :politicas :rate-limit unit-suffix byte-string through the standard-library .try_into() / TryFrom axis (a future feira app policy --rate-limit-unit <s|m|h> CLI arg-parse that composes into let unit: RateLimitUnit = s.try_into()?, a future mesh.pleme.io/v1alpha1/Aplicacao CR admission-webhook that folds a spec.politicas.rateLimit.unit: String field through RateLimitUnit::try_from(&s)?, a generic <T: TryFrom<&str>>-bound loader over any of the substrate’s closed-set typed enums) reaches the same three-arm accept-set the sibling RateLimitUnit::from_suffix resolver parses through and the sibling RateLimitUnit::as_suffix emits, rather than an open-coded per-arm match s { "s" => …, "m" => …, "h" => …, _ => … } cascade whose arm-set has no compile-time link back to the substrate primitive.

Complements the pre-existing forward-projection triple (std::fmt::Display, AsRef<str>, RateLimitUnit::as_suffix) with the paired trait-idiomatic reverse-projection axis: Rust-side newtype/typed-enum convention pairs AsRef<str> with either std::str::FromStr or TryFrom<&str> on the same primitive so a caller who can project out to a &str can also project in from one. The TryFrom<&str> axis is deliberately chosen over std::str::FromStr to sidestep the clippy::should_implement_trait lint the sibling method-named RateLimitUnit::from_suffix would trigger under a FromStr impl (the same design tradeoff the peer crate::CaixaKind (3c83606), crate::CaixaDialeto (bf33136), PlacementStrategy (6fd00cd), crate::supervisor::RestartStrategy (5b828ed), crate::supervisor::RestartPolicy (6fdd0d9), and WitShape (5472902) blocks note) — this impl closes the trait- idiomatic reverse axis without disturbing the method-named from_suffix shape the peer closed-set typed enums already carry.

type Error = () matches the sibling RateLimitUnit::from_suffix’s Option<Self> return-shape’s deliberate deferral of error typing: the caller picks the diagnostic form appropriate for its use site (a future feira app policy --rate-limit-unit arg-parse composes its own per-verb “unknown rate-limit unit: — accepted: {…}” message enumerating RateLimitUnit::ALL, a future M4 admission- webhook rejection body wraps the Err(()) outcome with the accepted- set enumeration for operator diagnostics, a Result::map_err at the call site lifts the unit-error to a per-verb error type). Same shape the peer sibling reverse-projection axes carry.

The paired TryFrom<&str> impl reaches the same three-arm accept- set the RateLimitUnit::from_suffix resolver dispatches through, so any future arm addition (a "d" day suffix once Envoy’s rate_limit_action grows daily-bucket support, a "ms" sub-second window once high-throughput per-edge policies come into scope per MESH-COMPOSITION §III.2 #3 — both trajectory items the sibling RateLimitUnit::window_from_suffix doc block already names) grows the trait-idiomatic axis by construction — one caixa-core edit on RateLimitUnit::from_suffix extends both the method-named reverse projection every existing consumer keys off and the trait-idiomatic reverse projection this impl exposes, without a coordinated rewrite across every future TryFrom<&str>-bound consumer’s arm-set.

Extends the substrate-wide closed-set-enum trait-idiomatic reverse- projection family (crate::CaixaKind via 3c83606, crate::CaixaDialeto via bf33136, PlacementStrategy via 6fd00cd, crate::supervisor::RestartStrategy via 5b828ed, crate::supervisor::RestartPolicy via 6fdd0d9, WitShape via 5472902) onto the third M3-mesh-primitive-defining slot enum on the caixa surface — the :politicas :rate-limit unit-suffix closed set the caixa-mesh renderer keys off end-to-end for per-Aplicacao Envoy local_rate_limit.token_bucket.fill_interval overlay emission, and the future M4 mesh.pleme.io/v1alpha1/Aplicacao CR admission- webhook’s per-:politicas accept-set validation.

Pinned load-bearing by [tests::rate_limit_unit_try_from_str_routes_through_from_suffix_accessor] (byte-parity pin against RateLimitUnit::from_suffix across the three-arm accept-set) and [tests::rate_limit_unit_try_from_str_rejects_unknown_byte_strings] (rejection witness against silent accept-set widening).

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.