Ability to use `SliceWithHeader` in a newtype directly without `Box`
- Lenguaje dominante
- Rust
- Estrellas
- 137
- Forks
- 15
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza revisando el issue #69 y la discusión vinculada de Stack Overflow sobre newtypes para unsized types y sus equivalentes propietarios. Determina si el diseño solicitado puede admitir tanto un header como el uso directo de un newtype sin Box, Rc ni Arc; se considera terminado cuando la viabilidad y el cambio de API necesario estén claros.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100