Debian Codegraph @

lib/src/protos/local_working_copy.rs

raw
1 // This file is @generated by prost-build.
2 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3 pub struct MaterializedConflictData {
4 /// TODO: maybe we should store num_sides here as well
5 #[prost(uint32, tag = "1")]
6 pub conflict_marker_len: u32,
7 }
8 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
9 pub struct FileState {
10 #[prost(int64, tag = "1")]
11 pub mtime_millis_since_epoch: i64,
12 #[prost(uint64, tag = "2")]
13 pub size: u64,
14 #[prost(enumeration = "FileType", tag = "3")]
15 pub file_type: i32,
16 #[prost(message, optional, tag = "5")]
17 pub materialized_conflict_data: ::core::option::Option<MaterializedConflictData>,
18 }
19 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
20 pub struct FileStateEntry {
21 #[prost(string, tag = "1")]
22 pub path: ::prost::alloc::string::String,
23 #[prost(message, optional, tag = "2")]
24 pub state: ::core::option::Option<FileState>,
25 }
26 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
27 pub struct SparsePatterns {
28 #[prost(string, repeated, tag = "1")]
29 pub prefixes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
30 }
31 #[derive(Clone, PartialEq, ::prost::Message)]
32 pub struct TreeState {
33 #[deprecated]
34 #[prost(bytes = "vec", tag = "1")]
35 pub legacy_tree_id: ::prost::alloc::vec::Vec<u8>,
36 /// Alternating positive and negative terms if there's a conflict, otherwise a
37 /// single (positive) value
38 #[prost(bytes = "vec", repeated, tag = "5")]
39 pub tree_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
40 /// Labels for the terms of a conflict.
41 #[prost(string, repeated, tag = "7")]
42 pub conflict_labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
43 #[prost(message, repeated, tag = "2")]
44 pub file_states: ::prost::alloc::vec::Vec<FileStateEntry>,
45 #[prost(bool, tag = "6")]
46 pub is_file_states_sorted: bool,
47 #[prost(message, optional, tag = "3")]
48 pub sparse_patterns: ::core::option::Option<SparsePatterns>,
49 #[prost(message, optional, tag = "4")]
50 pub watchman_clock: ::core::option::Option<WatchmanClock>,
51 }
52 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
53 pub struct WatchmanClock {
54 #[prost(oneof = "watchman_clock::WatchmanClock", tags = "1, 2")]
55 pub watchman_clock: ::core::option::Option<watchman_clock::WatchmanClock>,
56 }
57 /// Nested message and enum types in `WatchmanClock`.
58 pub mod watchman_clock {
59 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
60 pub enum WatchmanClock {
61 #[prost(string, tag = "1")]
62 StringClock(::prost::alloc::string::String),
63 #[prost(int64, tag = "2")]
64 UnixTimestamp(i64),
65 }
66 }
67 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
68 pub struct Checkout {
69 /// The operation at which the working copy was updated.
70 #[prost(bytes = "vec", tag = "2")]
71 pub operation_id: ::prost::alloc::vec::Vec<u8>,
72 /// An identifier for this workspace. It is used for looking up the current
73 /// working-copy commit in the repo view. Currently a human-readable name.
74 /// TODO: Is it better to make this a UUID and a have map that to a name in
75 /// config? That way users can rename a workspace.
76 #[prost(string, tag = "3")]
77 pub workspace_name: ::prost::alloc::string::String,
78 }
79 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
80 #[repr(i32)]
81 pub enum FileType {
82 Normal = 0,
83 Symlink = 1,
84 Executable = 2,
85 #[deprecated]
86 Conflict = 3,
87 GitSubmodule = 4,
88 }
89 impl FileType {
90 /// String value of the enum field names used in the ProtoBuf definition.
91 ///
92 /// The values are not transformed in any way and thus are considered stable
93 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
94 pub fn as_str_name(&self) -> &'static str {
95 match self {
96 Self::Normal => "Normal",
97 Self::Symlink => "Symlink",
98 Self::Executable => "Executable",
99 #[allow(deprecated)]
100 Self::Conflict => "Conflict",
101 Self::GitSubmodule => "GitSubmodule",
102 }
103 }
104 /// Creates an enum from field names used in the ProtoBuf definition.
105 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
106 match value {
107 "Normal" => Some(Self::Normal),
108 "Symlink" => Some(Self::Symlink),
109 "Executable" => Some(Self::Executable),
110 "Conflict" => Some(#[allow(deprecated)] Self::Conflict),
111 "GitSubmodule" => Some(Self::GitSubmodule),
112 _ => None,
113 }
114 }
115 }