pub struct CaixaVersion(pub String);Expand description
A caixa’s pinned version — a thin typed wrapper over a String that parses
as semver::Version on demand.
Stored as a String at rest so authoring a caixa.lisp stays a single
quoted literal. The typed form is reached through Self::parse.
Tuple Fields§
§0: StringImplementations§
Trait Implementations§
Source§impl AsRef<[u8]> for CaixaVersion
Trait-idiomatic byte-view borrow projection on the CaixaVersion
newtype primitive — the byte-view mirror of the pre-existing sibling
AsRef<str> str-view borrow projection on this same primitive.
Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor via str::as_bytes
so every consumer that binds a CaixaVersion through the standard-
library impl AsRef<[u8]> bound reaches the wrapped String’s
byte-tail through one substrate-primitive dispatch rather than through
the pre-lift open-coded v.as_str().as_bytes() /
<CaixaVersion as AsRef<str>>::as_ref(&v).as_bytes() two-hop
composition whose bounds carry no compile-time link back to the
newtype’s storage.
impl AsRef<[u8]> for CaixaVersion
Trait-idiomatic byte-view borrow projection on the CaixaVersion
newtype primitive — the byte-view mirror of the pre-existing sibling
AsRef<str> str-view borrow projection on this same primitive.
Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor via str::as_bytes
so every consumer that binds a CaixaVersion through the standard-
library impl AsRef<[u8]> bound reaches the wrapped String’s
byte-tail through one substrate-primitive dispatch rather than through
the pre-lift open-coded v.as_str().as_bytes() /
<CaixaVersion as AsRef<str>>::as_ref(&v).as_bytes() two-hop
composition whose bounds carry no compile-time link back to the
newtype’s storage.
The primary compounding target is the crate-adjacent
caixa-lacre BLAKE3 content-address closure:
[blake3::hash] and [blake3::Hasher::update] both bind their input
through impl AsRef<[u8]>, so any future per-caixa content-address
tag that folds a :versao byte-tail into the [crate::Lacre] closure
(a hypothetical hasher.update(caixa.versao());-shape composition on
the per-caixa BLAKE3 closure builder, a future per-Membro :versao
requirement fold on the M3-mesh lacre snapshot the operator’s
admission cycle pins each Aplicacao’s :membros :versao accept-set
against, a future per-ChildSpec :versao-requirement fold on the
M2-OTP-shape supervisor-tree lacre snapshot) reaches the substrate-
primitive CaixaVersion::as_str accessor through this impl and no
other. Peer consumer paths on the byte-view axis: any future
std::io::Write::write_all-bound diagnostic sink (whose input binds
through impl AsRef<[u8]>), any future byte-keyed
std::collections::HashMap <K: AsRef<[u8]>, V> lookup whose entry-
key trait bound rules out the sibling AsRef<str> str-view
projection, and any future ring::digest::Context::update /
sha2::Sha256::update / blake3::Hasher::update byte-input surface
on any future per-:versao content-address digest.
Rust’s standard library carries impl AsRef<[u8]> for str and
impl AsRef<[u8]> for String, so the two-hop composition
v.as_str().as_bytes() (equivalently
AsRef::<str>::as_ref(&v).as_bytes()) is reachable through the pre-
existing str-view axis alone. But that two-hop shape has no compile-
time link back to the byte-projection axis, forces every downstream
<T: AsRef<[u8]>>-bound consumer to open-code the two-hop composition
at every call site rather than pass a CaixaVersion through the
trait bound directly, and admits a silent split whenever a future call
site takes a sibling reverse-projection axis (a String::from(v)
unwrap, a Box::<str>::from(&v) fit-to-length boxed slice, a
Cow::<'static, str>::from(v) owned-arm wrap) whose .as_bytes()
byte-tail byte-equals as_str’s by construction but carries no
compile-time byte-view surface. The lifted single-hop impl closes the
byte-view axis so every future <T: AsRef<[u8]>>-bound consumer
reaches the substrate primitive through one trait dispatch, and any
future rebrand of the wrapped storage (a hypothetical widening to a
typed semver::Version slot once eager parse-on-construct
discipline lands) migrates the byte-view surface in lockstep with the
paired AsRef<str> / fmt::Display / std::borrow::Borrow<str>
projections at the shared CaixaVersion::as_str accessor.
Rust-side newtype convention pairs AsRef<str> and [AsRef<[u8]>]
on the same primitive (the standard library’s own String carries
both — impl AsRef<str> for String + impl AsRef<[u8]> for String —
on the same borrow-projection axis), so a newtype that carries one but
not the other splits off the convention that lets every
String-shaped consumer swap the newtype in without re-shaping its
bounds. This impl closes that split on CaixaVersion, mirroring the
paired [AsRef<[u8]>] byte-view axis every closed-set fieldless typed
enum peer on the substrate already carries
(crate::CaixaKind at kind.rs:1791, crate::CaixaDialeto at
dialeto.rs:1885, crate::dep::DepList at dep.rs:4616,
crate::supervisor::RestartStrategy at supervisor.rs:1518,
crate::supervisor::RestartPolicy at supervisor.rs:3385,
crate::aplicacao::WitShape at aplicacao.rs:1955,
crate::aplicacao::RateLimitUnit at aplicacao.rs:8900,
crate::aplicacao::PlacementStrategy at aplicacao.rs:12231), now
extended onto the substrate’s core String-wrapper newtype primitive.
The str-view axes stay reachable for the borrowed &str and
formatter-output paths, this impl closes the byte-view axis at the
same shared substrate-primitive accessor.
Pinned load-bearing by
[tests::caixa_version_as_ref_bytes_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str .as_bytes(), plus
cross-axis witness against the paired AsRef<str> and
fmt::Display axes’ .as_bytes() byte-tails, plus a
<T: AsRef<[u8]>>-bound-consumer witness that a generic byte-input
function accepts a CaixaVersion directly through the trait bound
and reaches the wrapped body without the caller open-coding the
two-hop projection). Any future silent detour that routes the byte-
view impl off the substrate-primitive CaixaVersion::as_str
accessor (a swap onto self.0.as_bytes() re-inlining that bypasses
the shared pub const fn dispatch, a stray normalization step that
would drop whitespace or canonicalize a prerelease tag ahead of the
byte-view emit, a swap onto a hypothetical future semver::Version
re-serialization that would strip the raw at-rest storage discipline
CaixaVersion carries by construction) trips at caixa-core test
time under assert_eq! rather than at a downstream impl AsRef<[u8]>-
bound consumer’s silent split.
Source§impl AsRef<str> for CaixaVersion
Substrate-canonical AsRef<str> projection on the CaixaVersion
typed newtype — routes through the same CaixaVersion::as_str
pub const fn scalar accessor the sibling fmt::Display impl
and every downstream &str-shaped consumer already keys off, so
any future consumer that binds a CaixaVersion through the
standard-library impl AsRef<str> bound (a Path-shaped file-
system reader on the operator side that accepts the version body
as one segment of a per-caixa versao/<v>/... on-disk cache path,
a builder-shaped API on the future feira publish writer verb
that composes <prefix><versao> through a git-tag builder crate’s
impl AsRef<str> join step, a HashMap<CaixaVersion, _> lookup
through the map.get::<str>(v.as_ref()) shape a future
version-keyed dispatch table lands on) reaches the wrapped
String through one substrate-primitive dispatch rather than
through the pre-lift .as_str() open-coded projection at every
wire-up.
impl AsRef<str> for CaixaVersion
Substrate-canonical AsRef<str> projection on the CaixaVersion
typed newtype — routes through the same CaixaVersion::as_str
pub const fn scalar accessor the sibling fmt::Display impl
and every downstream &str-shaped consumer already keys off, so
any future consumer that binds a CaixaVersion through the
standard-library impl AsRef<str> bound (a Path-shaped file-
system reader on the operator side that accepts the version body
as one segment of a per-caixa versao/<v>/... on-disk cache path,
a builder-shaped API on the future feira publish writer verb
that composes <prefix><versao> through a git-tag builder crate’s
impl AsRef<str> join step, a HashMap<CaixaVersion, _> lookup
through the map.get::<str>(v.as_ref()) shape a future
version-keyed dispatch table lands on) reaches the wrapped
String through one substrate-primitive dispatch rather than
through the pre-lift .as_str() open-coded projection at every
wire-up.
Peer of the sibling fmt::Display impl on the same primitive —
both delegate to the shared CaixaVersion::as_str pub const fn accessor, so [format!("{v}")], v.as_str(), and
<CaixaVersion as AsRef<str>>::as_ref(&v) resolve to the same
byte-string per instance by construction. A future rebrand of the
wrapped storage (a hypothetical widening to a typed semver::Version
slot the roadmap acknowledges once eager parse-on-construct
discipline lands, an internal normalization step that trims
leading zeroes off pre-release identifiers, a per-cluster overlay
the operator pins through a future :versao-overrides slot) that
changes what CaixaVersion::as_str returns migrates every
consumer of every one of the three paths in lockstep.
Same “route the trait impl through the substrate-primitive
accessor” discipline the sibling fmt::Display impl on this
type already carries — extends it onto the standard-library
AsRef<str> projection axis every third-party API that takes
impl AsRef<str> (the std::path::Path::new / std::fs
interop surface, std::process::Command::arg, the peer
tracing::field::Value recorder’s Str-arm, every clap-side
value_parser! fold that accepts an owned newtype through
impl AsRef<str>) already binds through. Rust-side newtype
convention pairs AsRef<str> and fmt::Display on the same
primitive so a caller who has one has both; before this lift,
CaixaVersion carried fmt::Display but not the paired
AsRef<str> impl the convention names.
The first standard-library trait added to CaixaVersion beyond
the pre-existing serde::Serialize / serde::Deserialize /
Debug / Clone / PartialEq / Eq / Hash derives
and the paired fmt::Display / From<String> / From<&str>
hand-written impls. Pinned load-bearing by
[tests::caixa_version_as_ref_str_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str) — any future
silent detour that routes the impl through a divergent projection
(a Cow<'_, str> intermediate, a stray .to_lowercase()
normalization, a swap onto a per-arm inline &self.0.as_str()
re-inlining) trips at caixa-core test time under assert_eq!
rather than at a downstream impl AsRef<str>-bound consumer’s
silent split.
Source§impl Borrow<str> for CaixaVersion
Trait-idiomatic HashMap-key-shaped borrow projection on the
CaixaVersion newtype primitive — the standard-library
std::borrow::Borrow<str> companion to the paired sibling
AsRef<str> impl (a086 lift) on the same borrow-projection axis of
this primitive. Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor — the same accessor
the paired AsRef<str> and fmt::Display impls already delegate
through — so every consumer that binds a CaixaVersion through the
standard-library Borrow<str> bound reaches the wrapped byte-string
through one substrate-primitive dispatch rather than through a
pre-lift .as_str() open-coded projection at every wire-up.
impl Borrow<str> for CaixaVersion
Trait-idiomatic HashMap-key-shaped borrow projection on the
CaixaVersion newtype primitive — the standard-library
std::borrow::Borrow<str> companion to the paired sibling
AsRef<str> impl (a086 lift) on the same borrow-projection axis of
this primitive. Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor — the same accessor
the paired AsRef<str> and fmt::Display impls already delegate
through — so every consumer that binds a CaixaVersion through the
standard-library Borrow<str> bound reaches the wrapped byte-string
through one substrate-primitive dispatch rather than through a
pre-lift .as_str() open-coded projection at every wire-up.
A future consumer that wants to key a map or set by
CaixaVersion and look up entries by a borrowed &str — a
per-:versao compatibility matrix HashMap<CaixaVersion, PolicyRow>
where the reconciliation loop’s per-cycle .get(current_versao_str)
probes the map with the raw &str view of the current cluster
snapshot’s version body (the HashMap::get<Q: ?Sized> signature is
where K: Borrow<Q>, Q: Hash + Eq; without this impl the caller must
wrap the borrowed &str in a fresh CaixaVersion allocation on
every probe), a future BTreeMap<CaixaVersion, _>::range(..) sweep
over a per-versao index that accepts a borrowed &str range bound
through the same Borrow<str> bound, a
HashSet<CaixaVersion>::contains(&str) membership probe on a
per-versao denylist keyed by owned CaixaVersion but queried by
the borrowed view — reaches the wrapped byte-string through this one
dispatch on the substrate primitive, without the pre-lift
CaixaVersion::from(<&str>) per-probe allocation the paired forward
[From<&str> for CaixaVersion] constructor would otherwise force at
every lookup site.
Peer of the sibling AsRef<str> impl on the same borrow-projection
axis — both project a borrowed &self binding onto a borrowed &str
via the shared substrate-primitive CaixaVersion::as_str accessor.
Rust’s standard library deliberately splits the two trait axes on the
two bounds they carry: AsRef<str> is the conversion bound used
by APIs that accept impl AsRef<str> and view the input as a &str
projection (the std::path::Path::new / std::fs interop
surface, std::process::Command::arg, [clap]-side
value_parser! folds), while std::borrow::Borrow<str> is the
stricter identity bound the collection APIs
(std::collections::HashMap, std::collections::BTreeMap,
std::collections::HashSet, std::collections::BTreeSet) key
their lookup surfaces off — std::borrow::Borrow additionally
promises that a borrowed view produced through [Borrow::borrow]
hashes and compares byte-identically to the owned form, which is the
contract std::collections::HashMap::get relies on when it hashes
the query key through Q (str) and matches against slot keys
hashed through K (CaixaVersion). The CaixaVersion newtype
meets that contract by construction: the derived Hash impl hashes
the wrapped String field, which (through the standard-library
impl Hash for String { fn hash(...) { (**self).hash(...) } }
pass-through) dispatches to [str::hash] on the raw bytes — the same
dispatch a direct .hash() on the &str returned by
[Self::borrow] would take. The derived PartialEq and Eq
impls compare field-wise (byte-equal on the wrapped String), so
cv1 == cv2 reduces to cv1.borrow() == cv2.borrow() at the
&str-projection axis. Both invariants — hash-agrees and
eq-agrees — hold structurally, so this impl is sound under the
std::borrow::Borrow documented safety contract.
Same “one substrate-primitive dispatch, one shared accessor” discipline
the paired AsRef<str> impl on this primitive already carries —
extends it onto the std::borrow::Borrow<str> projection axis the
standard-library collection APIs key their .get::<Q> /
.contains::<Q> / .range::<R, T> / .remove::<Q> lookup surfaces
off. Rust’s standard library mirrors this exact pairing on its own
String primitive (impl AsRef<str> for String +
impl Borrow<str> for String), so a newtype that carries one axis
but not the other splits off the convention that lets every
String-shaped consumer swap the newtype in without re-shaping
its bounds.
Pinned load-bearing by
[tests::caixa_version_borrow_str_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str on the same
instance),
[tests::caixa_version_borrow_str_and_as_ref_str_agree_on_every_shape]
(cross-axis partition pin against the paired AsRef<str> impl,
closing the “borrow-axis two-corner split” bifurcation on the same
wrapped body), and
[tests::caixa_version_borrow_str_enables_hashmap_lookup_by_borrowed_key]
(contract-witness pin routing a std::collections::HashMap::get
probe against a &str key through the Borrow<str> bound on a map
keyed by owned CaixaVersion, asserting the collection APIs reach
the same slot the borrowed and owned forms compose the same hash for).
Source§impl Clone for CaixaVersion
impl Clone for CaixaVersion
Source§impl Debug for CaixaVersion
impl Debug for CaixaVersion
Source§impl<'de> Deserialize<'de> for CaixaVersion
impl<'de> Deserialize<'de> for CaixaVersion
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>,
Source§impl Display for CaixaVersion
impl Display for CaixaVersion
impl Eq for CaixaVersion
Source§impl From<&CaixaVersion> for String
Trait-idiomatic borrowed-input, owned-String output reverse
projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for String] impl immediately above. Routes
byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
str::to_owned) so every consumer that holds a
borrowed [&CaixaVersion] and needs an owned String — a
[…].iter().map(String::from).collect::<Vec<_>>() per-instance
materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the owned-input
[From<CaixaVersion> for String] axis alone forces every call site
through an explicit .clone() / dereference restatement), a future
HashMap::<String, _>::from_iter that keys off a borrowed-
iteration axis where cloning the wrapper would allocate one
String beyond the map entry’s own, a future
serde_json::Value::String(String::from(&caixa.versao))
structured-payload composer that owns the emit-path without moving
out of a borrowed field — reaches the wrapped byte-string through
this one dispatch on the substrate primitive.
impl From<&CaixaVersion> for String
Trait-idiomatic borrowed-input, owned-String output reverse
projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for String] impl immediately above. Routes
byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
str::to_owned) so every consumer that holds a
borrowed [&CaixaVersion] and needs an owned String — a
[…].iter().map(String::from).collect::<Vec<_>>() per-instance
materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the owned-input
[From<CaixaVersion> for String] axis alone forces every call site
through an explicit .clone() / dereference restatement), a future
HashMap::<String, _>::from_iter that keys off a borrowed-
iteration axis where cloning the wrapper would allocate one
String beyond the map entry’s own, a future
serde_json::Value::String(String::from(&caixa.versao))
structured-payload composer that owns the emit-path without moving
out of a borrowed field — reaches the wrapped byte-string through
this one dispatch on the substrate primitive.
Second corner on the {Self, &Self} → String reverse-projection
family opened on the paired owned-input
[From<CaixaVersion> for String] impl immediately above. Rust’s
From trait does not derive the From<&Self> sibling from a
From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not
exist in core), so every newtype that carries the owned-input
reverse axis but not the borrowed-input axis forces every borrowed
call site through a .clone() / <String>::from(v.clone()) detour
whose type bounds have no compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_string_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str via a borrowed
input) and
[tests::caixa_version_from_owned_and_borrowed_into_string_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for String] impl on the same instance,
closing the “owned-input move vs. borrowed-input clone” bifurcation
on the same wrapped body).
Source§fn from(v: &CaixaVersion) -> String
fn from(v: &CaixaVersion) -> String
Source§impl From<&CaixaVersion> for Cow<'static, str>
Trait-idiomatic borrowed-input, std::borrow::Cow<'static, str>
output reverse projection on the CaixaVersion newtype
primitive — the borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::borrow::Cow<'static, str>] impl
immediately above. Routes byte-for-byte through the
substrate-primitive CaixaVersion::as_str pub const fn
accessor (via str::to_owned wrapped in
std::borrow::Cow::Owned) so every consumer that holds a
borrowed [&CaixaVersion] and needs a [Cow<'static, str>] —
a […].iter().map(Cow::<'static, str>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator
yields &CaixaVersion, not CaixaVersion, so the paired
owned-input [From<CaixaVersion> for Cow<'static, str>] axis
alone forces every call site through an explicit .clone() /
dereference restatement), a future
HashMap::<Cow<'static, str>, _>::from_iter that keys off a
borrowed-iteration axis where cloning the wrapper would allocate
one String beyond the eventual [Cow::Owned] arm’s own, a
future generic
<T: for<'a> Into<Cow<'static, str>>>-bound emitter on a
per-caixa diagnostic column that walks the
iter().map(Into::into) shape verbatim — reaches the wrapped
byte-string through this one dispatch on the substrate primitive.
impl From<&CaixaVersion> for Cow<'static, str>
Trait-idiomatic borrowed-input, std::borrow::Cow<'static, str>
output reverse projection on the CaixaVersion newtype
primitive — the borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::borrow::Cow<'static, str>] impl
immediately above. Routes byte-for-byte through the
substrate-primitive CaixaVersion::as_str pub const fn
accessor (via str::to_owned wrapped in
std::borrow::Cow::Owned) so every consumer that holds a
borrowed [&CaixaVersion] and needs a [Cow<'static, str>] —
a […].iter().map(Cow::<'static, str>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator
yields &CaixaVersion, not CaixaVersion, so the paired
owned-input [From<CaixaVersion> for Cow<'static, str>] axis
alone forces every call site through an explicit .clone() /
dereference restatement), a future
HashMap::<Cow<'static, str>, _>::from_iter that keys off a
borrowed-iteration axis where cloning the wrapper would allocate
one String beyond the eventual [Cow::Owned] arm’s own, a
future generic
<T: for<'a> Into<Cow<'static, str>>>-bound emitter on a
per-caixa diagnostic column that walks the
iter().map(Into::into) shape verbatim — reaches the wrapped
byte-string through this one dispatch on the substrate primitive.
Deliberately returns std::borrow::Cow::Owned rather than
std::borrow::Cow::Borrowed — the substrate-primitive
CaixaVersion::as_str accessor’s return does not carry the
&'static str lifetime by construction, so the
[Cow<'static, str>] output shape rules out the borrowed arm and
the owned arm is the type-correct projection (mirroring the paired
owned-input impl’s own [Cow::Owned] discipline). Second corner
on the {Self, &Self} → Cow<'static, str> reverse-projection
family opened on the paired owned-input impl immediately above.
Rust’s From trait does not derive the From<&Self> sibling from
a From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not
exist in core), so every newtype that carries the owned-input
reverse [Cow<'static, str>] axis but not the borrowed-input axis
forces every borrowed call site through a .clone() /
<Cow<'static, str>>::from(v.clone()) detour whose type bounds
have no compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_cow_str_routes_through_as_str_accessor]
(byte-parity + [Cow::Owned]-arm pin against
CaixaVersion::as_str via a borrowed input, plus a
source-survival witness against silent move-out) and
[tests::caixa_version_from_owned_and_borrowed_into_cow_str_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input impl on
the same instance, closing the “owned-input move vs. borrowed-input
clone” bifurcation on the same wrapped body through the
[Cow<'static, str>] axis).
Source§impl From<&CaixaVersion> for Box<str>
Trait-idiomatic borrowed-input, Box<str> output reverse
projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for Box<str>] impl immediately above. Routes
byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
Box::<str>::from(&str), which allocates a fit-to-length boxed
slice from the borrowed &str in one heap allocation without an
intermediary String) so every consumer that holds a borrowed
[&CaixaVersion] and needs a Box<str> — a
[…].iter().map(Box::<str>::from).collect::<Vec<_>>() per-instance
materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for Box<str>] axis alone forces every call
site through an explicit .clone() / dereference restatement), a
future HashMap::<Box<str>, _>::from_iter that keys off a
borrowed-iteration axis, a future generic
<T: for<'a> Into<Box<str>>>-bound emitter on a per-caixa
diagnostic column that walks the iter().map(Into::into) shape
verbatim — reaches the wrapped byte-string through this one dispatch
on the substrate primitive.
impl From<&CaixaVersion> for Box<str>
Trait-idiomatic borrowed-input, Box<str> output reverse
projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for Box<str>] impl immediately above. Routes
byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
Box::<str>::from(&str), which allocates a fit-to-length boxed
slice from the borrowed &str in one heap allocation without an
intermediary String) so every consumer that holds a borrowed
[&CaixaVersion] and needs a Box<str> — a
[…].iter().map(Box::<str>::from).collect::<Vec<_>>() per-instance
materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for Box<str>] axis alone forces every call
site through an explicit .clone() / dereference restatement), a
future HashMap::<Box<str>, _>::from_iter that keys off a
borrowed-iteration axis, a future generic
<T: for<'a> Into<Box<str>>>-bound emitter on a per-caixa
diagnostic column that walks the iter().map(Into::into) shape
verbatim — reaches the wrapped byte-string through this one dispatch
on the substrate primitive.
Second corner on the {Self, &Self} → Box<str> reverse-projection
family opened on the paired owned-input impl immediately above.
Rust’s From trait does not derive the From<&Self> sibling from
a From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not
exist in core), so every newtype that carries the owned-input
reverse Box<str> axis but not the borrowed-input axis forces
every borrowed call site through a .clone() /
<Box<str>>::from(v.clone()) detour whose type bounds have no
compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_box_str_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str via a borrowed
input, plus a source-survival witness against silent move-out) and
[tests::caixa_version_from_owned_and_borrowed_into_box_str_agree_on_every_shape]
(cross-corner partition pin between owned-input move and
borrowed-input clone on the same wrapped body through the
Box<str> axis).
Source§impl From<&CaixaVersion> for Arc<str>
Trait-idiomatic borrowed-input, std::sync::Arc<str> output
reverse projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::sync::Arc<str>] impl immediately
above. Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
std::sync::Arc::<str>::from(&str), which allocates a fresh
atomically-refcounted heap slab from the borrowed &str in one
heap allocation without an intermediary String or Box<str>)
so every consumer that holds a borrowed [&CaixaVersion] and needs
a std::sync::Arc<str> — a
[…].iter().map(std::sync::Arc::<str>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator
yields &CaixaVersion, not CaixaVersion, so the paired
owned-input [From<CaixaVersion> for std::sync::Arc<str>] axis
alone forces every call site through an explicit .clone() /
dereference restatement), a future
HashMap::<std::sync::Arc<str>, _>::from_iter that keys off a
borrowed-iteration axis, a future generic
<T: for<'a> Into<std::sync::Arc<str>>>-bound emitter on a
per-caixa diagnostic column that walks the
iter().map(Into::into) shape verbatim — reaches the wrapped
byte-string through this one dispatch on the substrate primitive.
impl From<&CaixaVersion> for Arc<str>
Trait-idiomatic borrowed-input, std::sync::Arc<str> output
reverse projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::sync::Arc<str>] impl immediately
above. Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
std::sync::Arc::<str>::from(&str), which allocates a fresh
atomically-refcounted heap slab from the borrowed &str in one
heap allocation without an intermediary String or Box<str>)
so every consumer that holds a borrowed [&CaixaVersion] and needs
a std::sync::Arc<str> — a
[…].iter().map(std::sync::Arc::<str>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator
yields &CaixaVersion, not CaixaVersion, so the paired
owned-input [From<CaixaVersion> for std::sync::Arc<str>] axis
alone forces every call site through an explicit .clone() /
dereference restatement), a future
HashMap::<std::sync::Arc<str>, _>::from_iter that keys off a
borrowed-iteration axis, a future generic
<T: for<'a> Into<std::sync::Arc<str>>>-bound emitter on a
per-caixa diagnostic column that walks the
iter().map(Into::into) shape verbatim — reaches the wrapped
byte-string through this one dispatch on the substrate primitive.
Second corner on the {Self, &Self} → std::sync::Arc<str>
reverse-projection family opened on the paired owned-input impl
immediately above. Rust’s From trait does not derive the
From<&Self> sibling from a From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not
exist in core), so every newtype that carries the owned-input
reverse std::sync::Arc<str> axis but not the borrowed-input
axis forces every borrowed call site through a .clone() /
<std::sync::Arc<str>>::from(v.clone()) detour whose type bounds
have no compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_arc_str_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str via a borrowed
input, plus a source-survival witness against silent move-out) and
[tests::caixa_version_from_owned_and_borrowed_into_arc_str_agree_on_every_shape]
(cross-corner partition pin between owned-input move and
borrowed-input clone on the same wrapped body through the
std::sync::Arc<str> axis).
Source§impl From<&CaixaVersion> for Rc<str>
Trait-idiomatic borrowed-input, std::rc::Rc<str> output reverse
projection on the CaixaVersion newtype primitive — the borrowed-
input companion to the paired owned-input
[From<CaixaVersion> for std::rc::Rc<str>] impl immediately above.
Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
std::rc::Rc::<str>::from(&str), which allocates a fresh
single-threaded-refcounted heap slab from the borrowed &str in one
heap allocation without an intermediary String or Box<str>) so
every consumer that holds a borrowed [&CaixaVersion] and needs a
std::rc::Rc<str> — a
[…].iter().map(std::rc::Rc::<str>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for std::rc::Rc<str>] axis alone forces every
call site through an explicit .clone() / dereference restatement), a
future single-threaded HashMap::<std::rc::Rc<str>, _>::from_iter that
keys off a borrowed-iteration axis, a future generic
<T: for<'a> Into<std::rc::Rc<str>>>-bound emitter on a per-caixa
diagnostic column that walks the iter().map(Into::into) shape
verbatim — reaches the wrapped byte-string through this one dispatch on
the substrate primitive.
impl From<&CaixaVersion> for Rc<str>
Trait-idiomatic borrowed-input, std::rc::Rc<str> output reverse
projection on the CaixaVersion newtype primitive — the borrowed-
input companion to the paired owned-input
[From<CaixaVersion> for std::rc::Rc<str>] impl immediately above.
Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
std::rc::Rc::<str>::from(&str), which allocates a fresh
single-threaded-refcounted heap slab from the borrowed &str in one
heap allocation without an intermediary String or Box<str>) so
every consumer that holds a borrowed [&CaixaVersion] and needs a
std::rc::Rc<str> — a
[…].iter().map(std::rc::Rc::<str>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for std::rc::Rc<str>] axis alone forces every
call site through an explicit .clone() / dereference restatement), a
future single-threaded HashMap::<std::rc::Rc<str>, _>::from_iter that
keys off a borrowed-iteration axis, a future generic
<T: for<'a> Into<std::rc::Rc<str>>>-bound emitter on a per-caixa
diagnostic column that walks the iter().map(Into::into) shape
verbatim — reaches the wrapped byte-string through this one dispatch on
the substrate primitive.
Second corner on the {Self, &Self} → std::rc::Rc<str> reverse-
projection family opened on the paired owned-input impl immediately
above. Rust’s From trait does not derive the From<&Self> sibling
from a From<Self> impl (the blanket impl<T, U> From<&T> for U where T: Clone, U: From<T> does not exist in core), so every newtype that
carries the owned-input reverse std::rc::Rc<str> axis but not the
borrowed-input axis forces every borrowed call site through a
.clone() / <std::rc::Rc<str>>::from(v.clone()) detour whose type
bounds have no compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_rc_str_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str via a borrowed input,
plus a source-survival witness against silent move-out) and
[tests::caixa_version_from_owned_and_borrowed_into_rc_str_agree_on_every_shape]
(cross-corner partition pin between owned-input move and borrowed-
input clone on the same wrapped body through the std::rc::Rc<str>
axis).
Source§impl From<&CaixaVersion> for Vec<u8>
Trait-idiomatic borrowed-input, owned-Vec<u8> output byte-owned
forward projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for Vec<u8>] impl immediately above. Routes
byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + slice::to_vec) so every consumer that holds a
borrowed [&CaixaVersion] and needs an owned Vec<u8> — a
[…].iter().map(Vec::<u8>::from).collect::<Vec<_>>() per-instance
materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the owned-input
[From<CaixaVersion> for Vec<u8>] axis alone forces every call site
through an explicit .clone() restatement whose intermediate
CaixaVersion allocation is discarded on the very next call), a
future admission-webhook diagnostic body composer that walks a
&Vec<CaixaVersion> overlay through an Into<Vec<u8>>-bound per-
arm byte-writer to surface each offending :versao wire form, a
future per-Membro :versao-shape audit-log byte-writer that folds
each Aplicacao’s member-versao byte-tail into an owned Vec<u8>
sink without moving out of the borrowed [AplicacaoSpec::membros]
slice — reaches the wrapped byte-string through this one dispatch on
the substrate primitive.
impl From<&CaixaVersion> for Vec<u8>
Trait-idiomatic borrowed-input, owned-Vec<u8> output byte-owned
forward projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for Vec<u8>] impl immediately above. Routes
byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + slice::to_vec) so every consumer that holds a
borrowed [&CaixaVersion] and needs an owned Vec<u8> — a
[…].iter().map(Vec::<u8>::from).collect::<Vec<_>>() per-instance
materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the owned-input
[From<CaixaVersion> for Vec<u8>] axis alone forces every call site
through an explicit .clone() restatement whose intermediate
CaixaVersion allocation is discarded on the very next call), a
future admission-webhook diagnostic body composer that walks a
&Vec<CaixaVersion> overlay through an Into<Vec<u8>>-bound per-
arm byte-writer to surface each offending :versao wire form, a
future per-Membro :versao-shape audit-log byte-writer that folds
each Aplicacao’s member-versao byte-tail into an owned Vec<u8>
sink without moving out of the borrowed [AplicacaoSpec::membros]
slice — reaches the wrapped byte-string through this one dispatch on
the substrate primitive.
Second corner on the {Self, &Self} → Vec<u8> byte-owned forward-
projection family opened on the paired owned-input
[From<CaixaVersion> for Vec<u8>] impl immediately above. Rust’s
From trait does not derive the From<&Self> sibling from a
From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not exist
in core), so every newtype that carries the owned-input byte-owned
forward axis but not the borrowed-input axis forces every borrowed
call site through a .clone() / <Vec<u8>>::from(v.clone()) detour
whose type bounds have no compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_vec_bytes_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str .as_bytes() via a
borrowed input, plus a source-survival witness against silent move-
out) and
[tests::caixa_version_from_owned_and_borrowed_into_vec_bytes_agree_on_every_shape]
(cross-corner partition pin between owned-input move and borrowed-
input clone on the same wrapped body through the Vec<u8> axis).
Source§impl From<&CaixaVersion> for Cow<'static, [u8]>
Trait-idiomatic borrowed-input, [std::borrow::Cow<'static, [u8]>]
output byte-owned reverse projection on the CaixaVersion newtype
primitive — the borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::borrow::Cow<'static, [u8]>] impl
immediately above. Routes byte-for-byte through the substrate-
primitive CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + slice::to_vec wrapped in
std::borrow::Cow::Owned) so every consumer that holds a borrowed
[&CaixaVersion] and needs a [Cow<'static, [u8]>] — a
[…].iter().map(Cow::<'static, [u8]>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator
yields &CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for Cow<'static, [u8]>] axis alone forces every
call site through an explicit .clone() / dereference restatement),
a future HashMap::<Cow<'static, [u8]>, _>::from_iter that keys off
a borrowed-iteration axis where cloning the wrapper would allocate
one String beyond the eventual [Cow::Owned] arm’s own, a future
generic <T: for<'a> Into<Cow<'static, [u8]>>>-bound byte-writer on
a per-caixa diagnostic column that walks the
iter().map(Into::into) shape verbatim — reaches the wrapped
byte-string through this one dispatch on the substrate primitive.
impl From<&CaixaVersion> for Cow<'static, [u8]>
Trait-idiomatic borrowed-input, [std::borrow::Cow<'static, [u8]>]
output byte-owned reverse projection on the CaixaVersion newtype
primitive — the borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::borrow::Cow<'static, [u8]>] impl
immediately above. Routes byte-for-byte through the substrate-
primitive CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + slice::to_vec wrapped in
std::borrow::Cow::Owned) so every consumer that holds a borrowed
[&CaixaVersion] and needs a [Cow<'static, [u8]>] — a
[…].iter().map(Cow::<'static, [u8]>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator
yields &CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for Cow<'static, [u8]>] axis alone forces every
call site through an explicit .clone() / dereference restatement),
a future HashMap::<Cow<'static, [u8]>, _>::from_iter that keys off
a borrowed-iteration axis where cloning the wrapper would allocate
one String beyond the eventual [Cow::Owned] arm’s own, a future
generic <T: for<'a> Into<Cow<'static, [u8]>>>-bound byte-writer on
a per-caixa diagnostic column that walks the
iter().map(Into::into) shape verbatim — reaches the wrapped
byte-string through this one dispatch on the substrate primitive.
Deliberately returns std::borrow::Cow::Owned rather than
std::borrow::Cow::Borrowed — the substrate-primitive
CaixaVersion::as_str accessor’s .as_bytes() return does not
carry the &'static [u8] lifetime by construction, so the
[Cow<'static, [u8]>] output shape rules out the borrowed arm and
the owned arm is the type-correct projection (mirroring the paired
owned-input impl’s own [Cow::Owned] discipline). Second corner on
the {Self, &Self} → Cow<'static, [u8]> byte-owned reverse-
projection family opened on the paired owned-input impl immediately
above. Rust’s From trait does not derive the From<&Self> sibling
from a From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not exist
in core), so every newtype that carries the owned-input byte-owned
reverse [Cow<'static, [u8]>] axis but not the borrowed-input axis
forces every borrowed call site through a .clone() /
<Cow<'static, [u8]>>::from(v.clone()) detour whose type bounds
have no compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_cow_bytes_routes_through_as_str_accessor]
(byte-parity + [Cow::Owned]-arm pin against
CaixaVersion::as_str .as_bytes() via a borrowed input, plus a
source-survival witness against silent move-out) and
[tests::caixa_version_from_owned_and_borrowed_into_cow_bytes_agree_on_every_shape]
(cross-corner partition pin between owned-input move and borrowed-
input clone on the same wrapped body through the [Cow<'static, [u8]>] axis).
Source§impl From<&CaixaVersion> for Box<[u8]>
Trait-idiomatic borrowed-input, [Box<[u8]>] output byte-owned reverse
projection on the CaixaVersion newtype primitive — the borrowed-input
companion to the paired owned-input [From<CaixaVersion> for Box<[u8]>]
impl immediately above. Routes byte-for-byte through the substrate-
primitive CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + [Box::<[u8]>::from](&[u8]), which allocates a
fit-to-length boxed byte slice from the borrowed &[u8] in one heap
allocation without an intermediary Vec<u8>) so every consumer that
holds a borrowed [&CaixaVersion] and needs a [Box<[u8]>] — a
[…].iter().map(Box::<[u8]>::from).collect::<Vec<_>>() per-instance
materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for Box<[u8]>] axis alone forces every call site
through an explicit .clone() / dereference restatement), a future
HashMap::<Box<[u8]>, _>::from_iter that keys off a borrowed-iteration
axis, a future generic <T: for<'a> Into<Box<[u8]>>>-bound byte-writer
on a per-caixa diagnostic column that walks the
iter().map(Into::into) shape verbatim — reaches the wrapped byte-
string through this one dispatch on the substrate primitive.
impl From<&CaixaVersion> for Box<[u8]>
Trait-idiomatic borrowed-input, [Box<[u8]>] output byte-owned reverse
projection on the CaixaVersion newtype primitive — the borrowed-input
companion to the paired owned-input [From<CaixaVersion> for Box<[u8]>]
impl immediately above. Routes byte-for-byte through the substrate-
primitive CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + [Box::<[u8]>::from](&[u8]), which allocates a
fit-to-length boxed byte slice from the borrowed &[u8] in one heap
allocation without an intermediary Vec<u8>) so every consumer that
holds a borrowed [&CaixaVersion] and needs a [Box<[u8]>] — a
[…].iter().map(Box::<[u8]>::from).collect::<Vec<_>>() per-instance
materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for Box<[u8]>] axis alone forces every call site
through an explicit .clone() / dereference restatement), a future
HashMap::<Box<[u8]>, _>::from_iter that keys off a borrowed-iteration
axis, a future generic <T: for<'a> Into<Box<[u8]>>>-bound byte-writer
on a per-caixa diagnostic column that walks the
iter().map(Into::into) shape verbatim — reaches the wrapped byte-
string through this one dispatch on the substrate primitive.
Second corner on the {Self, &Self} → Box<[u8]> byte-owned reverse-
projection family opened on the paired owned-input impl immediately
above. Rust’s From trait does not derive the From<&Self> sibling
from a From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not exist in
core), so every newtype that carries the owned-input byte-owned
reverse [Box<[u8]>] axis but not the borrowed-input axis forces every
borrowed call site through a .clone() /
<Box<[u8]>>::from(v.clone()) detour whose type bounds have no
compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_box_bytes_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str .as_bytes() via a
borrowed input, plus a source-survival witness against silent move-out)
and
[tests::caixa_version_from_owned_and_borrowed_into_box_bytes_agree_on_every_shape]
(cross-corner partition pin between owned-input move and borrowed-input
clone on the same wrapped body through the [Box<[u8]>] axis).
Source§impl From<&CaixaVersion> for Arc<[u8]>
Trait-idiomatic borrowed-input, [std::sync::Arc<[u8]>] output
byte-owned reverse projection on the CaixaVersion newtype primitive
— the borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::sync::Arc<[u8]>] impl immediately above.
Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + [std::sync::Arc::<[u8]>::from](&[u8]), which
allocates a fresh atomically-refcounted heap slab from the borrowed
&[u8] in one heap allocation without an intermediary Vec<u8> or
[Box<[u8]>]) so every consumer that holds a borrowed
[&CaixaVersion] and needs a [std::sync::Arc<[u8]>] —
a […].iter().map(std::sync::Arc::<[u8]>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for std::sync::Arc<[u8]>] axis alone forces every
call site through an explicit .clone() / dereference restatement), a
future HashMap::<std::sync::Arc<[u8]>, _>::from_iter that keys off a
borrowed-iteration axis, a future generic
<T: for<'a> Into<std::sync::Arc<[u8]>>>-bound byte-writer on a
per-caixa diagnostic column that walks the iter().map(Into::into)
shape verbatim — reaches the wrapped byte-tail through this one
dispatch on the substrate primitive.
impl From<&CaixaVersion> for Arc<[u8]>
Trait-idiomatic borrowed-input, [std::sync::Arc<[u8]>] output
byte-owned reverse projection on the CaixaVersion newtype primitive
— the borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::sync::Arc<[u8]>] impl immediately above.
Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + [std::sync::Arc::<[u8]>::from](&[u8]), which
allocates a fresh atomically-refcounted heap slab from the borrowed
&[u8] in one heap allocation without an intermediary Vec<u8> or
[Box<[u8]>]) so every consumer that holds a borrowed
[&CaixaVersion] and needs a [std::sync::Arc<[u8]>] —
a […].iter().map(std::sync::Arc::<[u8]>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for std::sync::Arc<[u8]>] axis alone forces every
call site through an explicit .clone() / dereference restatement), a
future HashMap::<std::sync::Arc<[u8]>, _>::from_iter that keys off a
borrowed-iteration axis, a future generic
<T: for<'a> Into<std::sync::Arc<[u8]>>>-bound byte-writer on a
per-caixa diagnostic column that walks the iter().map(Into::into)
shape verbatim — reaches the wrapped byte-tail through this one
dispatch on the substrate primitive.
Second corner on the {Self, &Self} → std::sync::Arc<[u8]> byte-owned
reverse-projection family opened on the paired owned-input impl
immediately above. Rust’s From trait does not derive the
From<&Self> sibling from a From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not exist
in core), so every newtype that carries the owned-input byte-owned
reverse [std::sync::Arc<[u8]>] axis but not the borrowed-input axis
forces every borrowed call site through a .clone() /
<std::sync::Arc<[u8]>>::from(v.clone()) detour whose type bounds have
no compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_arc_bytes_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str .as_bytes() via a
borrowed input, plus a source-survival witness against silent move-out)
and
[tests::caixa_version_from_owned_and_borrowed_into_arc_bytes_agree_on_every_shape]
(cross-corner partition pin between owned-input move and borrowed-input
clone on the same wrapped body through the [std::sync::Arc<[u8]>]
axis).
Source§impl From<&CaixaVersion> for Rc<[u8]>
Trait-idiomatic borrowed-input, [std::rc::Rc<[u8]>] output byte-owned
reverse projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::rc::Rc<[u8]>] impl immediately above.
Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + [std::rc::Rc::<[u8]>::from](&[u8]), which
allocates a fresh single-threaded-refcounted heap slab from the
borrowed &[u8] in one heap allocation without an intermediary
Vec<u8> or [Box<[u8]>]) so every consumer that holds a borrowed
[&CaixaVersion] and needs a [std::rc::Rc<[u8]>] —
a […].iter().map(std::rc::Rc::<[u8]>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for std::rc::Rc<[u8]>] axis alone forces every
call site through an explicit .clone() / dereference restatement), a
future single-threaded HashMap::<std::rc::Rc<[u8]>, _>::from_iter that
keys off a borrowed-iteration axis, a future generic
<T: for<'a> Into<std::rc::Rc<[u8]>>>-bound byte-writer on a per-caixa
diagnostic column that walks the iter().map(Into::into) shape
verbatim — reaches the wrapped byte-tail through this one dispatch on
the substrate primitive.
impl From<&CaixaVersion> for Rc<[u8]>
Trait-idiomatic borrowed-input, [std::rc::Rc<[u8]>] output byte-owned
reverse projection on the CaixaVersion newtype primitive — the
borrowed-input companion to the paired owned-input
[From<CaixaVersion> for std::rc::Rc<[u8]>] impl immediately above.
Routes byte-for-byte through the substrate-primitive
CaixaVersion::as_str pub const fn accessor (via
str::as_bytes + [std::rc::Rc::<[u8]>::from](&[u8]), which
allocates a fresh single-threaded-refcounted heap slab from the
borrowed &[u8] in one heap allocation without an intermediary
Vec<u8> or [Box<[u8]>]) so every consumer that holds a borrowed
[&CaixaVersion] and needs a [std::rc::Rc<[u8]>] —
a […].iter().map(std::rc::Rc::<[u8]>::from).collect::<Vec<_>>()
per-instance materializer over &[CaixaVersion] (whose iterator yields
&CaixaVersion, not CaixaVersion, so the paired owned-input
[From<CaixaVersion> for std::rc::Rc<[u8]>] axis alone forces every
call site through an explicit .clone() / dereference restatement), a
future single-threaded HashMap::<std::rc::Rc<[u8]>, _>::from_iter that
keys off a borrowed-iteration axis, a future generic
<T: for<'a> Into<std::rc::Rc<[u8]>>>-bound byte-writer on a per-caixa
diagnostic column that walks the iter().map(Into::into) shape
verbatim — reaches the wrapped byte-tail through this one dispatch on
the substrate primitive.
Second corner on the {Self, &Self} → std::rc::Rc<[u8]> byte-owned
reverse-projection family opened on the paired owned-input impl
immediately above. Rust’s From trait does not derive the
From<&Self> sibling from a From<Self> impl (the blanket
impl<T, U> From<&T> for U where T: Clone, U: From<T> does not exist
in core), so every newtype that carries the owned-input byte-owned
reverse [std::rc::Rc<[u8]>] axis but not the borrowed-input axis
forces every borrowed call site through a .clone() /
<std::rc::Rc<[u8]>>::from(v.clone()) detour whose type bounds have
no compile-time link back to the newtype.
Pinned load-bearing by
[tests::caixa_version_from_borrowed_into_owned_rc_bytes_routes_through_as_str_accessor]
(byte-parity pin against CaixaVersion::as_str .as_bytes() via a
borrowed input, plus a source-survival witness against silent move-out)
and
[tests::caixa_version_from_owned_and_borrowed_into_rc_bytes_agree_on_every_shape]
(cross-corner partition pin between owned-input move and borrowed-input
clone on the same wrapped body through the [std::rc::Rc<[u8]>]
axis).
Source§impl From<&str> for CaixaVersion
impl From<&str> for CaixaVersion
Source§impl From<CaixaVersion> for String
Trait-idiomatic owned-String reverse projection on the
CaixaVersion newtype primitive — the owned-heap-string inverse
of the pre-existing [From<String> for CaixaVersion] /
[From<&str> for CaixaVersion] forward-projection pair on this
primitive. Returns the wrapped String verbatim ([Self::0],
a move of the pre-existing heap allocation — no re-copy of the
per-instance version body’s bytes), so every consumer that binds a
CaixaVersion through the standard-library .into() /
[From<Self> for String] (equivalently Into<String>) axis
reaches the wrapped byte-string through one substrate-primitive
dispatch rather than through a .as_str().to_owned() /
.to_string() allocating detour whose bounds have no compile-time
link back to the newtype’s storage.
impl From<CaixaVersion> for String
Trait-idiomatic owned-String reverse projection on the
CaixaVersion newtype primitive — the owned-heap-string inverse
of the pre-existing [From<String> for CaixaVersion] /
[From<&str> for CaixaVersion] forward-projection pair on this
primitive. Returns the wrapped String verbatim ([Self::0],
a move of the pre-existing heap allocation — no re-copy of the
per-instance version body’s bytes), so every consumer that binds a
CaixaVersion through the standard-library .into() /
[From<Self> for String] (equivalently Into<String>) axis
reaches the wrapped byte-string through one substrate-primitive
dispatch rather than through a .as_str().to_owned() /
.to_string() allocating detour whose bounds have no compile-time
link back to the newtype’s storage.
A future consumer that wants to unwrap a CaixaVersion into an
owned String — a serde_json::Value::String(versao.into())
structured-payload composer where the Value::String arm typing
demands an owned String and the sibling
AsRef<str>-borrowed axis forces an explicit .to_owned()
restatement at every call site, a future
HashMap::<String, _>::from_iter([(versao.into(), _)]) per-versao
lookup where the map’s key type is owned String rather than
&str borrowed from a stashed CaixaVersion, a future
Cow::<'static, str>::Owned(versao.into()) composer where the
owned arm typing rules out the borrowed AsRef<str> return —
reaches the wrapped String through this one dispatch, avoiding
the pre-lift double-allocation (.as_str().to_owned() on the owned
path would allocate a fresh String rather than reuse the
wrapper’s own heap allocation).
Opens the trait-idiomatic owned-String reverse-projection axis
on the substrate’s core String-wrapper newtype primitive
CaixaVersion, mirroring the paired owned-String forward-
projection family the sibling closed-set fieldless typed enums
(crate::supervisor::RestartStrategy (7baa18a, first-mover),
crate::supervisor::RestartPolicy (7851725),
crate::CaixaKind (per its own doc block, third peer), plus the
remaining twelve closed-set enums) already carry — Rust’s standard
library does not derive From<Self> for String from From<String> for Self, so every newtype that carries a forward From<String>
constructor but not the paired reverse-unwrap axis forces every
call site through a .to_string() / .as_str().to_owned() detour
that allocates fresh bytes rather than moving the wrapper’s own
heap allocation.
Preserves the two-path split on the wrapped byte-string: the paired
AsRef<str> and fmt::Display impls stay reachable for the
borrowed &str and formatter-output paths, this impl closes the
owned-String reverse axis. Same “one dispatch on the substrate
primitive” discipline the peer forward From<String> for CaixaVersion / From<&str> for CaixaVersion constructors carry,
now extended onto the owned-heap-string reverse projection.
Pinned load-bearing by
[tests::caixa_version_from_into_owned_string_returns_wrapped_body]
(byte-parity pin against CaixaVersion::as_str on the same
instance) and
[tests::caixa_version_from_into_owned_string_and_as_str_agree_on_every_shape]
(cross-axis partition pin against the paired borrowed
AsRef<str> impl and the sibling fmt::Display-routed
ToString::to_string surface, plus a round-trip witness through
the paired forward [From<String> for CaixaVersion] constructor
closing the two-way Self → String → Self cycle by construction).
Source§fn from(v: CaixaVersion) -> String
fn from(v: CaixaVersion) -> String
Source§impl From<CaixaVersion> for Cow<'static, str>
Trait-idiomatic owned-input, std::borrow::Cow<'static, str>
output reverse projection on the CaixaVersion newtype
primitive — the [Cow<'static, str>] companion to the paired
owned-input [From<CaixaVersion> for String] impl (999a310) on
the same primitive. Routes through
std::borrow::Cow::Owned(v.0), moving the wrapper’s own heap
allocation through verbatim (no re-copy of the per-instance version
body’s bytes, no allocating detour through
CaixaVersion::as_str + str::to_owned) — so every consumer
that binds a CaixaVersion through the standard-library .into()
/ [From<Self> for Cow<'static, str>] axis reaches the wrapped
byte-string through one substrate-primitive dispatch on the exact
same heap allocation the manifest-parse forward
[From<String> for CaixaVersion] constructor accepted.
impl From<CaixaVersion> for Cow<'static, str>
Trait-idiomatic owned-input, std::borrow::Cow<'static, str>
output reverse projection on the CaixaVersion newtype
primitive — the [Cow<'static, str>] companion to the paired
owned-input [From<CaixaVersion> for String] impl (999a310) on
the same primitive. Routes through
std::borrow::Cow::Owned(v.0), moving the wrapper’s own heap
allocation through verbatim (no re-copy of the per-instance version
body’s bytes, no allocating detour through
CaixaVersion::as_str + str::to_owned) — so every consumer
that binds a CaixaVersion through the standard-library .into()
/ [From<Self> for Cow<'static, str>] axis reaches the wrapped
byte-string through one substrate-primitive dispatch on the exact
same heap allocation the manifest-parse forward
[From<String> for CaixaVersion] constructor accepted.
A future consumer that wants a [Cow<'static, str>]-typed handle
on a CaixaVersion — a
metric_label: Cow<'static, str> = versao.into() structured-log
key on a future per-caixa caixa-operator reconciliation counter
(whose emit surface types metric keys as Cow<'static, str> so
static compile-time literals and dynamic version bodies share the
same key-slot without an unconditional heap allocation on the
literal path), a future
HashMap::<Cow<'static, str>, _>::from_iter([(versao.into(), _)])
per-versao lookup where the map’s key type is
[Cow<'static, str>] rather than owned String so
literal-lifetime keys can share the same map without wrapping in an
extra String allocation, a future M4 admission-webhook
rejection body whose per-arm error message composes through
format!("{}", Cow::<'static, str>::from(caixa.versao)) where the
[Cow<'static, str>] intermediate is what the sibling error-frame
composer accepts — reaches the wrapped byte-string through this
one dispatch, without the pre-lift .to_string().into() /
Cow::Owned(String::from(v)) double-hop that would allocate a
fresh intermediary String on the way to the same
[Cow::Owned] arm.
Deliberately returns std::borrow::Cow::Owned rather than
std::borrow::Cow::Borrowed — the substrate-primitive
CaixaVersion::as_str accessor’s return does not carry the
&'static str lifetime by construction (the wrapped String
storage is a runtime heap allocation, not a compile-time literal),
so the [Cow<'static, str>] output shape rules out the borrowed
arm and the owned arm is the type-correct projection. Peer of the
paired owned-input [From<CaixaVersion> for String] impl on the
same primitive — both route through the wrapper’s own heap
allocation via a move on v.0, preserving the zero-copy
discipline the substrate opens on its String-wrapper newtype
primitive.
Opens the trait-idiomatic owned-input, [Cow<'static, str>]
reverse-projection axis on the substrate’s core String-wrapper
newtype primitive CaixaVersion, mirroring the paired
[Cow<'static, str>] forward-projection family the sibling
closed-set fieldless typed enums (via
crate::supervisor::RestartStrategy,
crate::supervisor::RestartPolicy, and the remaining twelve
closed-set enums) already carry — on the enum peers, the paired
axis returns [Cow::Borrowed] because the accessor returns
&'static str; on this newtype the paired axis returns
[Cow::Owned] because the wrapped storage is runtime-allocated.
Rust’s standard library does not derive From<Self> for Cow<'static, str> from From<Self> for String (nor derive
From<&Self> from From<Self>), so every newtype that carries a
reverse From<Self> for String unwrap axis but not the paired
[Cow<'static, str>] axis forces every
[Cow<'static, str>]-typed call site through a .to_string().into()
double-allocation detour that heap-allocates a fresh intermediary
String between the wrapper and the [Cow::Owned] arm.
Pinned load-bearing by
[tests::caixa_version_from_into_owned_cow_str_returns_owned_wrapped_body]
(byte-parity + [Cow::Owned]-arm pin against
CaixaVersion::as_str on the same instance, plus a round-trip
witness through the paired [From<String> for CaixaVersion]
constructor) and
[tests::caixa_version_from_into_owned_cow_str_and_string_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for String] impl on the same instance,
closing the “owned-input into String vs. owned-input into
[Cow<'static, str>]” bifurcation on the same wrapped body).
Source§impl From<CaixaVersion> for Box<str>
Trait-idiomatic owned-input, Box<str> output reverse projection
on the CaixaVersion newtype primitive — the Box<str> companion
to the paired owned-input [From<CaixaVersion> for String] (999a310)
and [From<CaixaVersion> for std::borrow::Cow<'static, str>] (55532e5)
impls on the same primitive. Routes through
String::into_boxed_str(v.0), shrinking the wrapper’s own heap
allocation to a fit-to-length boxed slice — no re-copy of the
per-instance version body’s bytes on the fixed-capacity path
(String::into_boxed_str reuses the underlying Vec<u8> buffer
verbatim when the length matches its capacity; when the String
carries slack it reallocates once to shrink), so every consumer that
binds a CaixaVersion through the standard-library .into() /
[From<Self> for Box<str>] axis reaches the wrapped byte-string
through one substrate-primitive dispatch on the same underlying heap
storage the manifest-parse forward [From<String> for CaixaVersion]
constructor accepted.
impl From<CaixaVersion> for Box<str>
Trait-idiomatic owned-input, Box<str> output reverse projection
on the CaixaVersion newtype primitive — the Box<str> companion
to the paired owned-input [From<CaixaVersion> for String] (999a310)
and [From<CaixaVersion> for std::borrow::Cow<'static, str>] (55532e5)
impls on the same primitive. Routes through
String::into_boxed_str(v.0), shrinking the wrapper’s own heap
allocation to a fit-to-length boxed slice — no re-copy of the
per-instance version body’s bytes on the fixed-capacity path
(String::into_boxed_str reuses the underlying Vec<u8> buffer
verbatim when the length matches its capacity; when the String
carries slack it reallocates once to shrink), so every consumer that
binds a CaixaVersion through the standard-library .into() /
[From<Self> for Box<str>] axis reaches the wrapped byte-string
through one substrate-primitive dispatch on the same underlying heap
storage the manifest-parse forward [From<String> for CaixaVersion]
constructor accepted.
A future consumer that wants a Box<str>-typed handle on a
CaixaVersion — a per-caixa struct field typed Box<str> rather
than String to trim the sixteen-byte length + capacity header
down to eight bytes on the pointer + length pair (a shape the
substrate acknowledges as the natural fixed-length storage for
once-written-never-mutated version strings held across the whole
operator reconciliation cycle), a future
HashMap::<Box<str>, _>::from_iter([(versao.into(), _)]) per-versao
lookup where the map’s key type is Box<str> rather than owned
String so the map’s per-entry key-slot carries the sixteen-byte
Box<str> header instead of the twenty-four-byte String
header, a future M4 admission-webhook rejection body whose per-arm
error-frame composer accepts a Box<str> intermediate for the
same reason — reaches the wrapped byte-string through this one
dispatch, without the pre-lift .to_string().into_boxed_str()
double-hop that would allocate a fresh intermediary String on
the way to the same Box<str> slot.
Peer of the paired owned-input [From<CaixaVersion> for String]
(999a310) and [From<CaixaVersion> for Cow<'static, str>] (55532e5)
impls on the same primitive — all three route through v.0
(the String axis returns the wrapped buffer verbatim; the
[Cow<'static, str>] axis wraps it in [Cow::Owned]; this axis
shrinks it to a fit-to-length boxed slice via String::into_boxed_str),
preserving the zero-copy discipline the substrate opens on its
String-wrapper newtype primitive across the three reverse-projection
axes. Rust’s standard library does not derive From<Self> for Box<str> from From<Self> for String (nor from From<Self> for Cow<'static, str>), so every newtype that carries the paired
reverse From<Self> for String axis but not the paired
Box<str> axis forces every Box<str>-typed call site through
a .to_string().into_boxed_str() double-allocation detour that
heap-allocates a fresh intermediary String between the wrapper
and the Box<str> slot.
Opens the trait-idiomatic owned-input, Box<str>
reverse-projection axis on the substrate’s core String-wrapper
newtype primitive CaixaVersion, extending the reverse-projection
matrix from the two axes already opened on this primitive (999a310
on the String axis, 55532e5 on the [Cow<'static, str>] axis)
onto the third. The fourth and final axis on the matrix
(std::sync::Arc<str>) is closed by the sibling paired
[From<CaixaVersion> for std::sync::Arc<str>] +
[From<&CaixaVersion> for std::sync::Arc<str>] impls immediately below.
Pinned load-bearing by
[tests::caixa_version_from_into_owned_box_str_returns_wrapped_body]
(byte-parity pin against CaixaVersion::as_str on the same
instance, plus a round-trip witness through the paired
[From<String> for CaixaVersion] constructor closing the two-way
Self → Box<str> → Self cycle by construction) and
[tests::caixa_version_from_into_owned_box_str_and_string_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for String] and
[From<CaixaVersion> for Cow<'static, str>] impls on the same
instance, closing the “owned-input into String vs. owned-input
into [Cow<'static, str>] vs. owned-input into Box<str>”
three-corner bifurcation on the same wrapped body).
Source§impl From<CaixaVersion> for Arc<str>
Trait-idiomatic owned-input, std::sync::Arc<str> output reverse
projection on the CaixaVersion newtype primitive — the
std::sync::Arc<str> companion to the paired owned-input
[From<CaixaVersion> for String] (999a310),
[From<CaixaVersion> for std::borrow::Cow<'static, str>] (55532e5),
and [From<CaixaVersion> for Box<str>] (32d861a) impls on the same
primitive. Routes through std::sync::Arc::<str>::from(v.0),
which allocates a fresh atomically-refcounted heap slab whose data
slot byte-equals the wrapper’s own String storage — the wrapped
bytes move through by value into the Arc<str> layout in one heap
allocation (the std::sync::Arc<str> layout carries a strong
count + weak count header ahead of the byte slice, so a copy is
required regardless of the input axis; no intermediary String
or Box<str> is materialized on the owned-input path).
impl From<CaixaVersion> for Arc<str>
Trait-idiomatic owned-input, std::sync::Arc<str> output reverse
projection on the CaixaVersion newtype primitive — the
std::sync::Arc<str> companion to the paired owned-input
[From<CaixaVersion> for String] (999a310),
[From<CaixaVersion> for std::borrow::Cow<'static, str>] (55532e5),
and [From<CaixaVersion> for Box<str>] (32d861a) impls on the same
primitive. Routes through std::sync::Arc::<str>::from(v.0),
which allocates a fresh atomically-refcounted heap slab whose data
slot byte-equals the wrapper’s own String storage — the wrapped
bytes move through by value into the Arc<str> layout in one heap
allocation (the std::sync::Arc<str> layout carries a strong
count + weak count header ahead of the byte slice, so a copy is
required regardless of the input axis; no intermediary String
or Box<str> is materialized on the owned-input path).
A future consumer that wants a std::sync::Arc<str>-typed handle
on a CaixaVersion — a share-through-clone version body held
across a per-caixa caixa-operator reconcile task where every
spawn point wants a cheap .clone() on the version handle without
each task re-allocating its own String copy (the
std::sync::Arc::clone path bumps the atomic refcount in place
and returns a pointer-width handle), a future
HashMap::<std::sync::Arc<str>, _>::from_iter per-versao lookup
where the map’s key type is std::sync::Arc<str> so the same
version-body pointer can key both the map and the payload without a
second heap allocation, a future M4 admission-webhook decoder that
materializes decoded version strings as std::sync::Arc<str>
slices so downstream verdict-composer tasks running on separate
worker threads can share the immutable body without a
per-consumer String::clone — reaches the wrapped byte-string
through this one dispatch, without the pre-lift
.to_string().into::<std::sync::Arc<str>>() double-hop that would
still allocate the same [Arc<str>] slab plus one intermediary
String between the wrapper and the std::sync::Arc<str> slot.
Peer of the paired owned-input [From<CaixaVersion> for String]
(999a310), [From<CaixaVersion> for Cow<'static, str>] (55532e5),
and [From<CaixaVersion> for Box<str>] (32d861a) impls on the same
primitive — all four route through v.0 (the String axis
returns the wrapped buffer verbatim; the [Cow<'static, str>] axis
wraps it in [Cow::Owned]; the Box<str> axis shrinks it to a
fit-to-length boxed slice; this axis copies the bytes into a fresh
atomically-refcounted slab whose header carries the atomic strong +
weak counters the std::sync::Arc<str> layout requires),
preserving the substrate’s single-dispatch reverse-projection
discipline across the four axes. Rust’s standard library does not
derive From<Self> for Arc<str> from From<Self> for String (nor
from From<Self> for Box<str> or From<Self> for Cow<'static, str>),
so every newtype that carries the paired reverse From<Self> for String / Box<str> / Cow<'static, str> axes but not the paired
std::sync::Arc<str> axis forces every
std::sync::Arc<str>-typed call site through a
.to_string().into() / Arc::<str>::from(v.to_string())
double-allocation detour that heap-allocates a fresh intermediary
String between the wrapper and the std::sync::Arc<str> slot.
Closes the trait-idiomatic owned-input, std::sync::Arc<str>
reverse-projection axis on the substrate’s core String-wrapper
newtype primitive CaixaVersion, completing the reverse-projection
matrix on this primitive across the full {String, Cow<'static, str>, Box<str>, Arc<str>} roster — the fourth and final axis (999a310 on
the String axis, 55532e5 on the [Cow<'static, str>] axis,
32d861a on the Box<str> axis, this axis on the
std::sync::Arc<str> axis).
Pinned load-bearing by
[tests::caixa_version_from_into_owned_arc_str_returns_wrapped_body]
(byte-parity pin against CaixaVersion::as_str on the same
instance, plus a round-trip witness through the paired
[From<String> for CaixaVersion] constructor closing the two-way
Self → Arc<str> → Self cycle by construction) and
[tests::caixa_version_from_into_owned_arc_str_and_string_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for String], [From<CaixaVersion> for Cow<'static, str>],
and [From<CaixaVersion> for Box<str>] impls on the same instance,
closing the four-corner “owned-input into String vs. Cow<'static, str>
vs. Box<str> vs. Arc<str>” partition on the same wrapped body).
Source§impl From<CaixaVersion> for Rc<str>
Trait-idiomatic owned-input, std::rc::Rc<str> output reverse
projection on the CaixaVersion newtype primitive — the owned-heap-
string, single-threaded-reference-counted inverse of the pre-existing
[From<String> for CaixaVersion] / [From<&str> for CaixaVersion]
forward-projection pair on this primitive. Consumes the owned wrapper
by value, moves the wrapped String into the std::rc::Rc<str>
layout in one heap allocation (the std::rc::Rc<str> layout carries
a strong count + weak count header ahead of the byte slice, so the copy
is required regardless of the input axis; no intermediary String or
Box<str> is materialized on the owned-input path) — the exact
single-threaded mirror of the paired
[From<CaixaVersion> for std::sync::Arc<str>] impl (3e67756) on the
atomically-refcounted axis.
impl From<CaixaVersion> for Rc<str>
Trait-idiomatic owned-input, std::rc::Rc<str> output reverse
projection on the CaixaVersion newtype primitive — the owned-heap-
string, single-threaded-reference-counted inverse of the pre-existing
[From<String> for CaixaVersion] / [From<&str> for CaixaVersion]
forward-projection pair on this primitive. Consumes the owned wrapper
by value, moves the wrapped String into the std::rc::Rc<str>
layout in one heap allocation (the std::rc::Rc<str> layout carries
a strong count + weak count header ahead of the byte slice, so the copy
is required regardless of the input axis; no intermediary String or
Box<str> is materialized on the owned-input path) — the exact
single-threaded mirror of the paired
[From<CaixaVersion> for std::sync::Arc<str>] impl (3e67756) on the
atomically-refcounted axis.
A future consumer that wants a std::rc::Rc<str>-typed handle on a
CaixaVersion — a per-feira verb’s single-threaded diagnostic
composer that clones the version body across a chain of Nord-themed
column emitters without paying either the String::clone
full-allocation cost (every step re-allocates its own buffer) or the
atomic-refcount overhead the paired std::sync::Arc<str> axis
forces (the std::rc::Rc::clone path bumps a non-atomic refcount in
place and returns a pointer-width handle, cheaper than the paired
atomic increment on the sibling std::sync::Arc<str> axis by a
measurable margin on hot single-threaded call sites), a future single-
threaded HashMap::<std::rc::Rc<str>, _>::from_iter per-versao lookup
where the map’s key type is std::rc::Rc<str> so the same version-
body pointer can key both the map and the payload without a second heap
allocation, a future feira lint per-caixa diagnostic table whose
per-column Cell<std::rc::Rc<str>> payload carries the version body
across the row-composer + column-composer + wrapper phases through the
pointer-width handle rather than a String per phase — reaches the
wrapped byte-string through this one dispatch, without the pre-lift
.to_string().into::<std::rc::Rc<str>>() double-hop that would still
allocate the same [Rc<str>] slab plus one intermediary String
between the wrapper and the std::rc::Rc<str> slot.
Peer of the paired owned-input [From<CaixaVersion> for String]
(999a310), [From<CaixaVersion> for Cow<'static, str>] (55532e5),
[From<CaixaVersion> for Box<str>] (32d861a), and
[From<CaixaVersion> for std::sync::Arc<str>] (3e67756) impls on the
same primitive — all five route through v.0 (the String axis
returns the wrapped buffer verbatim; the [Cow<'static, str>] axis
wraps it in [Cow::Owned]; the Box<str> axis shrinks it to a
fit-to-length boxed slice; the [Arc<str>] axis copies the bytes into
a fresh atomically-refcounted slab; this axis copies the bytes into a
fresh single-threaded-refcounted slab whose header carries the non-
atomic strong + weak counters the std::rc::Rc<str> layout
requires), preserving the substrate’s single-dispatch reverse-
projection discipline across the five axes. Rust’s standard library
does not derive From<Self> for Rc<str> from From<Self> for Arc<str>
(the std::sync::Arc<str> and std::rc::Rc<str> layouts share the
same on-disk shape but the trait tables are disjoint, and no blanket
impl<T> From<T> for Rc<str> where Arc<str>: From<T> exists in
core), so every newtype that carries the paired
std::sync::Arc<str> axis but not the paired std::rc::Rc<str>
axis forces every single-threaded std::rc::Rc<str>-typed call site
through a .to_string().into() / Rc::<str>::from(v.to_string())
double-allocation detour that heap-allocates a fresh intermediary
String between the wrapper and the std::rc::Rc<str> slot.
Extends the trait-idiomatic owned-input reverse-projection matrix on
the substrate’s core String-wrapper newtype primitive CaixaVersion
onto the single-threaded reference-counted axis — the fifth axis
(999a310 on String, 55532e5 on [Cow<'static, str>], 32d861a on
Box<str>, 3e67756 on std::sync::Arc<str>, this axis on
std::rc::Rc<str>).
Pinned load-bearing by
[tests::caixa_version_from_into_owned_rc_str_returns_wrapped_body]
(byte-parity pin against CaixaVersion::as_str on the same instance,
plus a round-trip witness through the paired [From<String> for CaixaVersion] constructor closing the two-way Self → Rc<str> → Self
cycle by construction) and
[tests::caixa_version_from_into_owned_rc_str_and_arc_str_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for String],
[From<CaixaVersion> for Cow<'static, str>],
[From<CaixaVersion> for Box<str>], and
[From<CaixaVersion> for std::sync::Arc<str>] impls on the same
instance, closing the five-corner “owned-input into String vs.
Cow<'static, str> vs. Box<str> vs. Arc<str> vs. Rc<str>”
partition on the same wrapped body).
Source§impl From<CaixaVersion> for Vec<u8>
Trait-idiomatic owned-input, owned-Vec<u8> output byte-owned
forward projection on the CaixaVersion newtype primitive — the
byte-mirror of the pre-existing owned-input [From<CaixaVersion> for String] str-owned forward-projection axis and the owned-heap peer of
the borrow-projection [AsRef<[u8]>] byte-view axis (the prior lift on
this same primitive) that only surfaces a &[u8] view without an
owned-heap byte-tail.
impl From<CaixaVersion> for Vec<u8>
Trait-idiomatic owned-input, owned-Vec<u8> output byte-owned
forward projection on the CaixaVersion newtype primitive — the
byte-mirror of the pre-existing owned-input [From<CaixaVersion> for String] str-owned forward-projection axis and the owned-heap peer of
the borrow-projection [AsRef<[u8]>] byte-view axis (the prior lift on
this same primitive) that only surfaces a &[u8] view without an
owned-heap byte-tail.
Routes the wrapped String storage through
String::into_bytes verbatim ([Self::0], a move of the pre-existing
heap allocation reused byte-for-byte as the Vec<u8> backing buffer —
no re-copy of the per-instance version body’s bytes, no allocating
detour through .as_str().as_bytes().to_vec()), so every consumer
that binds a CaixaVersion through the standard-library .into() /
[From<Self> for Vec<u8>] (equivalently Into<Vec<u8>>) axis
reaches the wrapped byte-string through one substrate-primitive
dispatch on the exact same heap allocation the manifest-parse forward
[From<String> for CaixaVersion] constructor accepted.
A future consumer that wants an owned Vec<u8> byte-tail on a
CaixaVersion — a future
std::io::Write::write_all-shape per-caixa :versao audit-log
byte-sink whose input parameter is an owned Vec<u8> payload, a
future bytes::Bytes::from(Vec::<u8>::from(v)) composer folding the
canonical SemVer wire form into a [bytes::Bytes] framing surface,
a future hasher.update(&Vec::<u8>::from(v))-shape BLAKE3 content-
address closure that needs the owned byte-tail buffered before folding
into the per-caixa [crate::Lacre] closure body, a future per-caixa
protobuf/CBOR/msgpack payload composer whose framer takes an owned
Vec<u8> rather than a borrowed byte-slice, a future M4 admission-
webhook rejection body composer that emits the offending
CaixaVersion as a raw byte-tail through an
std::io::Write-shape sink — reaches the substrate primitive
through one trait dispatch, avoiding the pre-lift open-coded
v.as_str().as_bytes().to_vec() two-hop composition (a fresh heap
allocation copied byte-by-byte off the wrapper’s own storage) or the
String::from(v).into_bytes() two-hop reverse-then-move shape whose
intermediate String step carries no compile-time link back to the
byte-view axis.
Peer of the pre-existing byte-view [AsRef<[u8]>] impl on the same
primitive — both project the wrapped String onto its byte-tail,
but the [AsRef<[u8]>] axis surfaces a borrowed &[u8] view for
consumers that never take ownership while this impl surfaces an owned
Vec<u8> for consumers whose framing / sink / hasher / channel
surfaces demand a heap-owned buffer. Rust’s standard library
deliberately splits the two axes on the two bounds they carry
(impl AsRef<[u8]> for String for the borrowed-view surface,
impl From<String> for Vec<u8> via String::into_bytes for the
owned-heap surface), so a newtype that carries one but not the other
splits off the convention that lets every String-shaped consumer
swap the newtype in without re-shaping its bounds.
Opens the trait-idiomatic owned-input, Vec<u8> byte-owned
forward-projection axis on the substrate’s core String-wrapper newtype
primitive CaixaVersion, mirroring the paired
From<{Self, &Self}> for Vec<u8> axis every sibling closed-set
fieldless typed enum peer on the substrate already carries
(crate::CaixaKind, crate::CaixaDialeto, crate::dep::DepList,
crate::supervisor::RestartStrategy,
crate::supervisor::RestartPolicy, crate::aplicacao::WitShape,
crate::aplicacao::RateLimitUnit,
crate::aplicacao::PlacementStrategy, and the compound sibling
crate::aplicacao::RateLimit at aplicacao.rs:6743 which routes
through its paired fmt::Display via .to_string().into_bytes()),
now extended onto the substrate’s core String-wrapper newtype
primitive.
Pinned load-bearing by
[tests::caixa_version_from_into_owned_vec_bytes_returns_wrapped_body]
(byte-parity pin against CaixaVersion::as_str .as_bytes() on the
same instance, plus a round-trip witness through the paired
[From<String> for CaixaVersion] constructor after re-materializing
the Vec<u8> through String::from_utf8) and
[tests::caixa_version_from_owned_and_borrowed_into_vec_bytes_agree_on_every_shape]
(cross-axis partition pin against the paired borrowed-input impl and
against the pre-existing byte-view [AsRef<[u8]>] axis on the same
instance, closing the “owned-input move vs. borrowed-input clone” and
“owned-heap vs. borrowed-view” bifurcations on the same wrapped body).
Source§impl From<CaixaVersion> for Cow<'static, [u8]>
Trait-idiomatic owned-input, [std::borrow::Cow<'static, [u8]>]
output byte-owned reverse projection on the CaixaVersion newtype
primitive — the [Cow<'static, [u8]>] companion to the paired owned-
input [From<CaixaVersion> for Vec<u8>] impl (98d38ed) on the same
primitive, mirroring the sibling str-family [From<CaixaVersion> for std::borrow::Cow<'static, str>] axis (55532e5) onto the byte-family
side of the reverse-projection matrix. Routes through
std::borrow::Cow::Owned(v.0.into_bytes()), moving the wrapper’s
own heap allocation through String::into_bytes verbatim — no
re-copy of the per-instance version body’s bytes on the owned-input
path, no allocating detour through CaixaVersion::as_str +
slice::to_vec, no mis-routing onto [Cow::Borrowed] on a
runtime byte-string that cannot promise the &'static [u8] lifetime
the borrowed arm requires.
impl From<CaixaVersion> for Cow<'static, [u8]>
Trait-idiomatic owned-input, [std::borrow::Cow<'static, [u8]>]
output byte-owned reverse projection on the CaixaVersion newtype
primitive — the [Cow<'static, [u8]>] companion to the paired owned-
input [From<CaixaVersion> for Vec<u8>] impl (98d38ed) on the same
primitive, mirroring the sibling str-family [From<CaixaVersion> for std::borrow::Cow<'static, str>] axis (55532e5) onto the byte-family
side of the reverse-projection matrix. Routes through
std::borrow::Cow::Owned(v.0.into_bytes()), moving the wrapper’s
own heap allocation through String::into_bytes verbatim — no
re-copy of the per-instance version body’s bytes on the owned-input
path, no allocating detour through CaixaVersion::as_str +
slice::to_vec, no mis-routing onto [Cow::Borrowed] on a
runtime byte-string that cannot promise the &'static [u8] lifetime
the borrowed arm requires.
A future consumer that wants a [Cow<'static, [u8]>]-typed handle
on a CaixaVersion — a
tracing::field::Value::Bytes(caixa.versao.into())-shape structured-
log key on a future per-caixa caixa-operator reconciliation counter
(whose byte-tail emit surface types byte-keys as
[Cow<'static, [u8]>] so static compile-time literals and dynamic
version bodies share the same key-slot without an unconditional heap
allocation on the literal path), a future
HashMap::<Cow<'static, [u8]>, _>::from_iter([(versao.into(), _)])
per-versao lookup where the map’s key type is [Cow<'static, [u8]>]
rather than owned Vec<u8> so literal-lifetime byte-keys can share
the same map without wrapping in an extra Vec<u8> allocation, a
future M4 admission-webhook rejection body whose per-arm error-frame
composer accepts a [Cow<'static, [u8]>] intermediate for the same
reason — reaches the wrapped byte-string through this one dispatch,
without the pre-lift Vec::<u8>::from(v).into() /
Cow::Owned(Vec::from(v)) double-hop that would still allocate the
same [Cow::Owned] arm through the sibling byte-owned axis.
Deliberately returns std::borrow::Cow::Owned rather than
std::borrow::Cow::Borrowed — the substrate-primitive
CaixaVersion::as_str accessor’s .as_bytes() return does not
carry the &'static [u8] lifetime by construction (the wrapped
String storage is a runtime heap allocation, not a compile-time
literal), so the [Cow<'static, [u8]>] output shape rules out the
borrowed arm and the owned arm is the type-correct projection
(mirroring the paired sibling [From<CaixaVersion> for std::borrow::Cow<'static, str>] axis’s own [Cow::Owned] discipline
at 55532e5). Peer of the paired owned-input
[From<CaixaVersion> for Vec<u8>] impl (98d38ed) on the same
primitive — both route through the wrapper’s own heap allocation via
a move on v.0.into_bytes(), preserving the zero-copy discipline the
substrate opens on its String-wrapper newtype primitive across the
byte-family reverse-projection matrix.
Extends the trait-idiomatic owned-input byte-family reverse-
projection matrix on the substrate’s core String-wrapper newtype
primitive CaixaVersion onto the [Cow<'static, [u8]>] axis —
the second corner (98d38ed on Vec<u8>, this axis on
[Cow<'static, [u8]>]) on the byte-family side, mirroring the
paired str-family axis at 55532e5 on [Cow<'static, str>]. Rust’s
standard library does not derive From<Self> for Cow<'static, [u8]>
from From<Self> for Vec<u8> (nor from From<Self> for Cow<'static, str>), so every newtype that carries a byte-owned Vec<u8>
reverse axis but not the paired [Cow<'static, [u8]>] axis forces
every [Cow<'static, [u8]>]-typed call site through a
Vec::<u8>::from(v).into() intermediary allocation whose bounds
carry no compile-time link back to the newtype’s storage.
Pinned load-bearing by
[tests::caixa_version_from_into_owned_cow_bytes_returns_owned_wrapped_body]
(byte-parity + [Cow::Owned]-arm pin against
CaixaVersion::as_str .as_bytes() on the same instance, plus a
round-trip witness through the paired [From<String> for CaixaVersion] constructor after re-materializing the byte-tail
through String::from_utf8) and
[tests::caixa_version_from_into_owned_cow_bytes_and_vec_bytes_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for Vec<u8>] and pre-existing byte-view
[AsRef<[u8]>] impls on the same instance, closing the “owned-input
into Vec<u8> vs. owned-input into [Cow<'static, [u8]>]”
bifurcation on the same wrapped body).
Source§impl From<CaixaVersion> for Box<[u8]>
Trait-idiomatic owned-input, [Box<[u8]>] output byte-owned reverse
projection on the CaixaVersion newtype primitive — the [Box<[u8]>]
companion to the paired owned-input [From<CaixaVersion> for Vec<u8>]
(98d38ed) and [From<CaixaVersion> for std::borrow::Cow<'static, [u8]>]
(baf7537) impls on the same primitive, mirroring the sibling str-family
[From<CaixaVersion> for Box<str>] axis (32d861a) onto the byte-family
side of the reverse-projection matrix. Routes through
Vec::<u8>::into_boxed_slice(v.0.into_bytes()), moving the wrapper’s
own heap allocation into a fit-to-length boxed byte slice — no re-copy of
the per-instance version body’s bytes on the fixed-capacity path
(Vec::<u8>::into_boxed_slice reuses the underlying buffer verbatim
when the length matches its capacity; when the Vec<u8> carries slack
it reallocates once to shrink), so every consumer that binds a
CaixaVersion through the standard-library .into() /
[From<Self> for Box<[u8]>] axis reaches the wrapped byte-string through
one substrate-primitive dispatch on the same underlying heap storage the
manifest-parse forward [From<String> for CaixaVersion] constructor
accepted.
impl From<CaixaVersion> for Box<[u8]>
Trait-idiomatic owned-input, [Box<[u8]>] output byte-owned reverse
projection on the CaixaVersion newtype primitive — the [Box<[u8]>]
companion to the paired owned-input [From<CaixaVersion> for Vec<u8>]
(98d38ed) and [From<CaixaVersion> for std::borrow::Cow<'static, [u8]>]
(baf7537) impls on the same primitive, mirroring the sibling str-family
[From<CaixaVersion> for Box<str>] axis (32d861a) onto the byte-family
side of the reverse-projection matrix. Routes through
Vec::<u8>::into_boxed_slice(v.0.into_bytes()), moving the wrapper’s
own heap allocation into a fit-to-length boxed byte slice — no re-copy of
the per-instance version body’s bytes on the fixed-capacity path
(Vec::<u8>::into_boxed_slice reuses the underlying buffer verbatim
when the length matches its capacity; when the Vec<u8> carries slack
it reallocates once to shrink), so every consumer that binds a
CaixaVersion through the standard-library .into() /
[From<Self> for Box<[u8]>] axis reaches the wrapped byte-string through
one substrate-primitive dispatch on the same underlying heap storage the
manifest-parse forward [From<String> for CaixaVersion] constructor
accepted.
A future consumer that wants a [Box<[u8]>]-typed handle on a
CaixaVersion — a per-caixa struct field typed Box<[u8]> rather than
Vec<u8> to trim the twenty-four-byte pointer + length + capacity
header down to sixteen bytes on the pointer + length pair (a shape the
substrate acknowledges as the natural fixed-length storage for
once-written-never-mutated version byte-tails held across the whole
operator reconciliation cycle), a future
HashMap::<Box<[u8]>, _>::from_iter([(versao.into(), _)]) per-versao
lookup where the map’s key type is [Box<[u8]>] rather than owned
Vec<u8> so the map’s per-entry key-slot carries the sixteen-byte
[Box<[u8]>] header instead of the twenty-four-byte Vec<u8> header,
a future M4 admission-webhook rejection body whose per-arm error-frame
composer accepts a [Box<[u8]>] intermediate for the same reason —
reaches the wrapped byte-string through this one dispatch, without the
pre-lift Vec::<u8>::from(v).into_boxed_slice() double-hop that would
still allocate through the same Vec<u8> intermediary on the way to
the same [Box<[u8]>] slot but with one extra header-slot round-trip.
Peer of the paired owned-input [From<CaixaVersion> for Vec<u8>]
(98d38ed) and [From<CaixaVersion> for std::borrow::Cow<'static, [u8]>]
(baf7537) impls on the same primitive — all three route through
v.0.into_bytes() (the Vec<u8> axis returns the wrapped buffer
verbatim; the [Cow<'static, [u8]>] axis wraps it in [Cow::Owned];
this axis shrinks it to a fit-to-length boxed byte slice via
Vec::<u8>::into_boxed_slice), preserving the zero-copy discipline
the substrate opens on its String-wrapper newtype primitive across the
byte-family reverse-projection matrix. Rust’s standard library does not
derive From<Self> for Box<[u8]> from From<Self> for Vec<u8> (nor
from From<Self> for Cow<'static, [u8]>), so every newtype that carries
the paired reverse Vec<u8> axis but not the paired [Box<[u8]>] axis
forces every [Box<[u8]>]-typed call site through a
Vec::<u8>::from(v).into_boxed_slice() intermediary allocation whose
bounds carry no compile-time link back to the newtype’s storage.
Extends the trait-idiomatic owned-input byte-family reverse-projection
matrix on the substrate’s core String-wrapper newtype primitive
CaixaVersion onto the [Box<[u8]>] axis — the third corner (98d38ed
on Vec<u8>, baf7537 on [Cow<'static, [u8]>], this axis on
[Box<[u8]>]) on the byte-family side, mirroring the paired str-family
axis at 32d861a on Box<str>.
Pinned load-bearing by
[tests::caixa_version_from_into_owned_box_bytes_returns_wrapped_body]
(byte-parity pin against CaixaVersion::as_str .as_bytes() on the
same instance, plus a round-trip witness through the paired
[From<String> for CaixaVersion] constructor closing the two-way
Self → Box<[u8]> → Vec<u8> → String → Self cycle for the UTF-8-valid
bodies every SemVer-shaped :versao is by construction) and
[tests::caixa_version_from_into_owned_box_bytes_and_vec_bytes_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for Vec<u8>],
[From<CaixaVersion> for Cow<'static, [u8]>], and the pre-existing
borrowed [AsRef<[u8]>] byte-view impls on the same instance, closing
the “owned-input into Vec<u8> vs. Cow<'static, [u8]> vs. Box<[u8]>”
three-corner partition on the same wrapped body).
Source§impl From<CaixaVersion> for Arc<[u8]>
Trait-idiomatic owned-input, [std::sync::Arc<[u8]>] output byte-owned
reverse projection on the CaixaVersion newtype primitive — the
atomically-refcounted byte-slice mirror of the paired owned-input
[From<CaixaVersion> for std::sync::Arc<str>] (3e67756) impl on the
string-side reverse-projection matrix, and the fourth axis in the
byte-side reverse-projection matrix that already carries
[From<CaixaVersion> for Vec<u8>] (98d38ed),
[From<CaixaVersion> for std::borrow::Cow<'static, [u8]>] (baf7537),
and [From<CaixaVersion> for Box<[u8]>] (703b2fd). Routes through
[std::sync::Arc::<[u8]>::from](v.0.into_bytes()), which moves the
wrapper’s own String heap allocation into a Vec<u8> verbatim
(String::into_bytes is a niche-swap on the same buffer, no re-copy)
and then copies the bytes once into a fresh atomically-refcounted heap
slab whose header carries the strong + weak counters the
[std::sync::Arc<[u8]>] layout requires — one heap allocation on the
owned-input path, mirroring the paired std::sync::Arc<str> axis.
impl From<CaixaVersion> for Arc<[u8]>
Trait-idiomatic owned-input, [std::sync::Arc<[u8]>] output byte-owned
reverse projection on the CaixaVersion newtype primitive — the
atomically-refcounted byte-slice mirror of the paired owned-input
[From<CaixaVersion> for std::sync::Arc<str>] (3e67756) impl on the
string-side reverse-projection matrix, and the fourth axis in the
byte-side reverse-projection matrix that already carries
[From<CaixaVersion> for Vec<u8>] (98d38ed),
[From<CaixaVersion> for std::borrow::Cow<'static, [u8]>] (baf7537),
and [From<CaixaVersion> for Box<[u8]>] (703b2fd). Routes through
[std::sync::Arc::<[u8]>::from](v.0.into_bytes()), which moves the
wrapper’s own String heap allocation into a Vec<u8> verbatim
(String::into_bytes is a niche-swap on the same buffer, no re-copy)
and then copies the bytes once into a fresh atomically-refcounted heap
slab whose header carries the strong + weak counters the
[std::sync::Arc<[u8]>] layout requires — one heap allocation on the
owned-input path, mirroring the paired std::sync::Arc<str> axis.
A future consumer that wants a [std::sync::Arc<[u8]>]-typed handle on
a CaixaVersion — a share-through-clone byte-tail held across a
per-caixa caixa-operator reconcile task where every spawn point wants
a cheap .clone() on the version body’s byte view without each task
re-allocating its own Vec<u8> copy (the std::sync::Arc::clone
path bumps the atomic refcount in place and returns a pointer-width
handle), a future HashMap::<std::sync::Arc<[u8]>, _>::from_iter
per-versao lookup keyed by the byte-tail across worker threads, a
future M4 admission-webhook decoder that materializes decoded version
bodies as [std::sync::Arc<[u8]>] slices so downstream verdict-composer
tasks share the immutable byte-tail without a per-consumer
Vec::<u8>::clone — reaches the wrapped byte-tail through this one
dispatch, without the pre-lift Vec::<u8>::from(v).into::<Arc<[u8]>>()
double-hop that would still allocate the same [Arc<[u8]>] slab plus
one intermediary Vec<u8> between the wrapper and the
[std::sync::Arc<[u8]>] slot.
Pinned load-bearing by
[tests::caixa_version_from_into_owned_arc_bytes_returns_wrapped_body]
(byte-parity pin against CaixaVersion::as_str .as_bytes() on the
same instance, plus a round-trip witness through the paired
[From<String> for CaixaVersion] constructor closing the two-way
Self → Arc<[u8]> → Vec<u8> → String → Self cycle on UTF-8-valid
bodies) and
[tests::caixa_version_from_into_owned_arc_bytes_and_box_bytes_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for Vec<u8>],
[From<CaixaVersion> for Cow<'static, [u8]>], and
[From<CaixaVersion> for Box<[u8]>] impls on the same instance,
closing the four-corner “owned-input into Vec<u8> vs. Cow<'static, [u8]>
vs. Box<[u8]> vs. Arc<[u8]>” partition on the same wrapped body).
Source§impl From<CaixaVersion> for Rc<[u8]>
Trait-idiomatic owned-input, [std::rc::Rc<[u8]>] output byte-owned
reverse projection on the CaixaVersion newtype primitive — the
single-threaded-reference-counted byte-slice mirror of the paired
owned-input [From<CaixaVersion> for std::rc::Rc<str>] impl on the
string-side reverse-projection matrix, and the fifth (and final) axis in
the byte-side reverse-projection matrix that already carries
[From<CaixaVersion> for Vec<u8>] (98d38ed),
[From<CaixaVersion> for std::borrow::Cow<'static, [u8]>] (baf7537),
[From<CaixaVersion> for Box<[u8]>] (703b2fd), and
[From<CaixaVersion> for std::sync::Arc<[u8]>] (3d5fc43). Routes through
[std::rc::Rc::<[u8]>::from](v.0.into_bytes()), which moves the
wrapper’s own String heap allocation into a Vec<u8> verbatim
(String::into_bytes is a niche-swap on the same buffer, no re-copy) and
then copies the bytes once into a fresh single-threaded-refcounted heap
slab whose header carries the non-atomic strong + weak counters the
[std::rc::Rc<[u8]>] layout requires — one heap allocation on the
owned-input path, mirroring the paired std::rc::Rc<str> axis on the
string-side matrix and the sibling [std::sync::Arc<[u8]>] axis on the
byte-side matrix.
impl From<CaixaVersion> for Rc<[u8]>
Trait-idiomatic owned-input, [std::rc::Rc<[u8]>] output byte-owned
reverse projection on the CaixaVersion newtype primitive — the
single-threaded-reference-counted byte-slice mirror of the paired
owned-input [From<CaixaVersion> for std::rc::Rc<str>] impl on the
string-side reverse-projection matrix, and the fifth (and final) axis in
the byte-side reverse-projection matrix that already carries
[From<CaixaVersion> for Vec<u8>] (98d38ed),
[From<CaixaVersion> for std::borrow::Cow<'static, [u8]>] (baf7537),
[From<CaixaVersion> for Box<[u8]>] (703b2fd), and
[From<CaixaVersion> for std::sync::Arc<[u8]>] (3d5fc43). Routes through
[std::rc::Rc::<[u8]>::from](v.0.into_bytes()), which moves the
wrapper’s own String heap allocation into a Vec<u8> verbatim
(String::into_bytes is a niche-swap on the same buffer, no re-copy) and
then copies the bytes once into a fresh single-threaded-refcounted heap
slab whose header carries the non-atomic strong + weak counters the
[std::rc::Rc<[u8]>] layout requires — one heap allocation on the
owned-input path, mirroring the paired std::rc::Rc<str> axis on the
string-side matrix and the sibling [std::sync::Arc<[u8]>] axis on the
byte-side matrix.
A future consumer that wants a [std::rc::Rc<[u8]>]-typed handle on a
CaixaVersion — a per-feira verb’s single-threaded byte-tail
composer that clones the version body’s byte view across a chain of
Nord-themed diagnostic emitters without paying either the
Vec::<u8>::clone full-allocation cost (every step re-allocates its
own buffer) or the atomic-refcount overhead the paired
[std::sync::Arc<[u8]>] axis forces (the std::rc::Rc::clone path
bumps a non-atomic refcount in place and returns a pointer-width handle,
cheaper than the paired atomic increment on the sibling
[std::sync::Arc<[u8]>] axis by a measurable margin on hot
single-threaded call sites), a future single-threaded
HashMap::<std::rc::Rc<[u8]>, _>::from_iter per-versao lookup keyed by
the byte-tail rather than the string-tail so the map’s per-entry
key-slot carries the pointer-width [Rc<[u8]>] handle instead of the
twenty-four-byte Vec<u8> header, a future feira lint per-caixa
byte-diagnostic table whose per-column Cell<std::rc::Rc<[u8]>> payload
carries the version body’s byte tail across the row-composer +
column-composer + wrapper phases through the pointer-width handle
rather than a Vec<u8> per phase — reaches the wrapped byte-string
through this one dispatch, without the pre-lift
Vec::<u8>::from(v).into::<Rc<[u8]>>() double-hop that would still
allocate the same [Rc<[u8]>] slab plus one intermediary Vec<u8>
between the wrapper and the [std::rc::Rc<[u8]>] slot.
Peer of the paired owned-input [From<CaixaVersion> for Vec<u8>]
(98d38ed), [From<CaixaVersion> for Cow<'static, [u8]>] (baf7537),
[From<CaixaVersion> for Box<[u8]>] (703b2fd), and
[From<CaixaVersion> for std::sync::Arc<[u8]>] (3d5fc43) impls on the
same primitive — all five route through v.0.into_bytes() (the
Vec<u8> axis returns the niche-swap buffer verbatim; the
[Cow<'static, [u8]>] axis wraps it in [Cow::Owned]; the
[Box<[u8]>] axis shrinks it to a fit-to-length boxed byte slice; the
[Arc<[u8]>] axis copies the bytes into a fresh atomically-refcounted
slab; this axis copies the bytes into a fresh single-threaded-refcounted
slab whose header carries the non-atomic strong + weak counters the
[std::rc::Rc<[u8]>] layout requires), preserving the substrate’s
single-dispatch reverse-projection discipline across the five byte-owned
axes. Rust’s standard library does not derive From<Self> for Rc<[u8]>
from From<Self> for Arc<[u8]> (the [std::sync::Arc<[u8]>] and
[std::rc::Rc<[u8]>] layouts share the same on-disk shape but the trait
tables are disjoint, and no blanket
impl<T> From<T> for Rc<[u8]> where Arc<[u8]>: From<T> exists in
core), so every newtype that carries the paired [std::sync::Arc<[u8]>]
axis but not the paired [std::rc::Rc<[u8]>] axis forces every
single-threaded [std::rc::Rc<[u8]>]-typed call site through a
Vec::<u8>::from(v).into() / Rc::<[u8]>::from(v.to_string().into_bytes())
double-allocation detour that heap-allocates a fresh intermediary
Vec<u8> between the wrapper and the [std::rc::Rc<[u8]>] slot.
Closes the trait-idiomatic owned-input, byte-owned reverse-projection
matrix on the substrate’s core String-wrapper newtype primitive
CaixaVersion across the full {Vec<u8>, Cow<'static, [u8]>, Box<[u8]>, Arc<[u8]>, Rc<[u8]>} roster — the fifth and final axis
(98d38ed on Vec<u8>, baf7537 on [Cow<'static, [u8]>], 703b2fd on
[Box<[u8]>], 3d5fc43 on [std::sync::Arc<[u8]>], this axis on
[std::rc::Rc<[u8]>]).
Pinned load-bearing by
[tests::caixa_version_from_into_owned_rc_bytes_returns_wrapped_body]
(byte-parity pin against CaixaVersion::as_str .as_bytes() on the
same instance, plus a round-trip witness through the paired
[From<String> for CaixaVersion] constructor closing the two-way
Self → Rc<[u8]> → Vec<u8> → String → Self cycle on UTF-8-valid bodies)
and
[tests::caixa_version_from_into_owned_rc_bytes_and_arc_bytes_agree_on_every_shape]
(cross-axis partition pin against the paired owned-input
[From<CaixaVersion> for Vec<u8>],
[From<CaixaVersion> for Cow<'static, [u8]>],
[From<CaixaVersion> for Box<[u8]>], and
[From<CaixaVersion> for std::sync::Arc<[u8]>] impls on the same
instance, closing the five-corner “owned-input into Vec<u8> vs.
Cow<'static, [u8]> vs. Box<[u8]> vs. Arc<[u8]> vs. Rc<[u8]>”
partition on the same wrapped body).
Source§impl From<String> for CaixaVersion
impl From<String> for CaixaVersion
Source§impl FromStr for CaixaVersion
Substrate-canonical stdlib std::str::FromStr parse-set entry point on
the CaixaVersion newtype primitive — closes the canonical
str::parse::<CaixaVersion>() axis on the paired [From<&str> for CaixaVersion] / [From<String> for CaixaVersion] infallible
forward-projection constructors. Delegates byte-for-byte through the
paired borrowed-input impl From<&str> for CaixaVersion immediately
above (which wraps s.to_string() into the newtype’s inner String
slot), so every consumer that reaches CaixaVersion through the
stdlib T: FromStr-bounded parse surface (str::parse::<CaixaVersion>,
a clap::Parser-derived #[arg(value_parser)] on a future feira publish --versao <ver> arg-parse, a serde_with::DisplayFromStr
wrapper on the crate::Caixa::versao field in a downstream typed-YAML
derive, or any generic fn parse_versao<T: FromStr>(s: &str) -> Result<T, T::Err> receiver) routes through the same [String::to_string]-shaped
wrap the paired From<&str> constructor already exercises. type Err = std::convert::Infallible because the paired From<&str> constructor is
total — CaixaVersion stores the wrapped string raw at rest (the
author surface’s single-quoted :versao "…" literal round-trips
byte-for-byte) and defers semver validation to the paired
CaixaVersion::parse Result<semver::Version, VersionError>
accessor, so no byte-string the standard-library parse-set entry point
receives can fail construction on this axis (any &str is a valid
CaixaVersion body at rest; only .parse::<semver::Version>() on the
wrapped body can reject a shape the semver grammar refuses). Peer of
the paired impl FromStr for String stdlib impl on the standard-library
String newtype (whose Err = Infallible covers the same “any &str is
a valid String body” total-wrap discipline the CaixaVersion
newtype installs on the caixa-core surface). The first standard-library
stdlib-parse-set entry point on the CaixaVersion newtype beyond the
paired forward-projection From<&str> / From<String>
constructors and the sibling fmt::Display / AsRef<str> /
std::borrow::Borrow<str> projections the newtype already carries.
impl FromStr for CaixaVersion
Substrate-canonical stdlib std::str::FromStr parse-set entry point on
the CaixaVersion newtype primitive — closes the canonical
str::parse::<CaixaVersion>() axis on the paired [From<&str> for CaixaVersion] / [From<String> for CaixaVersion] infallible
forward-projection constructors. Delegates byte-for-byte through the
paired borrowed-input impl From<&str> for CaixaVersion immediately
above (which wraps s.to_string() into the newtype’s inner String
slot), so every consumer that reaches CaixaVersion through the
stdlib T: FromStr-bounded parse surface (str::parse::<CaixaVersion>,
a clap::Parser-derived #[arg(value_parser)] on a future feira publish --versao <ver> arg-parse, a serde_with::DisplayFromStr
wrapper on the crate::Caixa::versao field in a downstream typed-YAML
derive, or any generic fn parse_versao<T: FromStr>(s: &str) -> Result<T, T::Err> receiver) routes through the same [String::to_string]-shaped
wrap the paired From<&str> constructor already exercises. type Err = std::convert::Infallible because the paired From<&str> constructor is
total — CaixaVersion stores the wrapped string raw at rest (the
author surface’s single-quoted :versao "…" literal round-trips
byte-for-byte) and defers semver validation to the paired
CaixaVersion::parse Result<semver::Version, VersionError>
accessor, so no byte-string the standard-library parse-set entry point
receives can fail construction on this axis (any &str is a valid
CaixaVersion body at rest; only .parse::<semver::Version>() on the
wrapped body can reject a shape the semver grammar refuses). Peer of
the paired impl FromStr for String stdlib impl on the standard-library
String newtype (whose Err = Infallible covers the same “any &str is
a valid String body” total-wrap discipline the CaixaVersion
newtype installs on the caixa-core surface). The first standard-library
stdlib-parse-set entry point on the CaixaVersion newtype beyond the
paired forward-projection From<&str> / From<String>
constructors and the sibling fmt::Display / AsRef<str> /
std::borrow::Borrow<str> projections the newtype already carries.
§Compounding
The stdlib parse-set entry point is the canonical Rust-idiomatic axis
generic bounds compose against: str::parse::<T>() is a T: FromStr-
bounded generic (not a T: for<'a> TryFrom<&'a str>-bounded one), so
lifting the axis onto CaixaVersion unlocks the .parse::<CaixaVersion>()
short-form on every future stdlib-shaped consumer without forcing the
caller to spell the paired From<&str> constructor at the wire-up site.
A future clap::Args-derived feira publish --versao <ver> arg-parse
composes arg.parse::<CaixaVersion>() directly through the
#[arg(value_parser = clap::value_parser!(CaixaVersion))] short-form
(which resolves through the T: FromStr bound clap::value_parser!
installs on any type carrying the trait), a serde_with::DisplayFromStr
wrapper on a future typed-YAML crate::Caixa::versao field routes
through the same T: FromStr bound serde_with keys off, and any
generic per-authored-string coalescer over a mixed newtype family
(Result<T, T::Err> on a T: FromStr bound) picks up
CaixaVersion as one of its arms by construction.
§Round-trip discipline
The Err = Infallible shape witnesses the round-trip discipline the
paired forward-projection fmt::Display impl closes at compile time:
s.parse::<CaixaVersion>().unwrap().to_string() == s for every &str
(the fail-before-pass-after pin
[caixa_version_from_str_round_trips_through_display_on_every_input]
witnesses this against the sibling caret_matches_minor_range /
star_is_any / caixa_version_as_str_accessor_is_const_fn fixture
bodies covering the semver-shape, prerelease-shape, empty-body,
requirement-shape, and non-semver-junk corners). Any future accidental
narrowing (a stray parse_semver_first validation gate slipping onto
the wrap path, a normalization step that would drop whitespace or
canonicalize a prerelease tag) trips the pin at caixa-core build time
under the byte-equality assertion, refusing the divergent shape ahead
of the downstream materializer’s admit cycle.
Source§impl Hash for CaixaVersion
impl Hash for CaixaVersion
Source§impl PartialEq for CaixaVersion
impl PartialEq for CaixaVersion
Source§impl Serialize for CaixaVersion
impl Serialize for CaixaVersion
impl StructuralPartialEq for CaixaVersion
Auto Trait Implementations§
impl Freeze for CaixaVersion
impl RefUnwindSafe for CaixaVersion
impl Send for CaixaVersion
impl Sync for CaixaVersion
impl Unpin for CaixaVersion
impl UnsafeUnpin for CaixaVersion
impl UnwindSafe for CaixaVersion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Upper case
letters are used (e.g. F9B4CA)