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

Ergnomic improvements #14

Open
14 tasks
yoshuawuyts opened this issue Dec 28, 2018 · 0 comments
Open
14 tasks

Ergnomic improvements #14

yoshuawuyts opened this issue Dec 28, 2018 · 0 comments

Comments

@yoshuawuyts
Copy link
Contributor

Feature Request

Detailed Description

The sleep-parser crate in its current state is a bit rudimentary. It correctly parses SLEEP headers, but the resulting artifacts aren't self-evident. We should express the different resulting structures as their own structs, and define the relationships between them.

Context

This should make the header types, and relationships between them more explicit.

Possible Implementation

  • create a Bitfield struct
  • create a Signatures struct
  • create a Tree struct
  • implement TryFrom<Header> for Bitfield
  • implement TryFrom<Header> for Signatures
  • implement TryFrom<Header> for Tree
  • implement std::str::FromStr for Header
  • implement std::str::FromStr for Bitfield
  • implement std::str::FromStr for Signatures
  • implement std::str::FromStr for Tree
  • implement TryFrom<Vec<u8>> for Header
  • implement TryFrom<Vec<u8>> for Bitfield
  • implement TryFrom<Vec<u8>> for Signatures
  • implement TryFrom<Vec<u8>> for Tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant