-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for data types defined by sv2 extensions
In no-serde-sv2 an sv2 sequence is generic over T. If we want this sequence to be Deserialize we need T to be Fixed and GerMarker. This 2 traits were private since all the sv2 types are already defined in no-serde-sv2. But if we want to use sv2 types defined in an sv2 extensions we need to make these traits public. The Encodable dervive macro in derive_codec implement GetSize for the passed struct. But GetSize is also a blanket implementation for every type that implement Fixed. So if we implement Fixed for our new sv2 type and then we derive Encodable (commonly renamed Serialize) we get an error. This commit add an attribute to Encodable called already_sized if the struct that we want derive Encodable is market as already_sized the macro will not implement GetSize for it. This commit also bump minor version of derive_codec and no-serde-sv2 consequentially also of binary-sv2 since it reexport the above libs.
- Loading branch information
fi3
committed
Aug 19, 2024
1 parent
69d9077
commit 8e50099
Showing
7 changed files
with
52 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "binary_sv2" | ||
version = "1.0.1" | ||
version = "1.1.0" | ||
authors = ["fi3 <[email protected]>"] | ||
edition = "2018" | ||
description = "Sv2 data format" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "binary_codec_sv2" | ||
version = "1.0.0" | ||
version = "1.1.0" | ||
authors = ["fi3 <[email protected]>"] | ||
edition = "2018" | ||
description = "Sv2 data format" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "derive_codec_sv2" | ||
version = "1.0.0" | ||
version = "1.1.0" | ||
authors = ["fi3 <[email protected]>"] | ||
edition = "2018" | ||
description = "Derive macro for Sv2 binary format serializer and deserializer" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.