Turn numalgos into child module of peer_did module #1035
Merged
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.
numalgos
to be child model ofpeer_did
. A "numalgo" abstraction doesn't exist outside of peer dids, now this is reflected via the structure itself. It also removes some discrepancy, as we had bothsrc/numalgos
andsrc/peer_did/numalgos
old/new directory structure compared:
I would further suggest to pull everything in
src/peer_did
a level up, pulling those files to the root. That will make imports in 3rd party pkgs nicer, is it won't duplicatepeer_did
token in the import path twice.Additionally
did_peer/src/peer_did/regex.rs
anddid_peer/src/peer_did/validate.rs
peer_did_resolver
toresolver
as the prefix seemed redundant, given we operate indid_peer
packageGenericPeerDid
toAnyPeerDid
- this is bit more speculative and shall this change be accepted, we should probably do the same thing with Connection (perhapsAnyStateConnection
instead ofGenericConnection
. I personally don't like the type name to contain "Generic" as it's makes spoken speech more difficult to understand - easy to confuse someone saying "GenericFoobar" as typeGenericFoobar
or "Generic Foobar", as in terms of generic, the language feature.