You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #2388, a similar approach is taken in the p2p service, where similar are defined and implemented. These traits serve the same purpose as the storage ones, but they have a slightly different interface. See
I don't see the reason to move mentioned traits from fuel-core-storage. Looks like a right place for them. If you need the same functionality, you can use fuel-core-storage crate directly, since you work with the storage types.
no problems, it just looked to me that if we start using similar traits in other parts of the code that are not related to storage, (e.g. P2P service), then it might be worth moving them.
After #2388, I would still refactor the traits so that we don't have multiple definitions of Encoder/Encode/Decode with slightly different signatures.
Context:
The storage crate defines three traits,
Encoder
Encode
andDecode
to encode and decode data that can be serialized/deserialized with Serde. Seefuel-core/crates/storage/src/codec.rs
Line 19 in f5240cb
In #2388, a similar approach is taken in the p2p service, where similar are defined and implemented. These traits serve the same purpose as the storage ones, but they have a slightly different interface. See
fuel-core/crates/services/p2p/src/codecs.rs
Line 15 in c564941
Proposal:
Encoder
,Encode
andDecode
trait from storage to a separate crate (maybefuel_types
?)The text was updated successfully, but these errors were encountered: