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

Added support for converting u64 pair into UUID and back #518

Merged
merged 2 commits into from Apr 19, 2021
Merged

Added support for converting u64 pair into UUID and back #518

merged 2 commits into from Apr 19, 2021

Conversation

saiintbrisson
Copy link
Contributor

@saiintbrisson saiintbrisson commented Apr 13, 2021

This PR resolves #517 by adding two methods:
Uuid::from_u64_pair(high_bits, low_bits) -> Uuid: Creates a UUID from two u64, the first being the MSBs, and the second, the LSBs.
Uuid::as_u64_pair(&self) -> (u64, u64): Returns a pair of u64, the first being the MSBs, and the second, the LSBs.

@kinggoesgaming
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 19, 2021

Build succeeded:

@bors bors bot merged commit 8cca1aa into uuid-rs:master Apr 19, 2021
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.

Create UUIDs from two u64
2 participants