Skip to main content

Module ids

Module ids 

Source
Expand description

The identity rule, and the three identifiers the event envelope reaches.

Every identifier this system mints is a UUID version 7, minted by the store, and serialized as its lowercase hyphenated string. Parsing is strict in both directions a permissive UUID reader is loose in: a spelling other than the lowercase hyphenated one is refused rather than normalized, and a version field other than 7 is refused rather than carried, so an identifier this system did not mint cannot enter it by parse.

The rule is the identifier! macro, and it is exported: a domain that mints an identifier of its own declares it through the macro, in its own crate, and gets the same minting, display, parsing and schema every other identifier has. Declared here are only the three the envelope itself reaches — a print, an event, an image — because those are what every domain and every client must agree on. An identifier one domain keys its own records by is that domain’s to declare.

An identifier belonging to an external system — a provider’s own print id, a firmware’s tool number — is held in that system’s own representation and named for it, and is never one of these.

Structs§

EventId
PrintObserver’s own identifier for one event.
IdentifierError
Why a string is not one of this system’s identifiers.
ImageId
PrintObserver’s own identifier for one image.
PrintId
PrintObserver’s own identifier for one print.
Uuid
A Universally Unique Identifier (UUID).

Functions§

parse_identifier
Read the one spelling this system accepts, refusing every other.