beef:更快更紧凑的std实现 源码
牛肉 Cow更快,更紧凑的实现。 --- use beef :: Cow; let borrowed: Cow < str> = Cow :: borrowed ( "Hello" ); let owned: Cow < str> = Cow :: owned ( String :: from ( "World" )); assert_eq! ( format! ( "{} {}!" , borrowed, owned), "Hello World!" , ); 此板条箱暴露了Cow两个版本: beef::Cow是3个字宽:指针,长度和容量。它以容量存储所有权标签。 beef::lean::Cow宽2个字,一个字存储了长度,容量和所有权标签。 两种版本都比std::borrow::Cow精简: use std :: mem :: size_of; const W
文件列表
beef-master.zip
(预估有个18文件)
beef-master
.gitignore
19B
LICENSE-MIT
1KB
README.md
4KB
.github
workflows
tests.yaml
885B
clippy.yaml
417B
format.yaml
288B
FUNDING.yml
69B
暂无评论