Lines Matching full:uuid
1 use crate::Uuid;
3 impl Uuid { implementation
4 /// Creates a UUID using a name from a namespace, based on the MD5
19 /// Generating a MD5 DNS UUID for `rust-lang.org`:
22 /// # use uuid::{Uuid, Version};
23 /// let uuid = Uuid::new_v3(&Uuid::NAMESPACE_DNS, b"rust-lang.org");
25 /// assert_eq!(Some(Version::Md5), uuid.get_version());
36 pub fn new_v3(namespace: &Uuid, name: &[u8]) -> Uuid { in new_v3() argument
54 static FIXTURE: &'static [(&'static Uuid, &'static str, &'static str)] = &[ variable
56 &Uuid::NAMESPACE_DNS,
61 &Uuid::NAMESPACE_DNS,
66 &Uuid::NAMESPACE_DNS,
71 &Uuid::NAMESPACE_DNS,
76 &Uuid::NAMESPACE_URL,
81 &Uuid::NAMESPACE_URL,
86 &Uuid::NAMESPACE_URL,
91 &Uuid::NAMESPACE_URL,
96 &Uuid::NAMESPACE_OID,
101 &Uuid::NAMESPACE_OID,
106 &Uuid::NAMESPACE_OID,
111 &Uuid::NAMESPACE_OID,
116 &Uuid::NAMESPACE_X500,
121 &Uuid::NAMESPACE_X500,
126 &Uuid::NAMESPACE_X500,
131 &Uuid::NAMESPACE_X500,
148 let uuid = Uuid::new_v3(*ns, name.as_bytes()); in test_new() localVariable
149 assert_eq!(uuid.get_version(), Some(Version::Md5)); in test_new()
150 assert_eq!(uuid.get_variant(), Variant::RFC4122); in test_new()
165 let uuid = Uuid::new_v3(*ns, name.as_bytes()); in test_hyphenated_string() localVariable
166 assert_eq!(uuid.hyphenated().to_string(), *expected); in test_hyphenated_string()