Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Ability to use `SliceWithHeader` in a newtype directly without `Box`

オープン
#88 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
rust
領域
tooling

調査の方向性

まず issue #69 と、unsized types の newtypes および所有版に関するリンク先の Stack Overflow の議論を確認します。要求された設計が、Box、Rc、Arc なしで header と newtype の直接使用の両方をサポートできるかどうかを判断します。完了条件は、実現可能性と必要な API の変更が明確になっていることです。

索引モデルが issue の本文から書いたものです。

説明

I want to make a pair of newtypes MySlice(SliceWithHeader<HeaderType, u8>) and MyVec(HeaderType, Vec<u8>), so that MySlice is to MyVec as [u8] is to Vec<u8>.

It seems as per #69 that this crate offers only the ability to make MySlice(Box<SliceWithHeader<...>>) 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. But it's not clear to me how to get both (i) no Box, and (ii) header. Any suggestion?

主要言語
Rust
スター
137
フォーク
15
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CAD97/pointer-utils のほかの issue

CAD97/pointer-utils の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。