Module twilight_model::id::marker

source ·
Expand description

Markers for various resource types, such as channels or users.

Markers themselves perform no logical action, and are only used to ensure that IDs of incorrect types aren’t used. If IDs were only 64-bit integers then a role’s ID may be erroneously used in the place of where a user’s ID is required; by using markers it can be ensured that only an ID with a RoleMarker can be used where a role’s ID is required.

Structs§