frost_core_sdk/
generated.rs1use core::fmt;
3
4#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
5pub struct PropKey(pub &'static str);
6impl PropKey { pub const fn as_str(self) -> &'static str { self.0 } }
7impl fmt::Display for PropKey { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.0) } }
8
9#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
10pub struct Domain(pub &'static str);
11impl Domain { pub const fn as_str(self) -> &'static str { self.0 } }
12impl fmt::Display for Domain { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.0) } }
13
14#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
15pub struct ErrorCode(pub &'static str);
16impl ErrorCode { pub const fn as_str(self) -> &'static str { self.0 } }
17impl fmt::Display for ErrorCode { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.0) } }
18
19pub const PREFIX_FROST: &str = "frost.";
20pub const PREFIX_VENDOR: &str = "vendor.";
21
22pub mod keys {
23 pub mod ctx {
24 pub const IDEMPOTENCY_KEY: crate::generated::PropKey = crate::generated::PropKey("frost.idempotency.key");
25 pub const REQUEST_ID: crate::generated::PropKey = crate::generated::PropKey("frost.request.id");
26 }
27 pub mod props {
28 pub mod http {
29 pub const RESPONSE_STATUS: crate::generated::PropKey = crate::generated::PropKey("http.response.status");
30 }
31 }
32
33}
34
35pub mod error {
36 pub mod domains {
37 pub mod core {
38 pub const CONTEXT: crate::generated::Domain = crate::generated::Domain("frost.core.context");
39 pub const IO: crate::generated::Domain = crate::generated::Domain("frost.core.io");
40 }
41
42 }
43 pub mod codes {
44 pub mod core_context {
45 pub const CANCELLED: crate::generated::ErrorCode = crate::generated::ErrorCode("cancelled");
46 }
47 pub mod core_io {
48 pub const EOF: crate::generated::ErrorCode = crate::generated::ErrorCode("eof");
49 }
50
51 }
52}