Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for data types defined by sv2 extensions #1113

Merged
merged 1 commit into from
Aug 19, 2024

Commits on Aug 19, 2024

  1. 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.
    fi3 committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    8e50099 View commit details
    Browse the repository at this point in the history