Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data UUID
- toText :: UUID -> Text
- fromText :: Text -> Maybe UUID
- toByteString :: UUID -> ByteString
- fromByteString :: ByteString -> Maybe UUID
- toWords :: UUID -> (Word32, Word32, Word32, Word32)
- fromWords :: Word32 -> Word32 -> Word32 -> Word32 -> UUID
- null :: UUID -> Bool
- nil :: UUID
- generateNamed :: UUID -> [Word8] -> UUID
- namespaceDNS :: UUID
- namespaceURL :: UUID
- namespaceOID :: UUID
- namespaceX500 :: UUID
Documentation
The UUID type. A Random
instance is provided which produces
version 4 UUIDs as specified in RFC 4122. The Storable
and
Binary
instances are compatible with RFC 4122, storing the fields
in network order as 16 bytes.
Instances
Eq UUID | |
Data UUID | |
Defined in Data.UUID.Types.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UUID -> c UUID # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UUID # dataTypeOf :: UUID -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UUID) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UUID) # gmapT :: (forall b. Data b => b -> b) -> UUID -> UUID # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UUID -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UUID -> r # gmapQ :: (forall d. Data d => d -> u) -> UUID -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UUID -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UUID -> m UUID # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UUID -> m UUID # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UUID -> m UUID # | |
Ord UUID | |
Read UUID | |
Show UUID | |
Hashable UUID | |
Defined in Data.UUID.Types.Internal | |
ToJSON UUID | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey UUID | |
Defined in Data.Aeson.Types.ToJSON | |
FromJSON UUID | |
FromJSONKey UUID | |
Defined in Data.Aeson.Types.FromJSON | |
Storable UUID | |
Defined in Data.UUID.Types.Internal | |
Binary UUID | |
NFData UUID | |
Defined in Data.UUID.Types.Internal | |
Random UUID | |
toByteString :: UUID -> ByteString #
Encode a UUID into a ByteString
in network order.
fromByteString :: ByteString -> Maybe UUID #
Extract a UUID from a ByteString
in network byte order.
The argument must be 16 bytes long, otherwise Nothing
is returned.
Generate a UUID
within the specified namespace out of the given
object.
Uses a SHA1 hash. The UUID is built from first 128 bits of the hash of the namespace UUID and the name (as a series of Word8).
namespaceDNS :: UUID #
The namespace for DNS addresses
namespaceURL :: UUID #
The namespace for URLs
namespaceOID :: UUID #
The namespace for ISO OIDs
namespaceX500 :: UUID #
The namespace for X.500 DNs