gz_msgs/gz_msgs9/
dataframe.rs

1// This file is generated by rust-protobuf 3.7.2. Do not edit
2// .proto file is parsed by protoc 3.21.12
3// @generated
4
5// https://github.com/rust-lang/rust-clippy/issues/702
6#![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
21//! Generated file from `gz/msgs/dataframe.proto`
22
23/// Generated files are compatible only with the same version
24/// of protobuf runtime.
25const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(::gz_msgs_common::GzMessage)]
28// @@protoc_insertion_point(message:gz.msgs.Dataframe)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct Dataframe {
31    // message fields
32    // @@protoc_insertion_point(field:gz.msgs.Dataframe.header)
33    pub header: ::protobuf::MessageField<super::header::Header>,
34    // @@protoc_insertion_point(field:gz.msgs.Dataframe.src_address)
35    pub src_address: ::std::string::String,
36    // @@protoc_insertion_point(field:gz.msgs.Dataframe.dst_address)
37    pub dst_address: ::std::string::String,
38    // @@protoc_insertion_point(field:gz.msgs.Dataframe.data)
39    pub data: ::std::vec::Vec<u8>,
40    // special fields
41    // @@protoc_insertion_point(special_field:gz.msgs.Dataframe.special_fields)
42    pub special_fields: ::protobuf::SpecialFields,
43}
44
45impl<'a> ::std::default::Default for &'a Dataframe {
46    fn default() -> &'a Dataframe {
47        <Dataframe as ::protobuf::Message>::default_instance()
48    }
49}
50
51impl Dataframe {
52    pub fn new() -> Dataframe {
53        ::std::default::Default::default()
54    }
55
56    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
57        let mut fields = ::std::vec::Vec::with_capacity(4);
58        let mut oneofs = ::std::vec::Vec::with_capacity(0);
59        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
60            "header",
61            |m: &Dataframe| { &m.header },
62            |m: &mut Dataframe| { &mut m.header },
63        ));
64        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
65            "src_address",
66            |m: &Dataframe| { &m.src_address },
67            |m: &mut Dataframe| { &mut m.src_address },
68        ));
69        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
70            "dst_address",
71            |m: &Dataframe| { &m.dst_address },
72            |m: &mut Dataframe| { &mut m.dst_address },
73        ));
74        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
75            "data",
76            |m: &Dataframe| { &m.data },
77            |m: &mut Dataframe| { &mut m.data },
78        ));
79        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Dataframe>(
80            "Dataframe",
81            fields,
82            oneofs,
83        )
84    }
85}
86
87impl ::protobuf::Message for Dataframe {
88    const NAME: &'static str = "Dataframe";
89
90    fn is_initialized(&self) -> bool {
91        true
92    }
93
94    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
95        while let Some(tag) = is.read_raw_tag_or_eof()? {
96            match tag {
97                10 => {
98                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
99                },
100                18 => {
101                    self.src_address = is.read_string()?;
102                },
103                26 => {
104                    self.dst_address = is.read_string()?;
105                },
106                34 => {
107                    self.data = is.read_bytes()?;
108                },
109                tag => {
110                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
111                },
112            };
113        }
114        ::std::result::Result::Ok(())
115    }
116
117    // Compute sizes of nested messages
118    #[allow(unused_variables)]
119    fn compute_size(&self) -> u64 {
120        let mut my_size = 0;
121        if let Some(v) = self.header.as_ref() {
122            let len = v.compute_size();
123            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
124        }
125        if !self.src_address.is_empty() {
126            my_size += ::protobuf::rt::string_size(2, &self.src_address);
127        }
128        if !self.dst_address.is_empty() {
129            my_size += ::protobuf::rt::string_size(3, &self.dst_address);
130        }
131        if !self.data.is_empty() {
132            my_size += ::protobuf::rt::bytes_size(4, &self.data);
133        }
134        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
135        self.special_fields.cached_size().set(my_size as u32);
136        my_size
137    }
138
139    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
140        if let Some(v) = self.header.as_ref() {
141            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
142        }
143        if !self.src_address.is_empty() {
144            os.write_string(2, &self.src_address)?;
145        }
146        if !self.dst_address.is_empty() {
147            os.write_string(3, &self.dst_address)?;
148        }
149        if !self.data.is_empty() {
150            os.write_bytes(4, &self.data)?;
151        }
152        os.write_unknown_fields(self.special_fields.unknown_fields())?;
153        ::std::result::Result::Ok(())
154    }
155
156    fn special_fields(&self) -> &::protobuf::SpecialFields {
157        &self.special_fields
158    }
159
160    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
161        &mut self.special_fields
162    }
163
164    fn new() -> Dataframe {
165        Dataframe::new()
166    }
167
168    fn clear(&mut self) {
169        self.header.clear();
170        self.src_address.clear();
171        self.dst_address.clear();
172        self.data.clear();
173        self.special_fields.clear();
174    }
175
176    fn default_instance() -> &'static Dataframe {
177        static instance: Dataframe = Dataframe {
178            header: ::protobuf::MessageField::none(),
179            src_address: ::std::string::String::new(),
180            dst_address: ::std::string::String::new(),
181            data: ::std::vec::Vec::new(),
182            special_fields: ::protobuf::SpecialFields::new(),
183        };
184        &instance
185    }
186}
187
188impl ::protobuf::MessageFull for Dataframe {
189    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
190        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
191        descriptor.get(|| file_descriptor().message_by_package_relative_name("Dataframe").unwrap()).clone()
192    }
193}
194
195impl ::std::fmt::Display for Dataframe {
196    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
197        ::protobuf::text_format::fmt(self, f)
198    }
199}
200
201impl ::protobuf::reflect::ProtobufValue for Dataframe {
202    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
203}
204
205static file_descriptor_proto_data: &'static [u8] = b"\
206    \n\x17gz/msgs/dataframe.proto\x12\x07gz.msgs\x1a\x14gz/msgs/header.proto\
207    \"\x8a\x01\n\tDataframe\x12'\n\x06header\x18\x01\x20\x01(\x0b2\x0f.gz.ms\
208    gs.HeaderR\x06header\x12\x1f\n\x0bsrc_address\x18\x02\x20\x01(\tR\nsrcAd\
209    dress\x12\x1f\n\x0bdst_address\x18\x03\x20\x01(\tR\ndstAddress\x12\x12\n\
210    \x04data\x18\x04\x20\x01(\x0cR\x04dataB\x1e\n\x0bcom.gz.msgsB\x0fDatafra\
211    meProtosb\x06proto3\
212";
213
214/// `FileDescriptorProto` object which was a source for this generated file
215fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
216    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
217    file_descriptor_proto_lazy.get(|| {
218        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
219    })
220}
221
222/// `FileDescriptor` object which allows dynamic access to files
223pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
224    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
225    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
226    file_descriptor.get(|| {
227        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
228            let mut deps = ::std::vec::Vec::with_capacity(1);
229            deps.push(super::header::file_descriptor().clone());
230            let mut messages = ::std::vec::Vec::with_capacity(1);
231            messages.push(Dataframe::generated_message_descriptor_data());
232            let mut enums = ::std::vec::Vec::with_capacity(0);
233            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
234                file_descriptor_proto(),
235                deps,
236                messages,
237                enums,
238            )
239        });
240        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
241    })
242}