| Crates.io | serde_context |
| lib.rs | serde_context |
| version | 0.1.0 |
| created_at | 2025-12-30 14:30:58.348422+00 |
| updated_at | 2025-12-30 14:30:58.348422+00 |
| description | Convenient contextful (de)serialization compatible with the serde ecosystem |
| homepage | |
| repository | https://codeberg.org/blefebvre/serde_context |
| max_upload_size | |
| id | 2012723 |
| size | 43,163 |
Convenient contextful (de)serialization compatible with the serde ecosystem.
You can find examples in the this crate's examples directory.
There are a few limitations to this crate:
Cells,
RefCells, UnsafeCells...) to mutate state.'static can be used as context for (de)serialization.
Unsized types are supported, though.There are a few alternatives to this crate you might want to consider, each with their pros and cons:
DeserializeSeed: the official
serde stateful deserialization-only API. Requires implementing that trait for each type you are interested
in deserializing, and no derive macro is provided (nor are there any plans to ever make an official one).serde_state: a fork of serde that supports stateful
(de)serialization. Unfortunately, it looks to be unmaintained.serde_seeded: a crate providing an alternative version
of the DeserializeSeed trait with a derive macro for it. Relatively young but very promising.