Skip to content

feat: add (De)Serialize and JsonSchema to Html#487

Merged
m4tx merged 4 commits intomasterfrom
html-serde
Feb 23, 2026
Merged

feat: add (De)Serialize and JsonSchema to Html#487
m4tx merged 4 commits intomasterfrom
html-serde

Conversation

@m4tx
Copy link
Member

@m4tx m4tx commented Feb 22, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Serde support to the core Html newtype so it can be serialized/deserialized as a plain string (transparent newtype), aligning Html with other data types that can be passed through JSON or other Serde-based formats.

Changes:

  • Import serde::{Serialize, Deserialize} in cot-core/src/html.rs.
  • Derive Serialize and Deserialize for Html.
  • Mark Html as #[serde(transparent)] so it serializes identically to a String.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Feb 22, 2026

🐰 Bencher Report

Branchhtml-serde
Testbedgithub-ubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
empty_router/empty_router📈 view plot
🚷 view threshold
5,785.40 µs
(-2.17%)Baseline: 5,913.99 µs
7,047.89 µs
(82.09%)
json_api/json_api📈 view plot
🚷 view threshold
1,015.60 µs
(-0.15%)Baseline: 1,017.11 µs
1,159.76 µs
(87.57%)
nested_routers/nested_routers📈 view plot
🚷 view threshold
937.03 µs
(-0.08%)Baseline: 937.75 µs
1,064.06 µs
(88.06%)
single_root_route/single_root_route📈 view plot
🚷 view threshold
907.47 µs
(+0.98%)Baseline: 898.68 µs
1,021.85 µs
(88.81%)
single_root_route_burst/single_root_route_burst📈 view plot
🚷 view threshold
16,728.00 µs
(-4.47%)Baseline: 17,510.63 µs
20,719.94 µs
(80.73%)
🐰 View full continuous benchmarking report in Bencher

@m4tx m4tx changed the title feat: add (De)Serialize to Html feat: add (De)Serialize and JsonSchema to Html Feb 22, 2026
@github-actions github-actions bot added the C-lib Crate: cot (main library crate) label Feb 22, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
rust 89.64% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cot-core/src/html.rs 97.44% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@m4tx m4tx merged commit 65ca557 into master Feb 23, 2026
46 checks passed
@m4tx m4tx deleted the html-serde branch February 23, 2026 11:41
@cotbot cotbot bot mentioned this pull request Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-lib Crate: cot (main library crate)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants