Portability | portable |
---|---|
Stability | experimental |
Maintainer | aslatter@gmail.com |
If the public interface in Data.UUID doesn't give you the flexibility you need, you should be able to find something here.
- newtype UUID = U (ForeignPtr CChar)
- toBytes :: UUID -> [Word8]
- fromBytes :: [Word8] -> UUID
- unsafeFromBytes :: [Word8] -> UUID
- toForeignPtr :: UUID -> ForeignPtr CChar
- fromForeignPtr :: ForeignPtr CChar -> UUID
Documentation
The UUID type. Represents 128-bits of identification.
U (ForeignPtr CChar) |
fromBytes :: [Word8] -> UUIDSource
Creates a UUID out of a list of bytes. Will throw an error if the list is not of length 16.
unsafeFromBytes :: [Word8] -> UUIDSource
Creates a UUID out of a list of bytes. Does not perform a length check on the passed in list. Behavior is undefined for lists not of length 16.
toForeignPtr :: UUID -> ForeignPtr CCharSource
Unsafe.
Given a UUID, returns a pointer to the 16 bytes of memory that make up the UUID.
fromForeignPtr :: ForeignPtr CChar -> UUIDSource
Unsafe.
The passed in pointer is treated as if it were a pointer to 16 bytes of memory, which is then returned as a UUID.