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)]
12pub enum LogLevel {
13    #[serde(rename = "debug")]
14    Debug,
15    #[serde(rename = "info")]
16    Info,
17    #[serde(rename = "warning")]
18    Warning,
19    #[serde(rename = "error")]
20    Error,
21}
22
23impl std::fmt::Display for LogLevel {
24    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25        write!(
26            f,
27            "{}",
28            match self {
29                Self::Debug => "debug",
30                Self::Info => "info",
31                Self::Warning => "warning",
32                Self::Error => "error",
33            }
34        )
35    }
36}
37
38impl Default for LogLevel {
39    fn default() -> LogLevel {
40        Self::Debug
41    }
42}