Skip to main content

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

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