Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: `blueprint-serde` crate This crates lets us convert to and from the `Field` type easily with `serde`'s `Serialize` and `Deserialize` traits. This will allow for custom types in job parameters, as well as making it easier overall to convert between these types. The crate adds two public functions: * `to_field` - Convert any `Serialize` type into a `Field` * `from_field` - Attempt to convert a `Field` into a `DeserializeOwned` type While mostly useful for `Field::Struct`, one can also do: ```rust let age: u8 = gadget_blueprint_serde::from_field(Field::Uint8(40)).unwrap(); ``` Or conversion for any primitive type, if they wanted. * chore(gadget-blueprint-serde): simplify primitive & struct deserialization * fix(gadget-blueprint-serde): add unit serialization * chore(gadget-blueprint-serde): move `serde-test` to dev dependencies * chore(gadget-blueprint-serde): improve docs and add examples * feat(gadget-blueprint-serde): force `#![no_std]` * feat(gadget-blueprint-serde): add `std` feature * chore(gadget-blueprint-serde): add tests for enums * chore(gadget-blueprint-serde): defer enum variant deserializing * chore: bump `tangle-subxt`
- Loading branch information