gz_msgs/gz_msgs10/
pose_with_covariance.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(::gz_msgs_common::GzMessage)]
28#[derive(PartialEq,Clone,Default,Debug)]
30pub struct PoseWithCovariance {
31 pub pose: ::protobuf::MessageField<super::pose::Pose>,
34 pub covariance: ::protobuf::MessageField<super::float_v::Float_V>,
36 pub special_fields: ::protobuf::SpecialFields,
39}
40
41impl<'a> ::std::default::Default for &'a PoseWithCovariance {
42 fn default() -> &'a PoseWithCovariance {
43 <PoseWithCovariance as ::protobuf::Message>::default_instance()
44 }
45}
46
47impl PoseWithCovariance {
48 pub fn new() -> PoseWithCovariance {
49 ::std::default::Default::default()
50 }
51
52 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
53 let mut fields = ::std::vec::Vec::with_capacity(2);
54 let mut oneofs = ::std::vec::Vec::with_capacity(0);
55 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::pose::Pose>(
56 "pose",
57 |m: &PoseWithCovariance| { &m.pose },
58 |m: &mut PoseWithCovariance| { &mut m.pose },
59 ));
60 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::float_v::Float_V>(
61 "covariance",
62 |m: &PoseWithCovariance| { &m.covariance },
63 |m: &mut PoseWithCovariance| { &mut m.covariance },
64 ));
65 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PoseWithCovariance>(
66 "PoseWithCovariance",
67 fields,
68 oneofs,
69 )
70 }
71}
72
73impl ::protobuf::Message for PoseWithCovariance {
74 const NAME: &'static str = "PoseWithCovariance";
75
76 fn is_initialized(&self) -> bool {
77 true
78 }
79
80 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
81 while let Some(tag) = is.read_raw_tag_or_eof()? {
82 match tag {
83 10 => {
84 ::protobuf::rt::read_singular_message_into_field(is, &mut self.pose)?;
85 },
86 18 => {
87 ::protobuf::rt::read_singular_message_into_field(is, &mut self.covariance)?;
88 },
89 tag => {
90 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
91 },
92 };
93 }
94 ::std::result::Result::Ok(())
95 }
96
97 #[allow(unused_variables)]
99 fn compute_size(&self) -> u64 {
100 let mut my_size = 0;
101 if let Some(v) = self.pose.as_ref() {
102 let len = v.compute_size();
103 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
104 }
105 if let Some(v) = self.covariance.as_ref() {
106 let len = v.compute_size();
107 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
108 }
109 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
110 self.special_fields.cached_size().set(my_size as u32);
111 my_size
112 }
113
114 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
115 if let Some(v) = self.pose.as_ref() {
116 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
117 }
118 if let Some(v) = self.covariance.as_ref() {
119 ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
120 }
121 os.write_unknown_fields(self.special_fields.unknown_fields())?;
122 ::std::result::Result::Ok(())
123 }
124
125 fn special_fields(&self) -> &::protobuf::SpecialFields {
126 &self.special_fields
127 }
128
129 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
130 &mut self.special_fields
131 }
132
133 fn new() -> PoseWithCovariance {
134 PoseWithCovariance::new()
135 }
136
137 fn clear(&mut self) {
138 self.pose.clear();
139 self.covariance.clear();
140 self.special_fields.clear();
141 }
142
143 fn default_instance() -> &'static PoseWithCovariance {
144 static instance: PoseWithCovariance = PoseWithCovariance {
145 pose: ::protobuf::MessageField::none(),
146 covariance: ::protobuf::MessageField::none(),
147 special_fields: ::protobuf::SpecialFields::new(),
148 };
149 &instance
150 }
151}
152
153impl ::protobuf::MessageFull for PoseWithCovariance {
154 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
155 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
156 descriptor.get(|| file_descriptor().message_by_package_relative_name("PoseWithCovariance").unwrap()).clone()
157 }
158}
159
160impl ::std::fmt::Display for PoseWithCovariance {
161 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
162 ::protobuf::text_format::fmt(self, f)
163 }
164}
165
166impl ::protobuf::reflect::ProtobufValue for PoseWithCovariance {
167 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
168}
169
170static file_descriptor_proto_data: &'static [u8] = b"\
171 \n\"gz/msgs/pose_with_covariance.proto\x12\x07gz.msgs\x1a\x15gz/msgs/flo\
172 at_v.proto\x1a\x12gz/msgs/pose.proto\"i\n\x12PoseWithCovariance\x12!\n\
173 \x04pose\x18\x01\x20\x01(\x0b2\r.gz.msgs.PoseR\x04pose\x120\n\ncovarianc\
174 e\x18\x02\x20\x01(\x0b2\x10.gz.msgs.Float_VR\ncovarianceB'\n\x0bcom.gz.m\
175 sgsB\x18PoseWithCovarianceProtosb\x06proto3\
176";
177
178fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
180 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
181 file_descriptor_proto_lazy.get(|| {
182 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
183 })
184}
185
186pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
188 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
189 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
190 file_descriptor.get(|| {
191 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
192 let mut deps = ::std::vec::Vec::with_capacity(2);
193 deps.push(super::float_v::file_descriptor().clone());
194 deps.push(super::pose::file_descriptor().clone());
195 let mut messages = ::std::vec::Vec::with_capacity(1);
196 messages.push(PoseWithCovariance::generated_message_descriptor_data());
197 let mut enums = ::std::vec::Vec::with_capacity(0);
198 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
199 file_descriptor_proto(),
200 deps,
201 messages,
202 enums,
203 )
204 });
205 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
206 })
207}