-
Notifications
You must be signed in to change notification settings - Fork 85
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
Rename MethodQuery
to DIDUrlQuery
, move OrderedSet
, KeyComparable
#634
Conversation
Move OrderedSet from identity-did to identity-core. Move KeyComparable from identity-did to identity-core. Add Queryable trait.
Not entirely happy with all changes, such as:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
I guess a more general name for DidUrlQuery
would be DidDocumentPropertyQuery
but that's unwieldy, so the current name seems perfectly fine to me.
Regarding the mutability: While annoying that it is possible, it's unlikely to happen, as someone would have to change the CoreDIDUrl
of a e.g. method in the OrderedSet
, iiuc. The account also doesn't expose that except through update_document_unchecked
, so it's well contained.
Description of change
House-keeping changes: moves the
OrderedSet
collection and associatedKeyComparable
trait fromidentity-did
toidentity-core
. This also makesOrderedSet
more generic by introducing theQueryable
trait for DID-specific lookups.Breaking change due to different import paths and the introduction of
Queryable
to handle thequery/query_mut
functions. Also renamesMethodQuery
to a more genericDIDUrlQuery
, since I intend to use it for a futureresolve_service
function.Changed
OrderedSet
fromidentity-did
toidentity-core
.KeyComparable
fromidentity-did
toidentity-core
.MethodQuery
toDIDUrlQuery
and move its sub-package from/method
to/utils
.KeyComparable::as_key()
toKeyComparable::key()
.Added
Queryable
trait.Links to any relevant issues
Fixes #633.
Type of change
How the change has been tested
Unit tests and examples pass locally.
Change checklist