canic_core/ids/
metrics.rs1use serde::{Deserialize, Serialize};
8
9#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
19#[remain::sorted]
20pub enum AccessMetricKind {
21 Auth,
22 Custom,
23 Env,
24 Guard,
25 Rule,
26}
27
28impl AccessMetricKind {
29 #[must_use]
30 pub const fn as_str(self) -> &'static str {
31 match self {
32 Self::Auth => "auth",
33 Self::Custom => "custom",
34 Self::Env => "env",
35 Self::Guard => "guard",
36 Self::Rule => "rule",
37 }
38 }
39}
40
41#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
48#[remain::sorted]
49pub enum SystemMetricKind {
50 CanisterCall,
51 CanisterStatus,
52 CreateCanister,
53 DeleteCanister,
54 DepositCycles,
55 HttpOutcall,
56 InstallCode,
57 RawRand,
58 ReinstallCode,
59 TimerScheduled,
60 UninstallCode,
61 UpdateSettings,
62 UpgradeCode,
63}