Skip to main content

systemprompt_identifiers/
user.rs

1crate::define_id!(UserId, schema);
2
3impl UserId {
4    pub fn anonymous() -> Self {
5        Self("anonymous".to_string())
6    }
7
8    pub fn system() -> Self {
9        Self("system".to_string())
10    }
11
12    pub fn is_system(&self) -> bool {
13        self.0 == "system"
14    }
15
16    pub fn is_anonymous(&self) -> bool {
17        self.0 == "anonymous"
18    }
19}