Pudu programming language
Menu
API reference

Std.Uuid.version4

1 declaration

fn

version4: &Std.Random.Generator -> (Std.Random.Generator, Std.Uuid.Uuid)

This is a callable function.

What it does

A random identifier.

The generator is passed and answered rather than kept, so a program that

seeded it reproduces the same identifiers. That is what makes a test that

failed on one identifier able to fail on it again.

Std.Random is reproducible on purpose and seeded from a readable clock,

which makes these fit for a key in a database and unfit for anything a

person must not be able to guess. A session token wants a random source

this project has not yet reviewed.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

Back to Std.UuidSearch related declarations