Ability to use `SliceWithHeader` in a newtype directly without `Box`
- Lingua principale
- Rust
- Stelle
- 137
- Fork
- 15
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia esaminando la issue #69 e la discussione collegata su Stack Overflow sui newtypes per gli unsized types e sulle controparti possedute. Determina se il design richiesto può supportare sia un header sia l’uso diretto di un newtype senza Box, Rc o Arc; il lavoro è completato quando la fattibilità e la modifica API necessaria sono chiare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100