-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
Context:
The storage crate defines three traits, Encoder Encode and Decode to encode and decode data that can be serialized/deserialized with Serde. See
fuel-core/crates/storage/src/codec.rs
Line 19 in f5240cb
| pub trait Encoder { |
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
| pub trait Encoder: Send { |
Proposal:
- Move the
Encoder,EncodeandDecodetrait from storage to a separate crate (maybefuel_types?) - Change the interface to be compatible with the traits used both in the P2P service and in the storage crate,
- Refactor P2P service and Storage crate to implement the new traits, and deprecate the old ones.
Metadata
Metadata
Assignees
Labels
No labels