That3Percent / tree-buf

An experimental serialization system written in Rust
MIT License
256 stars 8 forks source link

Consider renaming traits to avoid conflict with `io::Read` and `io::Write` #14

Closed casey closed 4 years ago

casey commented 4 years ago

Rust code often has std::io::Read and/or std::io::Write in scope, which might conflict with tree_buf::Read and tree_buff::Write.

Load and Store is one possibility that wouldn't conflict.

That3Percent commented 4 years ago

Thanks! I will rename these. I haven't yet come across a name that I love (besides maybe Serialize and Deserialize but serde took those). Load and Store while not wrong just remind too much of databases. If you want to send it over the network, for example, people don't think of it as "loading and storing" data on the wire.

casey commented 4 years ago

Names are hard! Another idea is Encode and Decode.

That3Percent commented 4 years ago

Encode & Decode it is! Implemented in https://github.com/That3Percent/tree-buf/commit/7dbdfcc7a76f2bf2c34481377c9d031c6612c15c