Currently it is not possible for downstream to use a generic on the `Address` type in structs in conjuncture with derives (`serde::Deserialize` and `Display`) because our impls are only done for `NetworkUnchecked` (as they should be). However, as observed by dpc, if we add a secondary marker trait and use it to bound the impls, implementing the new marker for `NetworkUnchecked` then downstream can use derives by way of ``` #[derive(Serialize, Deserialize)] struct Foo<V> where V: NetworkValidation, { #[serde(bound(deserialize = "V: NetworkValidationUnchecked"))] address: Address<V>, } ``` This is cool as hell because the `Address` type is currently a royal PITA. |
||
---|---|---|
.. | ||
contrib | ||
embedded | ||
examples | ||
src | ||
tests | ||
CHANGELOG.md | ||
Cargo.toml |