Skip to content

Ergnomic improvements #14

@yoshuawuyts

Description

@yoshuawuyts

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions