Skip to main content

systemprompt_identifiers/
hook.rs

1//! Extension-hook identifier.
2//!
3//! Copyright (c) systemprompt.io — Business Source License 1.1.
4//! See <https://systemprompt.io> for licensing details.
5
6crate::define_id!(HookId, checked, |value| {
7    crate::macros::validate_non_empty("HookId", value)
8});
9
10impl HookId {
11    pub fn generate() -> Self {
12        Self(uuid::Uuid::new_v4().to_string())
13    }
14}