Sample
form_urlencoded 1.2.2: form_urlencoded::Serializer
Verified sample for cargo form_urlencoded 1.2.2: form_urlencoded::Serializer. The contract ran on rust 1 · linux alpine/x64 · docker and passed.
sha256:85717ebf5f6d46149cebde1ca92459c0dbcb2910a2430c622a7249e0185c9ecb
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
linux · alpine · musl x64 cargo
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| rust 1 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · cargo@1rust:1-alpine@sha256:a10e64dd139b… |
2026-09-19 |
Case
HOW- Goal
- verify form_urlencoded::Serializer in pkg:cargo/form_urlencoded@1.2.2
- Packages
- Symbols
-
- form_urlencoded::Serializer
- Created
- 2026-09-18T04:55:59Z
Contract
- Serializer::new creates a Serializer appending to an empty String
- Serializer::append_pair encodes key-value pairs separated by &
- Serializer encodes spaces as + and special characters as percent-encoded bytes
- Serializer::append_key_only appends key without equal sign
- Serializer::extend_pairs appends multiple pairs from an iterator
- Serializer::for_suffix retains target prefix before start_position
Files
- Cargo.lock
- Cargo.toml
- PROMPT.md
- csx.json
- spec.json
- src/lib.rs
- test/contract.rs
Source
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "form_urlencoded"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
dependencies = [
"percent-encoding",
]
[[package]]
name = "percent-encoding"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]]
name = "sample-form-urlencoded"
version = "1.0.0"
dependencies = [
"form_urlencoded",
]
[package]
name = "sample-form-urlencoded"
version = "1.0.0"
edition = "2021"
publish = false
[dependencies]
form_urlencoded = "=1.2.2"
[[bin]]
name = "contract"
path = "test/contract.rs"
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify form_urlencoded::Serializer in pkg:cargo/form_urlencoded@1.2.2
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:cargo/form_urlencoded@1.2.2
Demonstrate these symbols/APIs:
- form_urlencoded::Serializer
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:15a66c834a0e137442fa344600fbb300bf1232d535322cfeb5812c6715608586","contract":["Serializer::new creates a Serializer appending to an empty String","Serializer::append_pair encodes key-value pairs separated by \u0026","Serializer encodes spaces as + and special characters as percent-encoded bytes","Serializer::append_key_only appends key without equal sign","Serializer::extend_pairs appends multiple pairs from an iterator","Serializer::for_suffix retains target prefix before start_position"],"goal":"verify form_urlencoded::Serializer in pkg:cargo/form_urlencoded@1.2.2","kind":"HOW","packages":["pkg:cargo/form_urlencoded@1.2.2"],"schemaVersion":1,"symbols":["form_urlencoded::Serializer"]},"contractCommand":["cargo","run","--offline"],"environment":{"arch":"x64","distro":"alpine","ecosystem":"cargo","libc":"musl","os":"linux","packageManager":"cargo","schemaVersion":1},"license":"MIT-0","packages":["pkg:cargo/form_urlencoded@1.2.2"],"schemaVersion":1,"subject":"pkg:cargo/form_urlencoded@1.2.2","symbols":["form_urlencoded::Serializer"],"verifierAdapter":"cargo@1"}
{
"schemaVersion": 1,
"goal": "verify form_urlencoded::Serializer in pkg:cargo/form_urlencoded@1.2.2",
"kind": "HOW",
"packages": [
"pkg:cargo/form_urlencoded@1.2.2"
],
"symbols": [
"form_urlencoded::Serializer"
]
}
//! Clean-room verification sample for form_urlencoded.
pub use form_urlencoded::*;
use form_urlencoded::Serializer;
fn main() {
// 1. Serializer::new creates a Serializer appending to an empty String
let mut s1 = Serializer::new(String::new());
s1.append_pair("name", "alice");
assert_eq!(s1.finish(), "name=alice");
// 2. Serializer::append_pair encodes multiple key-value pairs separated by &
let mut s2 = Serializer::new(String::new());
s2.append_pair("key1", "val1");
s2.append_pair("key2", "val2");
assert_eq!(s2.finish(), "key1=val1&key2=val2");
// 3. Serializer encodes spaces as + and special characters as percent-encoded bytes
let mut s3 = Serializer::new(String::new());
s3.append_pair("query", "hello world & more=yes");
assert_eq!(s3.finish(), "query=hello+world+%26+more%3Dyes");
// 4. Serializer::append_key_only appends key without equal sign
let mut s4 = Serializer::new(String::new());
s4.append_key_only("flag");
s4.append_pair("count", "10");
assert_eq!(s4.finish(), "flag&count=10");
// 5. Serializer::extend_pairs appends multiple pairs from an iterator
let mut s5 = Serializer::new(String::new());
s5.extend_pairs([("a", "1"), ("b", "2"), ("c", "3")].iter().copied());
assert_eq!(s5.finish(), "a=1&b=2&c=3");
// 6. Serializer::for_suffix retains target prefix before start_position
let mut s6 = Serializer::for_suffix("https://example.com/search?".to_string(), 27);
s6.append_pair("q", "rust");
assert_eq!(s6.finish(), "https://example.com/search?q=rust");
println!("All form_urlencoded::Serializer contract assertions passed successfully.");
}
Origin Seeder
anonymous