orga::store::{Read, Write} confusingly conflict with std::io::{Read, Write}
cwlittle opened this issue · comments
I think that the orga::store::{Read, Write} conflict with std::io::{Read, Write} in a confusing way. I spent a bit too much time today debugging a State implementation in BitcoinSPV because I accidentally imported to use in the context of the bounds for Encode and Decode of a new type. Having store::Read and store::Write in the unqualified namespace makes it a bit confusing when considering that there is some level of complection between Ed and Orga and Ed doesn't care about the implementation details of Orga. So Ed uses std::io's Read and Write and there is some idea of Orga having its own Read and Write.
I think we should rename these traits to StoreRead and StoreWrite or something similar to distinguish them from the std::io namespace and allow for both sets of these traits to be imported in the unqualified namespace of the context that they are being used.
After talking with Matt, it does make much more sense to keep the type names clean in the native namespace. This confusion could be easier limited by named imports, and that seems to be the rusty solution here.