Skip to main content

systemprompt_identifiers/
roles.rs

1//! Role identifier.
2//!
3//! Copyright (c) systemprompt.io — Business Source License 1.1.
4//! See <https://systemprompt.io> for licensing details.
5
6// Why: role ids arrive from untrusted input at the access-control endpoints,
7// which parse them with `try_new` and reject what does not validate. The
8// `non_empty` arm keeps the infallible `new` for the call sites that hold a
9// known-good literal, so this adds the fallible constructor without forcing a
10// migration.
11crate::define_id!(RoleId, non_empty);