1 个不稳定版本
使用旧的Rust 2015
| 0.0.0 | 2016年5月1日 |
|---|
#12 in #growable
9KB
210 行
grow
为Rust提供可增长指针类型。 Grow 将动态分配的数组类型如 Vec 和 String 的概念推广到任意DST,从而有效地消除了对如 [T] 和 str 等类型单独的可增长版本的需求。
Grow<[T]> 等同于 Vec<T>,Grow<str> 等同于 String,Grow<OsStr> 等同于 OsString,等等。注意,push、pop 等方法实际上都没有在相应的 Grow 类型上实现。
使用方法
只需将 P1start/grow 添加到您的 Cargo.toml 中
[dependencies.grow]
git = "git://github.com/P1start/grow"
许可证
根据您的选择,受以下任一许可证的约束
- Apache License,版本 2.0,(LICENSE-APACHE 或 https://apache.ac.cn/licenses/LICENSE-2.0)
- MIT许可证 (LICENSE-MIT 或 https://open-source.org.cn/licenses/MIT)
。
贡献
除非您明确声明,否则根据 Apache-2.0 许可证定义的,您有意提交以包含在作品中的任何贡献,都应按上述方式双重许可,不附加任何额外的条款或条件。