Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
187: Move namespaces into uuid::ns r=kinggoesgaming a=kinggoesgaming **I'm submitting a ...** - [ ] bug fix - [ ] feature enhancement - [ ] deprecation or removal - [x] refactor # Description Moves `NAMESPACE_DNS`, `NAMESPACE_OID`, `NAMESPACE_URL` and `NAMESPACE_X500` into `uuid::ns` module. The namespaces are not exposed as part of the prelude, as people only may need one of the namespaces when they do need them. # Motivation Part of the refactor efforts # Tests Current tests are passing. # Related Issue(s) #124
- Loading branch information
Showing
2 changed files
with
37 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//! The well-known `Uuid` namespaces. | ||
|
||
use Uuid; | ||
|
||
/// A UUID of the namespace of fully-qualified domain names. | ||
pub const NAMESPACE_DNS: Uuid = Uuid { | ||
bytes: [ | ||
0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, | ||
0xc8, | ||
], | ||
}; | ||
|
||
/// A UUID of the namespace of ISO Object Identifiers. | ||
pub const NAMESPACE_OID: Uuid = Uuid { | ||
bytes: [ | ||
0x6b, 0xa7, 0xb8, 0x12, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, | ||
0xc8, | ||
], | ||
}; | ||
|
||
/// A UUID of the namespace of URLs. | ||
pub const NAMESPACE_URL: Uuid = Uuid { | ||
bytes: [ | ||
0x6b, 0xa7, 0xb8, 0x11, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, | ||
0xc8, | ||
], | ||
}; | ||
|
||
/// A UUID of the namespace of X.500 DNs (in DER or a text output format) | ||
pub const NAMESPACE_X500: Uuid = Uuid { | ||
bytes: [ | ||
0x6b, 0xa7, 0xb8, 0x14, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, | ||
0xc8, | ||
], | ||
}; |