FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make required header fields infallible after parsing · Issue #301 · Validus-Risk-Management/hotfix · GitHub

Make required header fields infallible after parsing #301

Description

Problem

After a message passes validation (ParsedMessage::Valid), required header fields like MsgSeqNum and MsgType are guaranteed to exist.

However, accessing them still returns Result, forcing call sites to handle impossible errors with expect() or propagate errors that can never occur.

Suggestion

The Header type could expose required fields as infallible accessors (e.g., header.msg_seq_num() -> u64) populated during parsing, while keeping the flexible .get() API for optional fields.

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


    Back | FazBrowse Home | New Git URL