thin-boxed-slice

Crates.iothin-boxed-slice
lib.rsthin-boxed-slice
version0.2.5
sourcesrc
created_at2024-04-29 05:31:34.021211
updated_at2024-04-29 07:50:09.056858
description`ThinBoxedSlice` stores the size of the slice before the content of the slice, so that `size_of::` is only the size of a pointer.
homepage
repositoryhttps://github.com/seekstar/thin-boxed-slice
max_upload_size
id1223853
size23,689
Jiansheng Qiu (seekstar)

documentation

README

thin-boxed-slice

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.

Similar projects

thin-vec

thin-slice

Note that thin-slice stores the fat pointer of the slice into a new heap memory if the slice length is large.

Commit count: 12

cargo fmt