| Crates.io | thin-boxed-slice |
| lib.rs | thin-boxed-slice |
| version | 0.2.5 |
| created_at | 2024-04-29 05:31:34.021211+00 |
| updated_at | 2024-04-29 07:50:09.056858+00 |
| description | `ThinBoxedSlice` stores the size of the slice before the content of the slice, so that `size_of:: |
| homepage | |
| repository | https://github.com/seekstar/thin-boxed-slice |
| max_upload_size | |
| id | 1223853 |
| size | 23,689 |
ThinBoxedSlice stores the size of the slice before the content of the slice, so that size_of::<ThinBoxedSlice> is only the size of a pointer.
I mainly use it as the key of hash tables, therefore not all traits of Box are implemented for ThinBoxedSlice. If you need some additional traits, you may create an issue or PR.
Note that thin-slice stores the fat pointer of the slice into a new heap memory if the slice length is large.