Skip to main content

systemprompt_identifiers/
context.rs

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