nethsm_sdk_rs/models/
log_level.rs

1/*
2 * NetHSM
3 *
4 * All endpoints expect exactly the specified JSON. Additional properties will cause a Bad Request Error (400). All HTTP errors contain a JSON structure with an explanation of type string. All [base64](https://tools.ietf.org/html/rfc4648#section-4) encoded values are Big Endian.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: Nitrokey <info@nitrokey.com>
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
12#[non_exhaustive]
13pub enum LogLevel {
14    #[serde(rename = "debug")]
15    Debug,
16    #[serde(rename = "info")]
17    Info,
18    #[serde(rename = "warning")]
19    Warning,
20    #[serde(rename = "error")]
21    Error,
22}
23
24impl std::fmt::Display for LogLevel {
25    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26        write!(
27            f,
28            "{}",
29            match self {
30                Self::Debug => "debug",
31                Self::Info => "info",
32                Self::Warning => "warning",
33                Self::Error => "error",
34            }
35        )
36    }
37}
38
39impl Default for LogLevel {
40    fn default() -> LogLevel {
41        Self::Debug
42    }
43}