в🧇
BytesSize: a a a
в🧇
Bytesf
Key::A::ref_cast(bytes)Э
union ?Э
Э

Э
f
let bytes = ...;
hash_map.remove(&Key::A(bytes.clone()))
f
Э
f
HashMap<Cow<Key>, ...> ?f
enum Key { A(Cow<Bytes>), ... }Э
Arc, там клонирование только инкрементит один атомик.f
Э
enum Key { A(Cow<Bytes>), ... }f
Э
Bytes, а [u8], то делаешь Cow<[u8]>f
f
struct Key(Vec<u8>)
impl From<String> for Key { ... }
impl From<SomethingUtterlyElse> for Key { ... }
Э
struct Key(Vec<u8>)
impl From<String> for Key { ... }
impl From<SomethingUtterlyElse> for Key { ... }