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