Skip to content
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

Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. #137

Merged
merged 2 commits into from Feb 8, 2018

Conversation

radix
Copy link
Contributor

@radix radix commented Feb 6, 2018

  • new_v1 now takes any implementor of UuidV1ClockSequence, instead of just UuidV1Context.
  • UuidV1Context implements UuidV1ClockSequence, but ignores the seconds and nanoseconds arguments.

This takes a more conservative approach. No changes to the way UuidV1Context generates sequences, but now other people can implement their own clock-sequence generators.

The nice thing is that I think this is entirely backwards compatible (which means that this didn't need to block 1.0).

This is meant to address #106. It does not implement all the suggestions that it had, but it allows users to, and also allows us to add more implementations with different clock-sequence strategies in a backwards-compatible way.

…r generating clock sequences.

* new_v1 now takes any implementor of UuidV1ClockSequence, instead of just UuidV1Context.
* UuidV1Context implements UuidV1ClockSequence, but ignores the `seconds` and `nanoseconds` arguments.
Copy link
Member

@kinggoesgaming kinggoesgaming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 from me

@kinggoesgaming kinggoesgaming changed the title Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. (wip for master branch freeze) Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. Feb 6, 2018
@Dylan-DPC-zz Dylan-DPC-zz changed the title (wip for master branch freeze) Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. Feb 7, 2018
@kinggoesgaming kinggoesgaming changed the title Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. WIP: Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. Feb 7, 2018
@Dylan-DPC-zz Dylan-DPC-zz changed the title WIP: Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. Add a new trait, UuidV1ClockSequence which defines the interface for generating clock sequences. Feb 8, 2018
@Dylan-DPC-zz
Copy link
Member

bors: r+

bors bot added a commit that referenced this pull request Feb 8, 2018
137: Add a new trait, `UuidV1ClockSequence` which defines the interface for generating clock sequences. r=Dylan-DPC a=radix

* new_v1 now takes any implementor of UuidV1ClockSequence, instead of just UuidV1Context.
* UuidV1Context implements UuidV1ClockSequence, but ignores the `seconds` and `nanoseconds` arguments.

This takes a more conservative approach. No changes to the way UuidV1Context generates sequences, but now other people can implement their own clock-sequence generators.

The nice thing is that *I think* this is entirely backwards compatible (which means that this didn't need to block 1.0).

This is meant to address #106. It does not implement all the suggestions that it had, but it allows users to, and also allows us to add more implementations with different clock-sequence strategies in a backwards-compatible way.
@bors bors bot merged commit 23879a2 into master Feb 8, 2018
@Dylan-DPC-zz Dylan-DPC-zz deleted the 106-generic-context branch February 8, 2018 19:29
@kinggoesgaming kinggoesgaming added this to the 0.6.0 milestone Feb 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants