protos/workspace/docs/target/debug/build/protos-ced133450c5d2c46/out/
cdisk_spec.rs1#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_results)]
19#![allow(unused_mut)]
20
21const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(PartialEq,Clone,Default,Debug)]
29pub struct ComponentDisk {
30 pub file_path: ::std::string::String,
33 pub offset: u64,
35 pub read_write_capability: ::protobuf::EnumOrUnknown<ReadWriteCapability>,
37 pub special_fields: ::protobuf::SpecialFields,
40}
41
42impl<'a> ::std::default::Default for &'a ComponentDisk {
43 fn default() -> &'a ComponentDisk {
44 <ComponentDisk as ::protobuf::Message>::default_instance()
45 }
46}
47
48impl ComponentDisk {
49 pub fn new() -> ComponentDisk {
50 ::std::default::Default::default()
51 }
52
53 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
54 let mut fields = ::std::vec::Vec::with_capacity(3);
55 let mut oneofs = ::std::vec::Vec::with_capacity(0);
56 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
57 "file_path",
58 |m: &ComponentDisk| { &m.file_path },
59 |m: &mut ComponentDisk| { &mut m.file_path },
60 ));
61 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
62 "offset",
63 |m: &ComponentDisk| { &m.offset },
64 |m: &mut ComponentDisk| { &mut m.offset },
65 ));
66 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
67 "read_write_capability",
68 |m: &ComponentDisk| { &m.read_write_capability },
69 |m: &mut ComponentDisk| { &mut m.read_write_capability },
70 ));
71 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ComponentDisk>(
72 "ComponentDisk",
73 fields,
74 oneofs,
75 )
76 }
77}
78
79impl ::protobuf::Message for ComponentDisk {
80 const NAME: &'static str = "ComponentDisk";
81
82 fn is_initialized(&self) -> bool {
83 true
84 }
85
86 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
87 while let Some(tag) = is.read_raw_tag_or_eof()? {
88 match tag {
89 10 => {
90 self.file_path = is.read_string()?;
91 },
92 16 => {
93 self.offset = is.read_uint64()?;
94 },
95 24 => {
96 self.read_write_capability = is.read_enum_or_unknown()?;
97 },
98 tag => {
99 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
100 },
101 };
102 }
103 ::std::result::Result::Ok(())
104 }
105
106 #[allow(unused_variables)]
108 fn compute_size(&self) -> u64 {
109 let mut my_size = 0;
110 if !self.file_path.is_empty() {
111 my_size += ::protobuf::rt::string_size(1, &self.file_path);
112 }
113 if self.offset != 0 {
114 my_size += ::protobuf::rt::uint64_size(2, self.offset);
115 }
116 if self.read_write_capability != ::protobuf::EnumOrUnknown::new(ReadWriteCapability::READ_ONLY) {
117 my_size += ::protobuf::rt::int32_size(3, self.read_write_capability.value());
118 }
119 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
120 self.special_fields.cached_size().set(my_size as u32);
121 my_size
122 }
123
124 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
125 if !self.file_path.is_empty() {
126 os.write_string(1, &self.file_path)?;
127 }
128 if self.offset != 0 {
129 os.write_uint64(2, self.offset)?;
130 }
131 if self.read_write_capability != ::protobuf::EnumOrUnknown::new(ReadWriteCapability::READ_ONLY) {
132 os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.read_write_capability))?;
133 }
134 os.write_unknown_fields(self.special_fields.unknown_fields())?;
135 ::std::result::Result::Ok(())
136 }
137
138 fn special_fields(&self) -> &::protobuf::SpecialFields {
139 &self.special_fields
140 }
141
142 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
143 &mut self.special_fields
144 }
145
146 fn new() -> ComponentDisk {
147 ComponentDisk::new()
148 }
149
150 fn clear(&mut self) {
151 self.file_path.clear();
152 self.offset = 0;
153 self.read_write_capability = ::protobuf::EnumOrUnknown::new(ReadWriteCapability::READ_ONLY);
154 self.special_fields.clear();
155 }
156
157 fn default_instance() -> &'static ComponentDisk {
158 static instance: ComponentDisk = ComponentDisk {
159 file_path: ::std::string::String::new(),
160 offset: 0,
161 read_write_capability: ::protobuf::EnumOrUnknown::from_i32(0),
162 special_fields: ::protobuf::SpecialFields::new(),
163 };
164 &instance
165 }
166}
167
168impl ::protobuf::MessageFull for ComponentDisk {
169 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
170 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
171 descriptor.get(|| file_descriptor().message_by_package_relative_name("ComponentDisk").unwrap()).clone()
172 }
173}
174
175impl ::std::fmt::Display for ComponentDisk {
176 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
177 ::protobuf::text_format::fmt(self, f)
178 }
179}
180
181impl ::protobuf::reflect::ProtobufValue for ComponentDisk {
182 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
183}
184
185#[derive(PartialEq,Clone,Default,Debug)]
187pub struct CompositeDisk {
188 pub version: u64,
191 pub component_disks: ::std::vec::Vec<ComponentDisk>,
193 pub length: u64,
195 pub special_fields: ::protobuf::SpecialFields,
198}
199
200impl<'a> ::std::default::Default for &'a CompositeDisk {
201 fn default() -> &'a CompositeDisk {
202 <CompositeDisk as ::protobuf::Message>::default_instance()
203 }
204}
205
206impl CompositeDisk {
207 pub fn new() -> CompositeDisk {
208 ::std::default::Default::default()
209 }
210
211 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
212 let mut fields = ::std::vec::Vec::with_capacity(3);
213 let mut oneofs = ::std::vec::Vec::with_capacity(0);
214 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
215 "version",
216 |m: &CompositeDisk| { &m.version },
217 |m: &mut CompositeDisk| { &mut m.version },
218 ));
219 fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
220 "component_disks",
221 |m: &CompositeDisk| { &m.component_disks },
222 |m: &mut CompositeDisk| { &mut m.component_disks },
223 ));
224 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
225 "length",
226 |m: &CompositeDisk| { &m.length },
227 |m: &mut CompositeDisk| { &mut m.length },
228 ));
229 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CompositeDisk>(
230 "CompositeDisk",
231 fields,
232 oneofs,
233 )
234 }
235}
236
237impl ::protobuf::Message for CompositeDisk {
238 const NAME: &'static str = "CompositeDisk";
239
240 fn is_initialized(&self) -> bool {
241 true
242 }
243
244 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
245 while let Some(tag) = is.read_raw_tag_or_eof()? {
246 match tag {
247 8 => {
248 self.version = is.read_uint64()?;
249 },
250 18 => {
251 self.component_disks.push(is.read_message()?);
252 },
253 24 => {
254 self.length = is.read_uint64()?;
255 },
256 tag => {
257 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
258 },
259 };
260 }
261 ::std::result::Result::Ok(())
262 }
263
264 #[allow(unused_variables)]
266 fn compute_size(&self) -> u64 {
267 let mut my_size = 0;
268 if self.version != 0 {
269 my_size += ::protobuf::rt::uint64_size(1, self.version);
270 }
271 for value in &self.component_disks {
272 let len = value.compute_size();
273 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
274 };
275 if self.length != 0 {
276 my_size += ::protobuf::rt::uint64_size(3, self.length);
277 }
278 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
279 self.special_fields.cached_size().set(my_size as u32);
280 my_size
281 }
282
283 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
284 if self.version != 0 {
285 os.write_uint64(1, self.version)?;
286 }
287 for v in &self.component_disks {
288 ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
289 };
290 if self.length != 0 {
291 os.write_uint64(3, self.length)?;
292 }
293 os.write_unknown_fields(self.special_fields.unknown_fields())?;
294 ::std::result::Result::Ok(())
295 }
296
297 fn special_fields(&self) -> &::protobuf::SpecialFields {
298 &self.special_fields
299 }
300
301 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
302 &mut self.special_fields
303 }
304
305 fn new() -> CompositeDisk {
306 CompositeDisk::new()
307 }
308
309 fn clear(&mut self) {
310 self.version = 0;
311 self.component_disks.clear();
312 self.length = 0;
313 self.special_fields.clear();
314 }
315
316 fn default_instance() -> &'static CompositeDisk {
317 static instance: CompositeDisk = CompositeDisk {
318 version: 0,
319 component_disks: ::std::vec::Vec::new(),
320 length: 0,
321 special_fields: ::protobuf::SpecialFields::new(),
322 };
323 &instance
324 }
325}
326
327impl ::protobuf::MessageFull for CompositeDisk {
328 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
329 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
330 descriptor.get(|| file_descriptor().message_by_package_relative_name("CompositeDisk").unwrap()).clone()
331 }
332}
333
334impl ::std::fmt::Display for CompositeDisk {
335 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
336 ::protobuf::text_format::fmt(self, f)
337 }
338}
339
340impl ::protobuf::reflect::ProtobufValue for CompositeDisk {
341 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
342}
343
344#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
345pub enum ReadWriteCapability {
347 READ_ONLY = 0,
349 READ_WRITE = 1,
351}
352
353impl ::protobuf::Enum for ReadWriteCapability {
354 const NAME: &'static str = "ReadWriteCapability";
355
356 fn value(&self) -> i32 {
357 *self as i32
358 }
359
360 fn from_i32(value: i32) -> ::std::option::Option<ReadWriteCapability> {
361 match value {
362 0 => ::std::option::Option::Some(ReadWriteCapability::READ_ONLY),
363 1 => ::std::option::Option::Some(ReadWriteCapability::READ_WRITE),
364 _ => ::std::option::Option::None
365 }
366 }
367
368 fn from_str(str: &str) -> ::std::option::Option<ReadWriteCapability> {
369 match str {
370 "READ_ONLY" => ::std::option::Option::Some(ReadWriteCapability::READ_ONLY),
371 "READ_WRITE" => ::std::option::Option::Some(ReadWriteCapability::READ_WRITE),
372 _ => ::std::option::Option::None
373 }
374 }
375
376 const VALUES: &'static [ReadWriteCapability] = &[
377 ReadWriteCapability::READ_ONLY,
378 ReadWriteCapability::READ_WRITE,
379 ];
380}
381
382impl ::protobuf::EnumFull for ReadWriteCapability {
383 fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
384 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
385 descriptor.get(|| file_descriptor().enum_by_package_relative_name("ReadWriteCapability").unwrap()).clone()
386 }
387
388 fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
389 let index = *self as usize;
390 Self::enum_descriptor().value_by_index(index)
391 }
392}
393
394impl ::std::default::Default for ReadWriteCapability {
395 fn default() -> Self {
396 ReadWriteCapability::READ_ONLY
397 }
398}
399
400impl ReadWriteCapability {
401 fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
402 ::protobuf::reflect::GeneratedEnumDescriptorData::new::<ReadWriteCapability>("ReadWriteCapability")
403 }
404}
405
406static file_descriptor_proto_data: &'static [u8] = b"\
407 \n\x10cdisk_spec.proto\"\x8e\x01\n\rComponentDisk\x12\x1b\n\tfile_path\
408 \x18\x01\x20\x01(\tR\x08filePath\x12\x16\n\x06offset\x18\x02\x20\x01(\
409 \x04R\x06offset\x12H\n\x15read_write_capability\x18\x03\x20\x01(\x0e2\
410 \x14.ReadWriteCapabilityR\x13readWriteCapability\"z\n\rCompositeDisk\x12\
411 \x18\n\x07version\x18\x01\x20\x01(\x04R\x07version\x127\n\x0fcomponent_d\
412 isks\x18\x02\x20\x03(\x0b2\x0e.ComponentDiskR\x0ecomponentDisks\x12\x16\
413 \n\x06length\x18\x03\x20\x01(\x04R\x06length*4\n\x13ReadWriteCapability\
414 \x12\r\n\tREAD_ONLY\x10\0\x12\x0e\n\nREAD_WRITE\x10\x01b\x06proto3\
415";
416
417fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
419 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
420 file_descriptor_proto_lazy.get(|| {
421 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
422 })
423}
424
425pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
427 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
428 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
429 file_descriptor.get(|| {
430 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
431 let mut deps = ::std::vec::Vec::with_capacity(0);
432 let mut messages = ::std::vec::Vec::with_capacity(2);
433 messages.push(ComponentDisk::generated_message_descriptor_data());
434 messages.push(CompositeDisk::generated_message_descriptor_data());
435 let mut enums = ::std::vec::Vec::with_capacity(1);
436 enums.push(ReadWriteCapability::generated_enum_descriptor_data());
437 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
438 file_descriptor_proto(),
439 deps,
440 messages,
441 enums,
442 )
443 });
444 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
445 })
446}