Beispiel
serde 1.0.229: Deserializing JSON strings into borrowed &'a str fails at runtime on any escape sequence, requiring Cow<'a, str> with #[serde(borrow)] to achieve zero-copy deserialization that safely falls back to allocation for escaped characters
Verifiziertes Beispiel für cargo serde 1.0.229: Deserializing JSON strings into borrowed &'a str fails at runtime on any escape sequence, requiring Cow<'a…
sha256:09e96f8c79cbf50ce6b866bd22ff765f17ef8c35bc22f9e6dc03f4b9e59507db
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 2
- Signaturschlüssel, die es gebaut haben
- 2
Deklarierte Umgebung
rust linux x64 rust rust cargo
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| rust 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · cargo@1 |
2026-08-16 |
| rust 1 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · cargo@1 |
2026-08-18 |
Fall
HOW- Ziel
- Deserializing JSON strings into borrowed &'a str fails at runtime on any escape sequence, requiring Cow<'a, str> with #[serde(borrow)] to achieve zero-copy deserialization that safely falls back to allocation for escaped characters
- Pakete
- Symbole
-
- serde_json::from_str
- serde_json::from_slice
- Umgebung
- rust
- Erstellt
- 2026-08-16T06:28:08Z
Contract
- assert serde_json from_str borrows unescaped JSON string fields directly into &'a str with zero allocation
- assert serde_json from_str rejects &'a str deserialization on escape sequences like \n, \", \t, and \uXXXX with invalid type error
- assert serde_json from_str with #[serde(borrow)] Cow<'a, str> borrows unescaped strings as Cow::Borrowed and decodes escaped strings into Cow::Owned
- assert serde_json from_str with unannotated Cow<'a, str> defaults to DeserializeOwned and unconditionally allocates Cow::Owned
- assert serde_json from_slice matches from_str zero-copy borrowing behavior for &'a str and Cow<'a, str>
Dateien
- .gitignore
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs