Skip to content

Core API being provided through traits isn't very ergonomic #17

@epage

Description

@epage

Traits work best when multiple independent implementations might exist and code wants to operate on them. However, this API uses traits to provide two different flavors of the same API without having conflicting or weirdly named symbols. However, this approach requires the to use the trait to do anything.

I'd recommend just getting rid of the stringly typed API. I don't think it will be a big loss

  • Stringly-typed APIs are generally frowned upon in Rust so there won't be too much expectation to have one
  • We implement a lot of different traits for people to access the actual str.

One open question in my mind is if Description, Body, and maybe FooterValue provide any extra feature or safety value by using a newtype.

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