`ArrayExt` trait
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- rust
调研方向
先阅读现有的 AsArrayRef 和 AsArrayMut trait 以及 Array::slice_* 方法,然后将它们的 API 与 core 中对应的 slice 和 array 方法进行比较。该 issue 需要在实现前确定命名方案和范围;当约定的扩展 trait 和对应方法都已完成规范定义并得到一致实现时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
We currently have AsArrayRef and AsArrayMut traits. #167 noted as_array_mut is inconsistent with core::slice's as_mut_array.
The issue made me think perhaps we should have more general and extensible extension traits, something like:
ArrayExt(unnecessary, just putArrayMutExt(orMutArrayExt?)mutmethods on `ArrayExt)implementedSliceExt(unnecessary)SliceMutExt(orMutSliceExt?)
The existing AsArrayRef/AsArrayMut are impl'd for both Array and core [T; N]. The idea is ArrayExt/ArrayMutExt could also be impl'd for both, and SliceExt/SliceMutExt could be impl'd for core [T].
We already provide some methods for slice conversions as Array::slice_* (which should probably stay there so they can be const fn), but it would be nice to have those directly callable from core slices via Slice(Mut)Ext.
An important question is what naming scheme do we use so we can provide parallel methods to core but which operate on hybrid_array::Array instead of core's [T; N]?
In #167 I suggested we could so something like SliceExt::as_harray to disambiguate from [T]::as_array. A wrapper for our existing Array::slice_as_chunks could perhaps be SliceExt::as_hchunks.
- 主要语言
- Rust
- 星标
- 23
- 派生
- 25
- 平均合并
- 1 小时 46 分钟
- 30 天内合并 PR
- 1
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RustCrypto/hybrid-array 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 50/100
RustCrypto/hybrid-array#201 · 7 条评论 · 7 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 45/100
RustCrypto/hybrid-array#180 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
RustCrypto/hybrid-array#66 · 3 条评论 ·
查看 RustCrypto/hybrid-array 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
bytecodealliance/wasmtime#14433 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复