Ability to use `SliceWithHeader` in a newtype directly without `Box`
- 主要言語
- Rust
- スター
- 137
- フォーク
- 15
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I want to make a pair of newtypes `MySlice(SliceWithHeader)` and `MyVec(HeaderType, Vec)`, so that `MySlice` is to `MyVec` as `[u8]` is to `Vec`.
It seems as per #69 that this crate offers only the ability to make `MySlice(Box>)` with `Box` (or `Rc`, `Arc`) but not without the `Box`.
I know it's possible to do this *without the header* as per [How can I create newtypes for an unsized type and its owned counterpart (like `str` and `String`) in safe Rust? - Stack Overflow](https://stackoverflow.com/questions/64977525/how-can-i-create-newtypes-for-an-unsized-type-and-its-owned-counterpart-like-s). But it's not clear to me how to get both (i) no `Box`, and (ii) header. Any suggestion?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず issue #69 と、unsized types の newtypes および所有版に関するリンク先の Stack Overflow の議論を確認します。要求された設計が、Box、Rc、Arc なしで header と newtype の直接使用の両方をサポートできるかどうかを判断します。完了条件は、実現可能性と必要な API の変更が明確になっていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100