vitess_grpc/generated/
logutil.rs1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Event {
5 #[prost(message, optional, tag = "1")]
6 pub time: ::core::option::Option<super::vttime::Time>,
7 #[prost(enumeration = "Level", tag = "2")]
8 pub level: i32,
9 #[prost(string, tag = "3")]
10 pub file: ::prost::alloc::string::String,
11 #[prost(int64, tag = "4")]
12 pub line: i64,
13 #[prost(string, tag = "5")]
14 pub value: ::prost::alloc::string::String,
15}
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
18#[repr(i32)]
19pub enum Level {
20 Info = 0,
23 Warning = 1,
24 Error = 2,
25 Console = 3,
28}
29impl Level {
30 pub fn as_str_name(&self) -> &'static str {
35 match self {
36 Level::Info => "INFO",
37 Level::Warning => "WARNING",
38 Level::Error => "ERROR",
39 Level::Console => "CONSOLE",
40 }
41 }
42 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
44 match value {
45 "INFO" => Some(Self::Info),
46 "WARNING" => Some(Self::Warning),
47 "ERROR" => Some(Self::Error),
48 "CONSOLE" => Some(Self::Console),
49 _ => None,
50 }
51 }
52}