[][src]Type Definition trawler::UserId

type UserId = u32;

A unique lobste.rs user id.

Implementors should have a reliable mapping betwen user id and username in both directions. This type is used both in the context of a username (e.g., /u/) and in the context of who performed an action (e.g., POST /s/ as ). In the former case, is a username, and the database will have to do a lookup based on username. In the latter, the user id is associated with some session, and the backend does not need to do a lookup.

In the future, it is likely that this type will be split into two types: one for "session key" and one for "username", both of which will require lookups, but on different keys.