-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Introduce
Storable
trait (#378)
Main use case is allowing us to use `Link<UnixFsFile>` as a type in `PublicFile::userland`. Other use case is allowing us to nest the WNFS Hamt: `Node<String, Node<String, String>>` is now possible (previously it required `K: Serialize` and `V: Serialize` (and we don't generally want to make both `K: AsyncSerialize` and `V: AsyncSerialize`. Also: - Remove `AsyncSerializable` - Remove `RemembersCid` (both of these are now handled by `Storable`) - Remove `TryFrom<Ipld>` instances that were used for deserialization of some types - Remove `BlockStore::put_async_serializable` function (you can just use `Storable::store` instead) - Introduce `NodeSerializable` and `HamtSerializable` for `wnfs-hamt` to follow the pattern used in `wnfs`. --- * refactor: Absorb `RemembersCid` into `Storable` This means `Storable` can do all of the logic for `store` and `load` appropriately. * refactor: Remove empty `serializable.rs` * refactor: Remove `AsyncSerialize` * feat: `impl Storable for UnixFsFile` * chore: Adjust comment * refactor: Adjust wnfs-wasm code * chore: Write some docs
- Loading branch information
Showing
39 changed files
with
1,065 additions
and
1,061 deletions.
There are no files selected for viewing
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 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 file was deleted.
Oops, something went wrong.
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 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 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
Oops, something went wrong.