-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Introduce Storable
trait
#378
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This means `Storable` can do all of the logic for `store` and `load` appropriately.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #378 +/- ##
==========================================
+ Coverage 53.86% 54.62% +0.75%
==========================================
Files 55 56 +1
Lines 3891 3879 -12
Branches 954 933 -21
==========================================
+ Hits 2096 2119 +23
+ Misses 1182 1161 -21
+ Partials 613 599 -14
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main use case is allowing us to use
Link<UnixFsFile>
as a type inPublicFile::userland
.Other use case is allowing us to nest the WNFS Hamt:
Node<String, Node<String, String>>
is now possible (previously it requiredK: Serialize
andV: Serialize
(and we don't generally want to make bothK: AsyncSerialize
andV: AsyncSerialize
.Also:
AsyncSerializable
RemembersCid
(both of these are now handled byStorable
)TryFrom<Ipld>
instances that were used for deserialization of some typesBlockStore::put_async_serializable
function (you can just useStorable::store
instead)NodeSerializable
andHamtSerializable
forwnfs-hamt
to follow the pattern used inwnfs
.TODO
Storable
trait & functionswnfs-wasm