megacommerce_shared/models/
network.rs1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2pub enum Header {
3 Authorization,
4 XRequestId,
5 XIpAddress,
6 XForwardedFor,
7 Path,
8 UserAgent,
9 AcceptLanguage,
10 SessionId,
11 Token,
12 CreatedAt,
13 ExpiresAt,
14 LastActivityAt,
15 UserId,
16 DeviceId,
17 Roles,
18 IsOauth,
19 Props,
20}
21
22impl Header {
23 pub const fn as_str(&self) -> &'static str {
24 match self {
25 Self::Authorization => "authorization",
26 Self::XRequestId => "x-request-id",
27 Self::XIpAddress => "x-ip-address",
28 Self::XForwardedFor => "x-forwarded-for",
29 Self::Path => "path",
30 Self::UserAgent => "user-agent",
31 Self::AcceptLanguage => "accept-language",
32 Self::SessionId => "session-id",
33 Self::Token => "token",
34 Self::CreatedAt => "created-at",
35 Self::ExpiresAt => "expires-at",
36 Self::LastActivityAt => "last-activity-at",
37 Self::UserId => "user-id",
38 Self::DeviceId => "device-id",
39 Self::Roles => "roles",
40 Self::IsOauth => "is-oauth",
41 Self::Props => "props",
42 }
43 }
44}