Available on crate features
types-bytes and types only.Expand description
定容字节容器:栈上(StackBytes)与堆上(HeapBytes,需 alloc)实现,Drop 与显式擦除均经易失写清零。
需要启用 "types-bytes" 特性。
Structs§
- Heap
Bytes alloc - 堆上定容字节容器,语义与
StackBytes一致,适用于超过栈承载的较大敏感数据。 - Stack
Bytes - 栈上定容字节容器,
Drop时自动清零,适用于短密钥、非对称 nonce 等小敏感数据。
Enums§
- Bytes
Error - 字节容器的错误类型。未来可能新增变体/字段,请勿依赖穷尽匹配。
Traits§
- Bytes
- 定容字节容器的统一接口:写入、擦除与向更大容器搬运。
Type Aliases§
- Bytes
Result - 字节容器操作的统一返回类型。