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

Framing refactor: framing.rs api #1033

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Aug 20, 2024

  1. Constrain T and B generics

    `Frame` is defined with `T` and `B` generics but the constraints are
    only introduced in the impl level which makes it harder to read the enum
    and understand whats those generics are about. As those generics are a
    key part of the `Frame` enum, it makes more sense to introduce the
    constraints in the enum level.
    jbesraa authored and plebhash committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    005e6c9 View commit details
    Browse the repository at this point in the history
  2. Change payload fn signature to return Option

    ..instead of panicking
    jbesraa authored and plebhash committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    e613a46 View commit details
    Browse the repository at this point in the history
  3. Change Sv2Frame::get_header to header and ..

    Remove `Option` from its return type.
    jbesraa authored and plebhash committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    d0aae41 View commit details
    Browse the repository at this point in the history
  4. Change Sv2Frame from struct to enum

    `Sv2Frame` can handle serialized and non-serliazed data, both scenarios
    were previously in the same struct wrapped by Option, where if one is
    Some, the other is None but never both None or Some.
    jbesraa authored and plebhash committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    d1d9247 View commit details
    Browse the repository at this point in the history