mainrs / mainrs/markdown-composer-rs

Re-think about API

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The builder and types API originated from the idea to have both a borrowing and owning API. However, during development I personally only needed the owning one and moved all implementations to be `String`.

This can still be done by using `Cow` inside all `types` and having the `types`-related functions borrow the content and use the builder API for owned values.

As of now, the two APIs will still be kept as-is, even if it doesn't make much sense to have both right now. The refactor should happen before the first stable release though.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the builder and types APIs and their existing borrowing and owning implementations. Compare the current String-based implementations with the proposed Cow-based approach, then determine the API shape that should be settled before the first stable release.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.