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

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Resize {
4    #[prost(enumeration = "ResizeAction", tag = "1")]
5    pub resize_action: i32,
6    #[prost(enumeration = "ResizeDirection", optional, tag = "2")]
7    pub direction: ::core::option::Option<i32>,
8}
9#[allow(clippy::derive_partial_eq_without_eq)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct MoveDirection {
12    #[prost(enumeration = "ResizeDirection", tag = "1")]
13    pub direction: i32,
14}
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
16#[repr(i32)]
17pub enum ResizeAction {
18    Increase = 0,
19    Decrease = 1,
20}
21impl ResizeAction {
22    /// String value of the enum field names used in the ProtoBuf definition.
23    ///
24    /// The values are not transformed in any way and thus are considered stable
25    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
26    pub fn as_str_name(&self) -> &'static str {
27        match self {
28            ResizeAction::Increase => "Increase",
29            ResizeAction::Decrease => "Decrease",
30        }
31    }
32    /// Creates an enum from field names used in the ProtoBuf definition.
33    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
34        match value {
35            "Increase" => Some(Self::Increase),
36            "Decrease" => Some(Self::Decrease),
37            _ => None,
38        }
39    }
40}
41#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
42#[repr(i32)]
43pub enum ResizeDirection {
44    Left = 0,
45    Right = 1,
46    Up = 2,
47    Down = 3,
48}
49impl ResizeDirection {
50    /// String value of the enum field names used in the ProtoBuf definition.
51    ///
52    /// The values are not transformed in any way and thus are considered stable
53    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
54    pub fn as_str_name(&self) -> &'static str {
55        match self {
56            ResizeDirection::Left => "Left",
57            ResizeDirection::Right => "Right",
58            ResizeDirection::Up => "Up",
59            ResizeDirection::Down => "Down",
60        }
61    }
62    /// Creates an enum from field names used in the ProtoBuf definition.
63    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
64        match value {
65            "Left" => Some(Self::Left),
66            "Right" => Some(Self::Right),
67            "Up" => Some(Self::Up),
68            "Down" => Some(Self::Down),
69            _ => None,
70        }
71    }
72}