canic_core/ids/
metrics.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
13#[remain::sorted]
14pub enum AccessMetricKind {
15 Auth,
16 Custom,
17 Env,
18 Guard,
19 Rule,
20}
21
22impl AccessMetricKind {
23 #[must_use]
24 pub const fn as_str(self) -> &'static str {
25 match self {
26 Self::Auth => "auth",
27 Self::Custom => "custom",
28 Self::Env => "env",
29 Self::Guard => "guard",
30 Self::Rule => "rule",
31 }
32 }
33}
34
35#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40#[remain::sorted]
41pub enum SystemMetricKind {
42 CanisterCall,
43 CanisterStatus,
44 CreateCanister,
45 DeleteCanister,
46 DepositCycles,
47 HttpOutcall,
48 InstallCode,
49 RawRand,
50 ReinstallCode,
51 TimerScheduled,
52 UninstallCode,
53 UpdateSettings,
54 UpgradeCode,
55}