Skip to main content

zmk_protocol/proto/
zmk.meta.rs

1// @generated
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Response {
5    #[prost(oneof="response::ResponseType", tags="1, 2")]
6    pub response_type: ::core::option::Option<response::ResponseType>,
7}
8/// Nested message and enum types in `Response`.
9pub mod response {
10    #[allow(clippy::derive_partial_eq_without_eq)]
11#[derive(Clone, PartialEq, ::prost::Oneof)]
12    pub enum ResponseType {
13        #[prost(bool, tag="1")]
14        NoResponse(bool),
15        #[prost(enumeration="super::ErrorConditions", tag="2")]
16        SimpleError(i32),
17    }
18}
19#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
20#[repr(i32)]
21pub enum ErrorConditions {
22    Generic = 0,
23    UnlockRequired = 1,
24    RpcNotFound = 2,
25    MsgDecodeFailed = 3,
26    MsgEncodeFailed = 4,
27}
28impl ErrorConditions {
29    /// String value of the enum field names used in the ProtoBuf definition.
30    ///
31    /// The values are not transformed in any way and thus are considered stable
32    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
33    pub fn as_str_name(&self) -> &'static str {
34        match self {
35            ErrorConditions::Generic => "GENERIC",
36            ErrorConditions::UnlockRequired => "UNLOCK_REQUIRED",
37            ErrorConditions::RpcNotFound => "RPC_NOT_FOUND",
38            ErrorConditions::MsgDecodeFailed => "MSG_DECODE_FAILED",
39            ErrorConditions::MsgEncodeFailed => "MSG_ENCODE_FAILED",
40        }
41    }
42    /// Creates an enum from field names used in the ProtoBuf definition.
43    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
44        match value {
45            "GENERIC" => Some(Self::Generic),
46            "UNLOCK_REQUIRED" => Some(Self::UnlockRequired),
47            "RPC_NOT_FOUND" => Some(Self::RpcNotFound),
48            "MSG_DECODE_FAILED" => Some(Self::MsgDecodeFailed),
49            "MSG_ENCODE_FAILED" => Some(Self::MsgEncodeFailed),
50            _ => None,
51        }
52    }
53}
54// @@protoc_insertion_point(module)