zellij_utils/opt/rustwide/workdir/assets/prost/
api.pipe_message.rs

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct PipeMessage {
4    #[prost(enumeration = "PipeSource", tag = "1")]
5    pub source: i32,
6    #[prost(string, optional, tag = "2")]
7    pub cli_source_id: ::core::option::Option<::prost::alloc::string::String>,
8    #[prost(uint32, optional, tag = "3")]
9    pub plugin_source_id: ::core::option::Option<u32>,
10    #[prost(string, tag = "4")]
11    pub name: ::prost::alloc::string::String,
12    #[prost(string, optional, tag = "5")]
13    pub payload: ::core::option::Option<::prost::alloc::string::String>,
14    #[prost(message, repeated, tag = "6")]
15    pub args: ::prost::alloc::vec::Vec<Arg>,
16    #[prost(bool, tag = "7")]
17    pub is_private: bool,
18}
19#[allow(clippy::derive_partial_eq_without_eq)]
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct Arg {
22    #[prost(string, tag = "1")]
23    pub key: ::prost::alloc::string::String,
24    #[prost(string, tag = "2")]
25    pub value: ::prost::alloc::string::String,
26}
27#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
28#[repr(i32)]
29pub enum PipeSource {
30    Cli = 0,
31    Plugin = 1,
32    Keybind = 2,
33}
34impl PipeSource {
35    /// String value of the enum field names used in the ProtoBuf definition.
36    ///
37    /// The values are not transformed in any way and thus are considered stable
38    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
39    pub fn as_str_name(&self) -> &'static str {
40        match self {
41            PipeSource::Cli => "Cli",
42            PipeSource::Plugin => "Plugin",
43            PipeSource::Keybind => "Keybind",
44        }
45    }
46    /// Creates an enum from field names used in the ProtoBuf definition.
47    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
48        match value {
49            "Cli" => Some(Self::Cli),
50            "Plugin" => Some(Self::Plugin),
51            "Keybind" => Some(Self::Keybind),
52            _ => None,
53        }
54    }
55}