.. rst-class:: mini-api
Note
Depending on how Minilang is built, :mini:`uuid` might need to be imported using :mini:`import: uuid("util/uuid")`.
- :mini:`meth address(UUID: uuid): address`
Returns an address view of :mini:`UUID`.
import: uuid("util/uuid") address(uuid()) :> <16:BC7EB4D26FD2463BBDA86997B903A101>
- :mini:`type uuid`
- A UUID.
- :mini:`meth uuid(Address: address): uuid | error`
- Returns a new UUID with the bytes of :mini:`Address`.
- :mini:`meth uuid(String: string): uuid | error`
Parses :mini:`String` as a UUID, returning an error if :mini:`String` does not have the correct format.
import: uuid("util/uuid") uuid("5fe1af82-02f9-429a-8787-4a7c16628a02") :> 5fe1af82-02f9-429a-8787-4a7c16628a02 uuid("test") :> error("UUIDError", "Invalid UUID string")
- :mini:`meth uuid(): uuid`
Returns a new random UUID.
import: uuid("util/uuid") uuid() :> 3245c03e-fe2b-4638-892a-d731b04c6196
- :mini:`meth (Arg₁: uuid) <> (Arg₂: uuid)`
- TBD
- :mini:`meth (Buffer: string::buffer):append(UUID: uuid)`
- Appends a representation of :mini:`UUID` to :mini:`Buffer`.