1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[doc = " An integer offset to apply to each edge of a rectangle.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
8 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9 #[repr(C)]
10 pub struct Inset {
11 pub top: i32,
12
13 pub right: i32,
14
15 pub bottom: i32,
16
17 pub left: i32,
18 }
19
20 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Inset, ___E> for Inset
21 where
22 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
23 {
24 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Inset> = unsafe {
25 ::fidl_next::CopyOptimization::enable_if(
26 true
27
28 && <
29 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
30 >::COPY_OPTIMIZATION.is_enabled()
31
32 && <
33 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
34 >::COPY_OPTIMIZATION.is_enabled()
35
36 && <
37 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
38 >::COPY_OPTIMIZATION.is_enabled()
39
40 && <
41 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
42 >::COPY_OPTIMIZATION.is_enabled()
43
44 )
45 };
46
47 #[inline]
48 fn encode(
49 self,
50 encoder_: &mut ___E,
51 out_: &mut ::core::mem::MaybeUninit<crate::wire::Inset>,
52 _: (),
53 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
54 ::fidl_next::munge! {
55 let crate::wire::Inset {
56 top,
57 right,
58 bottom,
59 left,
60
61 } = out_;
62 }
63
64 ::fidl_next::Encode::encode(self.top, encoder_, top, ())?;
65
66 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(top.as_mut_ptr()) };
67
68 ::fidl_next::Encode::encode(self.right, encoder_, right, ())?;
69
70 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(right.as_mut_ptr()) };
71
72 ::fidl_next::Encode::encode(self.bottom, encoder_, bottom, ())?;
73
74 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bottom.as_mut_ptr()) };
75
76 ::fidl_next::Encode::encode(self.left, encoder_, left, ())?;
77
78 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(left.as_mut_ptr()) };
79
80 Ok(())
81 }
82 }
83
84 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Inset, ___E> for &'a Inset
85 where
86 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
87 {
88 #[inline]
89 fn encode(
90 self,
91 encoder_: &mut ___E,
92 out_: &mut ::core::mem::MaybeUninit<crate::wire::Inset>,
93 _: (),
94 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
95 ::fidl_next::munge! {
96 let crate::wire::Inset {
97 top,
98 right,
99 bottom,
100 left,
101
102 } = out_;
103 }
104
105 ::fidl_next::Encode::encode(&self.top, encoder_, top, ())?;
106
107 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(top.as_mut_ptr()) };
108
109 ::fidl_next::Encode::encode(&self.right, encoder_, right, ())?;
110
111 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(right.as_mut_ptr()) };
112
113 ::fidl_next::Encode::encode(&self.bottom, encoder_, bottom, ())?;
114
115 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bottom.as_mut_ptr()) };
116
117 ::fidl_next::Encode::encode(&self.left, encoder_, left, ())?;
118
119 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(left.as_mut_ptr()) };
120
121 Ok(())
122 }
123 }
124
125 unsafe impl<___E>
126 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Inset>, ___E>
127 for Inset
128 where
129 ___E: ::fidl_next::Encoder + ?Sized,
130 Inset: ::fidl_next::Encode<crate::wire::Inset, ___E>,
131 {
132 #[inline]
133 fn encode_option(
134 this: ::core::option::Option<Self>,
135 encoder: &mut ___E,
136 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Inset>>,
137 _: (),
138 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
139 if let Some(inner) = this {
140 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
141 ::fidl_next::wire::Box::encode_present(out);
142 } else {
143 ::fidl_next::wire::Box::encode_absent(out);
144 }
145
146 Ok(())
147 }
148 }
149
150 unsafe impl<'a, ___E>
151 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Inset>, ___E>
152 for &'a Inset
153 where
154 ___E: ::fidl_next::Encoder + ?Sized,
155 &'a Inset: ::fidl_next::Encode<crate::wire::Inset, ___E>,
156 {
157 #[inline]
158 fn encode_option(
159 this: ::core::option::Option<Self>,
160 encoder: &mut ___E,
161 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Inset>>,
162 _: (),
163 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
164 if let Some(inner) = this {
165 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
166 ::fidl_next::wire::Box::encode_present(out);
167 } else {
168 ::fidl_next::wire::Box::encode_absent(out);
169 }
170
171 Ok(())
172 }
173 }
174
175 impl ::fidl_next::FromWire<crate::wire::Inset> for Inset {
176 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Inset, Self> = unsafe {
177 ::fidl_next::CopyOptimization::enable_if(
178 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
179 .is_enabled()
180 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
181 .is_enabled()
182 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
183 .is_enabled()
184 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
185 .is_enabled(),
186 )
187 };
188
189 #[inline]
190 fn from_wire(wire: crate::wire::Inset) -> Self {
191 Self {
192 top: ::fidl_next::FromWire::from_wire(wire.top),
193
194 right: ::fidl_next::FromWire::from_wire(wire.right),
195
196 bottom: ::fidl_next::FromWire::from_wire(wire.bottom),
197
198 left: ::fidl_next::FromWire::from_wire(wire.left),
199 }
200 }
201 }
202
203 impl ::fidl_next::FromWireRef<crate::wire::Inset> for Inset {
204 #[inline]
205 fn from_wire_ref(wire: &crate::wire::Inset) -> Self {
206 Self {
207 top: ::fidl_next::FromWireRef::from_wire_ref(&wire.top),
208
209 right: ::fidl_next::FromWireRef::from_wire_ref(&wire.right),
210
211 bottom: ::fidl_next::FromWireRef::from_wire_ref(&wire.bottom),
212
213 left: ::fidl_next::FromWireRef::from_wire_ref(&wire.left),
214 }
215 }
216 }
217
218 #[doc = " A floating point offset to apply to each edge of a rectangle.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
219 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
220 #[repr(C)]
221 pub struct InsetF {
222 pub top: f32,
223
224 pub right: f32,
225
226 pub bottom: f32,
227
228 pub left: f32,
229 }
230
231 unsafe impl<___E> ::fidl_next::Encode<crate::wire::InsetF, ___E> for InsetF
232 where
233 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
234 {
235 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::InsetF> = unsafe {
236 ::fidl_next::CopyOptimization::enable_if(
237 true
238
239 && <
240 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
241 >::COPY_OPTIMIZATION.is_enabled()
242
243 && <
244 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
245 >::COPY_OPTIMIZATION.is_enabled()
246
247 && <
248 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
249 >::COPY_OPTIMIZATION.is_enabled()
250
251 && <
252 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
253 >::COPY_OPTIMIZATION.is_enabled()
254
255 )
256 };
257
258 #[inline]
259 fn encode(
260 self,
261 encoder_: &mut ___E,
262 out_: &mut ::core::mem::MaybeUninit<crate::wire::InsetF>,
263 _: (),
264 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
265 ::fidl_next::munge! {
266 let crate::wire::InsetF {
267 top,
268 right,
269 bottom,
270 left,
271
272 } = out_;
273 }
274
275 ::fidl_next::Encode::encode(self.top, encoder_, top, ())?;
276
277 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(top.as_mut_ptr()) };
278
279 ::fidl_next::Encode::encode(self.right, encoder_, right, ())?;
280
281 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(right.as_mut_ptr()) };
282
283 ::fidl_next::Encode::encode(self.bottom, encoder_, bottom, ())?;
284
285 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bottom.as_mut_ptr()) };
286
287 ::fidl_next::Encode::encode(self.left, encoder_, left, ())?;
288
289 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(left.as_mut_ptr()) };
290
291 Ok(())
292 }
293 }
294
295 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::InsetF, ___E> for &'a InsetF
296 where
297 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
298 {
299 #[inline]
300 fn encode(
301 self,
302 encoder_: &mut ___E,
303 out_: &mut ::core::mem::MaybeUninit<crate::wire::InsetF>,
304 _: (),
305 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
306 ::fidl_next::munge! {
307 let crate::wire::InsetF {
308 top,
309 right,
310 bottom,
311 left,
312
313 } = out_;
314 }
315
316 ::fidl_next::Encode::encode(&self.top, encoder_, top, ())?;
317
318 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(top.as_mut_ptr()) };
319
320 ::fidl_next::Encode::encode(&self.right, encoder_, right, ())?;
321
322 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(right.as_mut_ptr()) };
323
324 ::fidl_next::Encode::encode(&self.bottom, encoder_, bottom, ())?;
325
326 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bottom.as_mut_ptr()) };
327
328 ::fidl_next::Encode::encode(&self.left, encoder_, left, ())?;
329
330 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(left.as_mut_ptr()) };
331
332 Ok(())
333 }
334 }
335
336 unsafe impl<___E>
337 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::InsetF>, ___E>
338 for InsetF
339 where
340 ___E: ::fidl_next::Encoder + ?Sized,
341 InsetF: ::fidl_next::Encode<crate::wire::InsetF, ___E>,
342 {
343 #[inline]
344 fn encode_option(
345 this: ::core::option::Option<Self>,
346 encoder: &mut ___E,
347 out: &mut ::core::mem::MaybeUninit<
348 ::fidl_next::wire::Box<'static, crate::wire::InsetF>,
349 >,
350 _: (),
351 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
352 if let Some(inner) = this {
353 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
354 ::fidl_next::wire::Box::encode_present(out);
355 } else {
356 ::fidl_next::wire::Box::encode_absent(out);
357 }
358
359 Ok(())
360 }
361 }
362
363 unsafe impl<'a, ___E>
364 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::InsetF>, ___E>
365 for &'a InsetF
366 where
367 ___E: ::fidl_next::Encoder + ?Sized,
368 &'a InsetF: ::fidl_next::Encode<crate::wire::InsetF, ___E>,
369 {
370 #[inline]
371 fn encode_option(
372 this: ::core::option::Option<Self>,
373 encoder: &mut ___E,
374 out: &mut ::core::mem::MaybeUninit<
375 ::fidl_next::wire::Box<'static, crate::wire::InsetF>,
376 >,
377 _: (),
378 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
379 if let Some(inner) = this {
380 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
381 ::fidl_next::wire::Box::encode_present(out);
382 } else {
383 ::fidl_next::wire::Box::encode_absent(out);
384 }
385
386 Ok(())
387 }
388 }
389
390 impl ::fidl_next::FromWire<crate::wire::InsetF> for InsetF {
391 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::InsetF, Self> = unsafe {
392 ::fidl_next::CopyOptimization::enable_if(
393 true
394
395 && <
396 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
397 >::COPY_OPTIMIZATION.is_enabled()
398
399 && <
400 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
401 >::COPY_OPTIMIZATION.is_enabled()
402
403 && <
404 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
405 >::COPY_OPTIMIZATION.is_enabled()
406
407 && <
408 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
409 >::COPY_OPTIMIZATION.is_enabled()
410
411 )
412 };
413
414 #[inline]
415 fn from_wire(wire: crate::wire::InsetF) -> Self {
416 Self {
417 top: ::fidl_next::FromWire::from_wire(wire.top),
418
419 right: ::fidl_next::FromWire::from_wire(wire.right),
420
421 bottom: ::fidl_next::FromWire::from_wire(wire.bottom),
422
423 left: ::fidl_next::FromWire::from_wire(wire.left),
424 }
425 }
426 }
427
428 impl ::fidl_next::FromWireRef<crate::wire::InsetF> for InsetF {
429 #[inline]
430 fn from_wire_ref(wire: &crate::wire::InsetF) -> Self {
431 Self {
432 top: ::fidl_next::FromWireRef::from_wire_ref(&wire.top),
433
434 right: ::fidl_next::FromWireRef::from_wire_ref(&wire.right),
435
436 bottom: ::fidl_next::FromWireRef::from_wire_ref(&wire.bottom),
437
438 left: ::fidl_next::FromWireRef::from_wire_ref(&wire.left),
439 }
440 }
441 }
442
443 #[doc = " An integer position in a 2D cartesian space.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
444 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
445 #[repr(C)]
446 pub struct Point {
447 pub x: i32,
448
449 pub y: i32,
450 }
451
452 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Point, ___E> for Point
453 where
454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
455 {
456 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Point> = unsafe {
457 ::fidl_next::CopyOptimization::enable_if(
458 true
459
460 && <
461 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
462 >::COPY_OPTIMIZATION.is_enabled()
463
464 && <
465 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
466 >::COPY_OPTIMIZATION.is_enabled()
467
468 )
469 };
470
471 #[inline]
472 fn encode(
473 self,
474 encoder_: &mut ___E,
475 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
476 _: (),
477 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
478 ::fidl_next::munge! {
479 let crate::wire::Point {
480 x,
481 y,
482
483 } = out_;
484 }
485
486 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
487
488 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
489
490 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
491
492 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
493
494 Ok(())
495 }
496 }
497
498 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Point, ___E> for &'a Point
499 where
500 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
501 {
502 #[inline]
503 fn encode(
504 self,
505 encoder_: &mut ___E,
506 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
507 _: (),
508 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
509 ::fidl_next::munge! {
510 let crate::wire::Point {
511 x,
512 y,
513
514 } = out_;
515 }
516
517 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
518
519 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
520
521 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
522
523 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
524
525 Ok(())
526 }
527 }
528
529 unsafe impl<___E>
530 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Point>, ___E>
531 for Point
532 where
533 ___E: ::fidl_next::Encoder + ?Sized,
534 Point: ::fidl_next::Encode<crate::wire::Point, ___E>,
535 {
536 #[inline]
537 fn encode_option(
538 this: ::core::option::Option<Self>,
539 encoder: &mut ___E,
540 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Point>>,
541 _: (),
542 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
543 if let Some(inner) = this {
544 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
545 ::fidl_next::wire::Box::encode_present(out);
546 } else {
547 ::fidl_next::wire::Box::encode_absent(out);
548 }
549
550 Ok(())
551 }
552 }
553
554 unsafe impl<'a, ___E>
555 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Point>, ___E>
556 for &'a Point
557 where
558 ___E: ::fidl_next::Encoder + ?Sized,
559 &'a Point: ::fidl_next::Encode<crate::wire::Point, ___E>,
560 {
561 #[inline]
562 fn encode_option(
563 this: ::core::option::Option<Self>,
564 encoder: &mut ___E,
565 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Point>>,
566 _: (),
567 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
568 if let Some(inner) = this {
569 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
570 ::fidl_next::wire::Box::encode_present(out);
571 } else {
572 ::fidl_next::wire::Box::encode_absent(out);
573 }
574
575 Ok(())
576 }
577 }
578
579 impl ::fidl_next::FromWire<crate::wire::Point> for Point {
580 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Point, Self> = unsafe {
581 ::fidl_next::CopyOptimization::enable_if(
582 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
583 .is_enabled()
584 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
585 .is_enabled(),
586 )
587 };
588
589 #[inline]
590 fn from_wire(wire: crate::wire::Point) -> Self {
591 Self {
592 x: ::fidl_next::FromWire::from_wire(wire.x),
593
594 y: ::fidl_next::FromWire::from_wire(wire.y),
595 }
596 }
597 }
598
599 impl ::fidl_next::FromWireRef<crate::wire::Point> for Point {
600 #[inline]
601 fn from_wire_ref(wire: &crate::wire::Point) -> Self {
602 Self {
603 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
604
605 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
606 }
607 }
608 }
609
610 #[doc = " A floating point position in a 3D cartesian space.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
611 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
612 #[repr(C)]
613 pub struct Point3F {
614 pub x: f32,
615
616 pub y: f32,
617
618 pub z: f32,
619 }
620
621 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Point3F, ___E> for Point3F
622 where
623 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
624 {
625 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Point3F> = unsafe {
626 ::fidl_next::CopyOptimization::enable_if(
627 true
628
629 && <
630 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
631 >::COPY_OPTIMIZATION.is_enabled()
632
633 && <
634 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
635 >::COPY_OPTIMIZATION.is_enabled()
636
637 && <
638 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
639 >::COPY_OPTIMIZATION.is_enabled()
640
641 )
642 };
643
644 #[inline]
645 fn encode(
646 self,
647 encoder_: &mut ___E,
648 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point3F>,
649 _: (),
650 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
651 ::fidl_next::munge! {
652 let crate::wire::Point3F {
653 x,
654 y,
655 z,
656
657 } = out_;
658 }
659
660 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
661
662 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
663
664 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
665
666 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
667
668 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
669
670 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(z.as_mut_ptr()) };
671
672 Ok(())
673 }
674 }
675
676 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Point3F, ___E> for &'a Point3F
677 where
678 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
679 {
680 #[inline]
681 fn encode(
682 self,
683 encoder_: &mut ___E,
684 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point3F>,
685 _: (),
686 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
687 ::fidl_next::munge! {
688 let crate::wire::Point3F {
689 x,
690 y,
691 z,
692
693 } = out_;
694 }
695
696 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
697
698 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
699
700 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
701
702 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
703
704 ::fidl_next::Encode::encode(&self.z, encoder_, z, ())?;
705
706 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(z.as_mut_ptr()) };
707
708 Ok(())
709 }
710 }
711
712 unsafe impl<___E>
713 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Point3F>, ___E>
714 for Point3F
715 where
716 ___E: ::fidl_next::Encoder + ?Sized,
717 Point3F: ::fidl_next::Encode<crate::wire::Point3F, ___E>,
718 {
719 #[inline]
720 fn encode_option(
721 this: ::core::option::Option<Self>,
722 encoder: &mut ___E,
723 out: &mut ::core::mem::MaybeUninit<
724 ::fidl_next::wire::Box<'static, crate::wire::Point3F>,
725 >,
726 _: (),
727 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
728 if let Some(inner) = this {
729 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
730 ::fidl_next::wire::Box::encode_present(out);
731 } else {
732 ::fidl_next::wire::Box::encode_absent(out);
733 }
734
735 Ok(())
736 }
737 }
738
739 unsafe impl<'a, ___E>
740 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Point3F>, ___E>
741 for &'a Point3F
742 where
743 ___E: ::fidl_next::Encoder + ?Sized,
744 &'a Point3F: ::fidl_next::Encode<crate::wire::Point3F, ___E>,
745 {
746 #[inline]
747 fn encode_option(
748 this: ::core::option::Option<Self>,
749 encoder: &mut ___E,
750 out: &mut ::core::mem::MaybeUninit<
751 ::fidl_next::wire::Box<'static, crate::wire::Point3F>,
752 >,
753 _: (),
754 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
755 if let Some(inner) = this {
756 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
757 ::fidl_next::wire::Box::encode_present(out);
758 } else {
759 ::fidl_next::wire::Box::encode_absent(out);
760 }
761
762 Ok(())
763 }
764 }
765
766 impl ::fidl_next::FromWire<crate::wire::Point3F> for Point3F {
767 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Point3F, Self> = unsafe {
768 ::fidl_next::CopyOptimization::enable_if(
769 true
770
771 && <
772 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
773 >::COPY_OPTIMIZATION.is_enabled()
774
775 && <
776 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
777 >::COPY_OPTIMIZATION.is_enabled()
778
779 && <
780 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
781 >::COPY_OPTIMIZATION.is_enabled()
782
783 )
784 };
785
786 #[inline]
787 fn from_wire(wire: crate::wire::Point3F) -> Self {
788 Self {
789 x: ::fidl_next::FromWire::from_wire(wire.x),
790
791 y: ::fidl_next::FromWire::from_wire(wire.y),
792
793 z: ::fidl_next::FromWire::from_wire(wire.z),
794 }
795 }
796 }
797
798 impl ::fidl_next::FromWireRef<crate::wire::Point3F> for Point3F {
799 #[inline]
800 fn from_wire_ref(wire: &crate::wire::Point3F) -> Self {
801 Self {
802 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
803
804 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
805
806 z: ::fidl_next::FromWireRef::from_wire_ref(&wire.z),
807 }
808 }
809 }
810
811 #[doc = " A floating point position in a 2D cartesian space.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
812 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
813 #[repr(C)]
814 pub struct PointF {
815 pub x: f32,
816
817 pub y: f32,
818 }
819
820 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PointF, ___E> for PointF
821 where
822 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
823 {
824 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::PointF> = unsafe {
825 ::fidl_next::CopyOptimization::enable_if(
826 true
827
828 && <
829 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
830 >::COPY_OPTIMIZATION.is_enabled()
831
832 && <
833 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
834 >::COPY_OPTIMIZATION.is_enabled()
835
836 )
837 };
838
839 #[inline]
840 fn encode(
841 self,
842 encoder_: &mut ___E,
843 out_: &mut ::core::mem::MaybeUninit<crate::wire::PointF>,
844 _: (),
845 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
846 ::fidl_next::munge! {
847 let crate::wire::PointF {
848 x,
849 y,
850
851 } = out_;
852 }
853
854 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
855
856 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
857
858 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
859
860 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
861
862 Ok(())
863 }
864 }
865
866 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PointF, ___E> for &'a PointF
867 where
868 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
869 {
870 #[inline]
871 fn encode(
872 self,
873 encoder_: &mut ___E,
874 out_: &mut ::core::mem::MaybeUninit<crate::wire::PointF>,
875 _: (),
876 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
877 ::fidl_next::munge! {
878 let crate::wire::PointF {
879 x,
880 y,
881
882 } = out_;
883 }
884
885 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
886
887 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
888
889 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
890
891 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
892
893 Ok(())
894 }
895 }
896
897 unsafe impl<___E>
898 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::PointF>, ___E>
899 for PointF
900 where
901 ___E: ::fidl_next::Encoder + ?Sized,
902 PointF: ::fidl_next::Encode<crate::wire::PointF, ___E>,
903 {
904 #[inline]
905 fn encode_option(
906 this: ::core::option::Option<Self>,
907 encoder: &mut ___E,
908 out: &mut ::core::mem::MaybeUninit<
909 ::fidl_next::wire::Box<'static, crate::wire::PointF>,
910 >,
911 _: (),
912 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
913 if let Some(inner) = this {
914 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
915 ::fidl_next::wire::Box::encode_present(out);
916 } else {
917 ::fidl_next::wire::Box::encode_absent(out);
918 }
919
920 Ok(())
921 }
922 }
923
924 unsafe impl<'a, ___E>
925 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::PointF>, ___E>
926 for &'a PointF
927 where
928 ___E: ::fidl_next::Encoder + ?Sized,
929 &'a PointF: ::fidl_next::Encode<crate::wire::PointF, ___E>,
930 {
931 #[inline]
932 fn encode_option(
933 this: ::core::option::Option<Self>,
934 encoder: &mut ___E,
935 out: &mut ::core::mem::MaybeUninit<
936 ::fidl_next::wire::Box<'static, crate::wire::PointF>,
937 >,
938 _: (),
939 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
940 if let Some(inner) = this {
941 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
942 ::fidl_next::wire::Box::encode_present(out);
943 } else {
944 ::fidl_next::wire::Box::encode_absent(out);
945 }
946
947 Ok(())
948 }
949 }
950
951 impl ::fidl_next::FromWire<crate::wire::PointF> for PointF {
952 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::PointF, Self> = unsafe {
953 ::fidl_next::CopyOptimization::enable_if(
954 true
955
956 && <
957 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
958 >::COPY_OPTIMIZATION.is_enabled()
959
960 && <
961 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
962 >::COPY_OPTIMIZATION.is_enabled()
963
964 )
965 };
966
967 #[inline]
968 fn from_wire(wire: crate::wire::PointF) -> Self {
969 Self {
970 x: ::fidl_next::FromWire::from_wire(wire.x),
971
972 y: ::fidl_next::FromWire::from_wire(wire.y),
973 }
974 }
975 }
976
977 impl ::fidl_next::FromWireRef<crate::wire::PointF> for PointF {
978 #[inline]
979 fn from_wire_ref(wire: &crate::wire::PointF) -> Self {
980 Self {
981 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
982
983 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
984 }
985 }
986 }
987
988 #[doc = " Represents a 4D vector with floating point coordinates.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
989 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
990 #[repr(C)]
991 pub struct Vec4F {
992 pub x: f32,
993
994 pub y: f32,
995
996 pub z: f32,
997
998 pub w: f32,
999 }
1000
1001 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Vec4F, ___E> for Vec4F
1002 where
1003 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1004 {
1005 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Vec4F> = unsafe {
1006 ::fidl_next::CopyOptimization::enable_if(
1007 true
1008
1009 && <
1010 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1011 >::COPY_OPTIMIZATION.is_enabled()
1012
1013 && <
1014 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1015 >::COPY_OPTIMIZATION.is_enabled()
1016
1017 && <
1018 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1019 >::COPY_OPTIMIZATION.is_enabled()
1020
1021 && <
1022 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1023 >::COPY_OPTIMIZATION.is_enabled()
1024
1025 )
1026 };
1027
1028 #[inline]
1029 fn encode(
1030 self,
1031 encoder_: &mut ___E,
1032 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec4F>,
1033 _: (),
1034 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1035 ::fidl_next::munge! {
1036 let crate::wire::Vec4F {
1037 x,
1038 y,
1039 z,
1040 w,
1041
1042 } = out_;
1043 }
1044
1045 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
1046
1047 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
1048
1049 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
1050
1051 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
1052
1053 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
1054
1055 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(z.as_mut_ptr()) };
1056
1057 ::fidl_next::Encode::encode(self.w, encoder_, w, ())?;
1058
1059 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(w.as_mut_ptr()) };
1060
1061 Ok(())
1062 }
1063 }
1064
1065 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Vec4F, ___E> for &'a Vec4F
1066 where
1067 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1068 {
1069 #[inline]
1070 fn encode(
1071 self,
1072 encoder_: &mut ___E,
1073 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec4F>,
1074 _: (),
1075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1076 ::fidl_next::munge! {
1077 let crate::wire::Vec4F {
1078 x,
1079 y,
1080 z,
1081 w,
1082
1083 } = out_;
1084 }
1085
1086 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
1087
1088 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
1089
1090 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
1091
1092 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
1093
1094 ::fidl_next::Encode::encode(&self.z, encoder_, z, ())?;
1095
1096 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(z.as_mut_ptr()) };
1097
1098 ::fidl_next::Encode::encode(&self.w, encoder_, w, ())?;
1099
1100 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(w.as_mut_ptr()) };
1101
1102 Ok(())
1103 }
1104 }
1105
1106 unsafe impl<___E>
1107 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec4F>, ___E>
1108 for Vec4F
1109 where
1110 ___E: ::fidl_next::Encoder + ?Sized,
1111 Vec4F: ::fidl_next::Encode<crate::wire::Vec4F, ___E>,
1112 {
1113 #[inline]
1114 fn encode_option(
1115 this: ::core::option::Option<Self>,
1116 encoder: &mut ___E,
1117 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec4F>>,
1118 _: (),
1119 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1120 if let Some(inner) = this {
1121 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1122 ::fidl_next::wire::Box::encode_present(out);
1123 } else {
1124 ::fidl_next::wire::Box::encode_absent(out);
1125 }
1126
1127 Ok(())
1128 }
1129 }
1130
1131 unsafe impl<'a, ___E>
1132 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec4F>, ___E>
1133 for &'a Vec4F
1134 where
1135 ___E: ::fidl_next::Encoder + ?Sized,
1136 &'a Vec4F: ::fidl_next::Encode<crate::wire::Vec4F, ___E>,
1137 {
1138 #[inline]
1139 fn encode_option(
1140 this: ::core::option::Option<Self>,
1141 encoder: &mut ___E,
1142 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec4F>>,
1143 _: (),
1144 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1145 if let Some(inner) = this {
1146 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1147 ::fidl_next::wire::Box::encode_present(out);
1148 } else {
1149 ::fidl_next::wire::Box::encode_absent(out);
1150 }
1151
1152 Ok(())
1153 }
1154 }
1155
1156 impl ::fidl_next::FromWire<crate::wire::Vec4F> for Vec4F {
1157 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Vec4F, Self> = unsafe {
1158 ::fidl_next::CopyOptimization::enable_if(
1159 true
1160
1161 && <
1162 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1163 >::COPY_OPTIMIZATION.is_enabled()
1164
1165 && <
1166 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1167 >::COPY_OPTIMIZATION.is_enabled()
1168
1169 && <
1170 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1171 >::COPY_OPTIMIZATION.is_enabled()
1172
1173 && <
1174 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1175 >::COPY_OPTIMIZATION.is_enabled()
1176
1177 )
1178 };
1179
1180 #[inline]
1181 fn from_wire(wire: crate::wire::Vec4F) -> Self {
1182 Self {
1183 x: ::fidl_next::FromWire::from_wire(wire.x),
1184
1185 y: ::fidl_next::FromWire::from_wire(wire.y),
1186
1187 z: ::fidl_next::FromWire::from_wire(wire.z),
1188
1189 w: ::fidl_next::FromWire::from_wire(wire.w),
1190 }
1191 }
1192 }
1193
1194 impl ::fidl_next::FromWireRef<crate::wire::Vec4F> for Vec4F {
1195 #[inline]
1196 fn from_wire_ref(wire: &crate::wire::Vec4F) -> Self {
1197 Self {
1198 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
1199
1200 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
1201
1202 z: ::fidl_next::FromWireRef::from_wire_ref(&wire.z),
1203
1204 w: ::fidl_next::FromWireRef::from_wire_ref(&wire.w),
1205 }
1206 }
1207 }
1208
1209 pub type QuaternionF = crate::natural::Vec4F;
1210
1211 #[doc = " A floating point rounded rectangle with the custom radii for all four\n corners.\n\n A region in a 2D cartesian space consisting of linear, axis-aligned sides\n with corners rounded into a quarter ellipse.\n\n If the quarter ellipses in two corners would overlap, their radii are\n clamped such that the ellipses meet with an axis-aligned tangent.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
1212 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
1213 #[repr(C)]
1214 pub struct RRectF {
1215 pub x: f32,
1216
1217 pub y: f32,
1218
1219 pub width: f32,
1220
1221 pub height: f32,
1222
1223 pub top_left_radius_x: f32,
1224
1225 pub top_left_radius_y: f32,
1226
1227 pub top_right_radius_x: f32,
1228
1229 pub top_right_radius_y: f32,
1230
1231 pub bottom_left_radius_x: f32,
1232
1233 pub bottom_left_radius_y: f32,
1234
1235 pub bottom_right_radius_x: f32,
1236
1237 pub bottom_right_radius_y: f32,
1238 }
1239
1240 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RRectF, ___E> for RRectF
1241 where
1242 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1243 {
1244 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::RRectF> = unsafe {
1245 ::fidl_next::CopyOptimization::enable_if(
1246 true
1247
1248 && <
1249 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1250 >::COPY_OPTIMIZATION.is_enabled()
1251
1252 && <
1253 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1254 >::COPY_OPTIMIZATION.is_enabled()
1255
1256 && <
1257 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1258 >::COPY_OPTIMIZATION.is_enabled()
1259
1260 && <
1261 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1262 >::COPY_OPTIMIZATION.is_enabled()
1263
1264 && <
1265 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1266 >::COPY_OPTIMIZATION.is_enabled()
1267
1268 && <
1269 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1270 >::COPY_OPTIMIZATION.is_enabled()
1271
1272 && <
1273 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1274 >::COPY_OPTIMIZATION.is_enabled()
1275
1276 && <
1277 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1278 >::COPY_OPTIMIZATION.is_enabled()
1279
1280 && <
1281 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1282 >::COPY_OPTIMIZATION.is_enabled()
1283
1284 && <
1285 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1286 >::COPY_OPTIMIZATION.is_enabled()
1287
1288 && <
1289 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1290 >::COPY_OPTIMIZATION.is_enabled()
1291
1292 && <
1293 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
1294 >::COPY_OPTIMIZATION.is_enabled()
1295
1296 )
1297 };
1298
1299 #[inline]
1300 fn encode(
1301 self,
1302 encoder_: &mut ___E,
1303 out_: &mut ::core::mem::MaybeUninit<crate::wire::RRectF>,
1304 _: (),
1305 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1306 ::fidl_next::munge! {
1307 let crate::wire::RRectF {
1308 x,
1309 y,
1310 width,
1311 height,
1312 top_left_radius_x,
1313 top_left_radius_y,
1314 top_right_radius_x,
1315 top_right_radius_y,
1316 bottom_left_radius_x,
1317 bottom_left_radius_y,
1318 bottom_right_radius_x,
1319 bottom_right_radius_y,
1320
1321 } = out_;
1322 }
1323
1324 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
1325
1326 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
1327
1328 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
1329
1330 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
1331
1332 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
1333
1334 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
1335
1336 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
1337
1338 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
1339
1340 ::fidl_next::Encode::encode(self.top_left_radius_x, encoder_, top_left_radius_x, ())?;
1341
1342 let mut _field =
1343 unsafe { ::fidl_next::Slot::new_unchecked(top_left_radius_x.as_mut_ptr()) };
1344
1345 ::fidl_next::Encode::encode(self.top_left_radius_y, encoder_, top_left_radius_y, ())?;
1346
1347 let mut _field =
1348 unsafe { ::fidl_next::Slot::new_unchecked(top_left_radius_y.as_mut_ptr()) };
1349
1350 ::fidl_next::Encode::encode(self.top_right_radius_x, encoder_, top_right_radius_x, ())?;
1351
1352 let mut _field =
1353 unsafe { ::fidl_next::Slot::new_unchecked(top_right_radius_x.as_mut_ptr()) };
1354
1355 ::fidl_next::Encode::encode(self.top_right_radius_y, encoder_, top_right_radius_y, ())?;
1356
1357 let mut _field =
1358 unsafe { ::fidl_next::Slot::new_unchecked(top_right_radius_y.as_mut_ptr()) };
1359
1360 ::fidl_next::Encode::encode(
1361 self.bottom_left_radius_x,
1362 encoder_,
1363 bottom_left_radius_x,
1364 (),
1365 )?;
1366
1367 let mut _field =
1368 unsafe { ::fidl_next::Slot::new_unchecked(bottom_left_radius_x.as_mut_ptr()) };
1369
1370 ::fidl_next::Encode::encode(
1371 self.bottom_left_radius_y,
1372 encoder_,
1373 bottom_left_radius_y,
1374 (),
1375 )?;
1376
1377 let mut _field =
1378 unsafe { ::fidl_next::Slot::new_unchecked(bottom_left_radius_y.as_mut_ptr()) };
1379
1380 ::fidl_next::Encode::encode(
1381 self.bottom_right_radius_x,
1382 encoder_,
1383 bottom_right_radius_x,
1384 (),
1385 )?;
1386
1387 let mut _field =
1388 unsafe { ::fidl_next::Slot::new_unchecked(bottom_right_radius_x.as_mut_ptr()) };
1389
1390 ::fidl_next::Encode::encode(
1391 self.bottom_right_radius_y,
1392 encoder_,
1393 bottom_right_radius_y,
1394 (),
1395 )?;
1396
1397 let mut _field =
1398 unsafe { ::fidl_next::Slot::new_unchecked(bottom_right_radius_y.as_mut_ptr()) };
1399
1400 Ok(())
1401 }
1402 }
1403
1404 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RRectF, ___E> for &'a RRectF
1405 where
1406 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1407 {
1408 #[inline]
1409 fn encode(
1410 self,
1411 encoder_: &mut ___E,
1412 out_: &mut ::core::mem::MaybeUninit<crate::wire::RRectF>,
1413 _: (),
1414 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1415 ::fidl_next::munge! {
1416 let crate::wire::RRectF {
1417 x,
1418 y,
1419 width,
1420 height,
1421 top_left_radius_x,
1422 top_left_radius_y,
1423 top_right_radius_x,
1424 top_right_radius_y,
1425 bottom_left_radius_x,
1426 bottom_left_radius_y,
1427 bottom_right_radius_x,
1428 bottom_right_radius_y,
1429
1430 } = out_;
1431 }
1432
1433 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
1434
1435 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
1436
1437 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
1438
1439 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
1440
1441 ::fidl_next::Encode::encode(&self.width, encoder_, width, ())?;
1442
1443 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
1444
1445 ::fidl_next::Encode::encode(&self.height, encoder_, height, ())?;
1446
1447 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
1448
1449 ::fidl_next::Encode::encode(&self.top_left_radius_x, encoder_, top_left_radius_x, ())?;
1450
1451 let mut _field =
1452 unsafe { ::fidl_next::Slot::new_unchecked(top_left_radius_x.as_mut_ptr()) };
1453
1454 ::fidl_next::Encode::encode(&self.top_left_radius_y, encoder_, top_left_radius_y, ())?;
1455
1456 let mut _field =
1457 unsafe { ::fidl_next::Slot::new_unchecked(top_left_radius_y.as_mut_ptr()) };
1458
1459 ::fidl_next::Encode::encode(
1460 &self.top_right_radius_x,
1461 encoder_,
1462 top_right_radius_x,
1463 (),
1464 )?;
1465
1466 let mut _field =
1467 unsafe { ::fidl_next::Slot::new_unchecked(top_right_radius_x.as_mut_ptr()) };
1468
1469 ::fidl_next::Encode::encode(
1470 &self.top_right_radius_y,
1471 encoder_,
1472 top_right_radius_y,
1473 (),
1474 )?;
1475
1476 let mut _field =
1477 unsafe { ::fidl_next::Slot::new_unchecked(top_right_radius_y.as_mut_ptr()) };
1478
1479 ::fidl_next::Encode::encode(
1480 &self.bottom_left_radius_x,
1481 encoder_,
1482 bottom_left_radius_x,
1483 (),
1484 )?;
1485
1486 let mut _field =
1487 unsafe { ::fidl_next::Slot::new_unchecked(bottom_left_radius_x.as_mut_ptr()) };
1488
1489 ::fidl_next::Encode::encode(
1490 &self.bottom_left_radius_y,
1491 encoder_,
1492 bottom_left_radius_y,
1493 (),
1494 )?;
1495
1496 let mut _field =
1497 unsafe { ::fidl_next::Slot::new_unchecked(bottom_left_radius_y.as_mut_ptr()) };
1498
1499 ::fidl_next::Encode::encode(
1500 &self.bottom_right_radius_x,
1501 encoder_,
1502 bottom_right_radius_x,
1503 (),
1504 )?;
1505
1506 let mut _field =
1507 unsafe { ::fidl_next::Slot::new_unchecked(bottom_right_radius_x.as_mut_ptr()) };
1508
1509 ::fidl_next::Encode::encode(
1510 &self.bottom_right_radius_y,
1511 encoder_,
1512 bottom_right_radius_y,
1513 (),
1514 )?;
1515
1516 let mut _field =
1517 unsafe { ::fidl_next::Slot::new_unchecked(bottom_right_radius_y.as_mut_ptr()) };
1518
1519 Ok(())
1520 }
1521 }
1522
1523 unsafe impl<___E>
1524 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RRectF>, ___E>
1525 for RRectF
1526 where
1527 ___E: ::fidl_next::Encoder + ?Sized,
1528 RRectF: ::fidl_next::Encode<crate::wire::RRectF, ___E>,
1529 {
1530 #[inline]
1531 fn encode_option(
1532 this: ::core::option::Option<Self>,
1533 encoder: &mut ___E,
1534 out: &mut ::core::mem::MaybeUninit<
1535 ::fidl_next::wire::Box<'static, crate::wire::RRectF>,
1536 >,
1537 _: (),
1538 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1539 if let Some(inner) = this {
1540 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1541 ::fidl_next::wire::Box::encode_present(out);
1542 } else {
1543 ::fidl_next::wire::Box::encode_absent(out);
1544 }
1545
1546 Ok(())
1547 }
1548 }
1549
1550 unsafe impl<'a, ___E>
1551 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RRectF>, ___E>
1552 for &'a RRectF
1553 where
1554 ___E: ::fidl_next::Encoder + ?Sized,
1555 &'a RRectF: ::fidl_next::Encode<crate::wire::RRectF, ___E>,
1556 {
1557 #[inline]
1558 fn encode_option(
1559 this: ::core::option::Option<Self>,
1560 encoder: &mut ___E,
1561 out: &mut ::core::mem::MaybeUninit<
1562 ::fidl_next::wire::Box<'static, crate::wire::RRectF>,
1563 >,
1564 _: (),
1565 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1566 if let Some(inner) = this {
1567 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1568 ::fidl_next::wire::Box::encode_present(out);
1569 } else {
1570 ::fidl_next::wire::Box::encode_absent(out);
1571 }
1572
1573 Ok(())
1574 }
1575 }
1576
1577 impl ::fidl_next::FromWire<crate::wire::RRectF> for RRectF {
1578 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::RRectF, Self> = unsafe {
1579 ::fidl_next::CopyOptimization::enable_if(
1580 true
1581
1582 && <
1583 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1584 >::COPY_OPTIMIZATION.is_enabled()
1585
1586 && <
1587 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1588 >::COPY_OPTIMIZATION.is_enabled()
1589
1590 && <
1591 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1592 >::COPY_OPTIMIZATION.is_enabled()
1593
1594 && <
1595 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1596 >::COPY_OPTIMIZATION.is_enabled()
1597
1598 && <
1599 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1600 >::COPY_OPTIMIZATION.is_enabled()
1601
1602 && <
1603 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1604 >::COPY_OPTIMIZATION.is_enabled()
1605
1606 && <
1607 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1608 >::COPY_OPTIMIZATION.is_enabled()
1609
1610 && <
1611 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1612 >::COPY_OPTIMIZATION.is_enabled()
1613
1614 && <
1615 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1616 >::COPY_OPTIMIZATION.is_enabled()
1617
1618 && <
1619 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1620 >::COPY_OPTIMIZATION.is_enabled()
1621
1622 && <
1623 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1624 >::COPY_OPTIMIZATION.is_enabled()
1625
1626 && <
1627 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
1628 >::COPY_OPTIMIZATION.is_enabled()
1629
1630 )
1631 };
1632
1633 #[inline]
1634 fn from_wire(wire: crate::wire::RRectF) -> Self {
1635 Self {
1636 x: ::fidl_next::FromWire::from_wire(wire.x),
1637
1638 y: ::fidl_next::FromWire::from_wire(wire.y),
1639
1640 width: ::fidl_next::FromWire::from_wire(wire.width),
1641
1642 height: ::fidl_next::FromWire::from_wire(wire.height),
1643
1644 top_left_radius_x: ::fidl_next::FromWire::from_wire(wire.top_left_radius_x),
1645
1646 top_left_radius_y: ::fidl_next::FromWire::from_wire(wire.top_left_radius_y),
1647
1648 top_right_radius_x: ::fidl_next::FromWire::from_wire(wire.top_right_radius_x),
1649
1650 top_right_radius_y: ::fidl_next::FromWire::from_wire(wire.top_right_radius_y),
1651
1652 bottom_left_radius_x: ::fidl_next::FromWire::from_wire(wire.bottom_left_radius_x),
1653
1654 bottom_left_radius_y: ::fidl_next::FromWire::from_wire(wire.bottom_left_radius_y),
1655
1656 bottom_right_radius_x: ::fidl_next::FromWire::from_wire(wire.bottom_right_radius_x),
1657
1658 bottom_right_radius_y: ::fidl_next::FromWire::from_wire(wire.bottom_right_radius_y),
1659 }
1660 }
1661 }
1662
1663 impl ::fidl_next::FromWireRef<crate::wire::RRectF> for RRectF {
1664 #[inline]
1665 fn from_wire_ref(wire: &crate::wire::RRectF) -> Self {
1666 Self {
1667 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
1668
1669 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
1670
1671 width: ::fidl_next::FromWireRef::from_wire_ref(&wire.width),
1672
1673 height: ::fidl_next::FromWireRef::from_wire_ref(&wire.height),
1674
1675 top_left_radius_x: ::fidl_next::FromWireRef::from_wire_ref(&wire.top_left_radius_x),
1676
1677 top_left_radius_y: ::fidl_next::FromWireRef::from_wire_ref(&wire.top_left_radius_y),
1678
1679 top_right_radius_x: ::fidl_next::FromWireRef::from_wire_ref(
1680 &wire.top_right_radius_x,
1681 ),
1682
1683 top_right_radius_y: ::fidl_next::FromWireRef::from_wire_ref(
1684 &wire.top_right_radius_y,
1685 ),
1686
1687 bottom_left_radius_x: ::fidl_next::FromWireRef::from_wire_ref(
1688 &wire.bottom_left_radius_x,
1689 ),
1690
1691 bottom_left_radius_y: ::fidl_next::FromWireRef::from_wire_ref(
1692 &wire.bottom_left_radius_y,
1693 ),
1694
1695 bottom_right_radius_x: ::fidl_next::FromWireRef::from_wire_ref(
1696 &wire.bottom_right_radius_x,
1697 ),
1698
1699 bottom_right_radius_y: ::fidl_next::FromWireRef::from_wire_ref(
1700 &wire.bottom_right_radius_y,
1701 ),
1702 }
1703 }
1704 }
1705
1706 #[doc = " A ratio of unsigned 32-bit numbers.\n"]
1707 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1708 #[repr(C)]
1709 pub struct RatioU32 {
1710 pub numerator: u32,
1711
1712 pub denominator: u32,
1713 }
1714
1715 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RatioU32, ___E> for RatioU32
1716 where
1717 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1718 {
1719 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::RatioU32> = unsafe {
1720 ::fidl_next::CopyOptimization::enable_if(
1721 true
1722
1723 && <
1724 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
1725 >::COPY_OPTIMIZATION.is_enabled()
1726
1727 && <
1728 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
1729 >::COPY_OPTIMIZATION.is_enabled()
1730
1731 )
1732 };
1733
1734 #[inline]
1735 fn encode(
1736 self,
1737 encoder_: &mut ___E,
1738 out_: &mut ::core::mem::MaybeUninit<crate::wire::RatioU32>,
1739 _: (),
1740 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1741 ::fidl_next::munge! {
1742 let crate::wire::RatioU32 {
1743 numerator,
1744 denominator,
1745
1746 } = out_;
1747 }
1748
1749 ::fidl_next::Encode::encode(self.numerator, encoder_, numerator, ())?;
1750
1751 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(numerator.as_mut_ptr()) };
1752
1753 ::fidl_next::Encode::encode(self.denominator, encoder_, denominator, ())?;
1754
1755 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(denominator.as_mut_ptr()) };
1756
1757 Ok(())
1758 }
1759 }
1760
1761 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RatioU32, ___E> for &'a RatioU32
1762 where
1763 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1764 {
1765 #[inline]
1766 fn encode(
1767 self,
1768 encoder_: &mut ___E,
1769 out_: &mut ::core::mem::MaybeUninit<crate::wire::RatioU32>,
1770 _: (),
1771 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1772 ::fidl_next::munge! {
1773 let crate::wire::RatioU32 {
1774 numerator,
1775 denominator,
1776
1777 } = out_;
1778 }
1779
1780 ::fidl_next::Encode::encode(&self.numerator, encoder_, numerator, ())?;
1781
1782 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(numerator.as_mut_ptr()) };
1783
1784 ::fidl_next::Encode::encode(&self.denominator, encoder_, denominator, ())?;
1785
1786 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(denominator.as_mut_ptr()) };
1787
1788 Ok(())
1789 }
1790 }
1791
1792 unsafe impl<___E>
1793 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RatioU32>, ___E>
1794 for RatioU32
1795 where
1796 ___E: ::fidl_next::Encoder + ?Sized,
1797 RatioU32: ::fidl_next::Encode<crate::wire::RatioU32, ___E>,
1798 {
1799 #[inline]
1800 fn encode_option(
1801 this: ::core::option::Option<Self>,
1802 encoder: &mut ___E,
1803 out: &mut ::core::mem::MaybeUninit<
1804 ::fidl_next::wire::Box<'static, crate::wire::RatioU32>,
1805 >,
1806 _: (),
1807 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1808 if let Some(inner) = this {
1809 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1810 ::fidl_next::wire::Box::encode_present(out);
1811 } else {
1812 ::fidl_next::wire::Box::encode_absent(out);
1813 }
1814
1815 Ok(())
1816 }
1817 }
1818
1819 unsafe impl<'a, ___E>
1820 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RatioU32>, ___E>
1821 for &'a RatioU32
1822 where
1823 ___E: ::fidl_next::Encoder + ?Sized,
1824 &'a RatioU32: ::fidl_next::Encode<crate::wire::RatioU32, ___E>,
1825 {
1826 #[inline]
1827 fn encode_option(
1828 this: ::core::option::Option<Self>,
1829 encoder: &mut ___E,
1830 out: &mut ::core::mem::MaybeUninit<
1831 ::fidl_next::wire::Box<'static, crate::wire::RatioU32>,
1832 >,
1833 _: (),
1834 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1835 if let Some(inner) = this {
1836 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1837 ::fidl_next::wire::Box::encode_present(out);
1838 } else {
1839 ::fidl_next::wire::Box::encode_absent(out);
1840 }
1841
1842 Ok(())
1843 }
1844 }
1845
1846 impl ::fidl_next::FromWire<crate::wire::RatioU32> for RatioU32 {
1847 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::RatioU32, Self> = unsafe {
1848 ::fidl_next::CopyOptimization::enable_if(
1849 true
1850 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1851 .is_enabled()
1852 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1853 .is_enabled(),
1854 )
1855 };
1856
1857 #[inline]
1858 fn from_wire(wire: crate::wire::RatioU32) -> Self {
1859 Self {
1860 numerator: ::fidl_next::FromWire::from_wire(wire.numerator),
1861
1862 denominator: ::fidl_next::FromWire::from_wire(wire.denominator),
1863 }
1864 }
1865 }
1866
1867 impl ::fidl_next::FromWireRef<crate::wire::RatioU32> for RatioU32 {
1868 #[inline]
1869 fn from_wire_ref(wire: &crate::wire::RatioU32) -> Self {
1870 Self {
1871 numerator: ::fidl_next::FromWireRef::from_wire_ref(&wire.numerator),
1872
1873 denominator: ::fidl_next::FromWireRef::from_wire_ref(&wire.denominator),
1874 }
1875 }
1876 }
1877
1878 #[doc = " A ratio of unsigned 64-bit numbers.\n"]
1879 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1880 #[repr(C)]
1881 pub struct RatioU64 {
1882 pub numerator: u64,
1883
1884 pub denominator: u64,
1885 }
1886
1887 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RatioU64, ___E> for RatioU64
1888 where
1889 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1890 {
1891 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::RatioU64> = unsafe {
1892 ::fidl_next::CopyOptimization::enable_if(
1893 true
1894
1895 && <
1896 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
1897 >::COPY_OPTIMIZATION.is_enabled()
1898
1899 && <
1900 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
1901 >::COPY_OPTIMIZATION.is_enabled()
1902
1903 )
1904 };
1905
1906 #[inline]
1907 fn encode(
1908 self,
1909 encoder_: &mut ___E,
1910 out_: &mut ::core::mem::MaybeUninit<crate::wire::RatioU64>,
1911 _: (),
1912 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1913 ::fidl_next::munge! {
1914 let crate::wire::RatioU64 {
1915 numerator,
1916 denominator,
1917
1918 } = out_;
1919 }
1920
1921 ::fidl_next::Encode::encode(self.numerator, encoder_, numerator, ())?;
1922
1923 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(numerator.as_mut_ptr()) };
1924
1925 ::fidl_next::Encode::encode(self.denominator, encoder_, denominator, ())?;
1926
1927 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(denominator.as_mut_ptr()) };
1928
1929 Ok(())
1930 }
1931 }
1932
1933 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RatioU64, ___E> for &'a RatioU64
1934 where
1935 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1936 {
1937 #[inline]
1938 fn encode(
1939 self,
1940 encoder_: &mut ___E,
1941 out_: &mut ::core::mem::MaybeUninit<crate::wire::RatioU64>,
1942 _: (),
1943 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1944 ::fidl_next::munge! {
1945 let crate::wire::RatioU64 {
1946 numerator,
1947 denominator,
1948
1949 } = out_;
1950 }
1951
1952 ::fidl_next::Encode::encode(&self.numerator, encoder_, numerator, ())?;
1953
1954 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(numerator.as_mut_ptr()) };
1955
1956 ::fidl_next::Encode::encode(&self.denominator, encoder_, denominator, ())?;
1957
1958 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(denominator.as_mut_ptr()) };
1959
1960 Ok(())
1961 }
1962 }
1963
1964 unsafe impl<___E>
1965 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RatioU64>, ___E>
1966 for RatioU64
1967 where
1968 ___E: ::fidl_next::Encoder + ?Sized,
1969 RatioU64: ::fidl_next::Encode<crate::wire::RatioU64, ___E>,
1970 {
1971 #[inline]
1972 fn encode_option(
1973 this: ::core::option::Option<Self>,
1974 encoder: &mut ___E,
1975 out: &mut ::core::mem::MaybeUninit<
1976 ::fidl_next::wire::Box<'static, crate::wire::RatioU64>,
1977 >,
1978 _: (),
1979 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1980 if let Some(inner) = this {
1981 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1982 ::fidl_next::wire::Box::encode_present(out);
1983 } else {
1984 ::fidl_next::wire::Box::encode_absent(out);
1985 }
1986
1987 Ok(())
1988 }
1989 }
1990
1991 unsafe impl<'a, ___E>
1992 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RatioU64>, ___E>
1993 for &'a RatioU64
1994 where
1995 ___E: ::fidl_next::Encoder + ?Sized,
1996 &'a RatioU64: ::fidl_next::Encode<crate::wire::RatioU64, ___E>,
1997 {
1998 #[inline]
1999 fn encode_option(
2000 this: ::core::option::Option<Self>,
2001 encoder: &mut ___E,
2002 out: &mut ::core::mem::MaybeUninit<
2003 ::fidl_next::wire::Box<'static, crate::wire::RatioU64>,
2004 >,
2005 _: (),
2006 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2007 if let Some(inner) = this {
2008 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2009 ::fidl_next::wire::Box::encode_present(out);
2010 } else {
2011 ::fidl_next::wire::Box::encode_absent(out);
2012 }
2013
2014 Ok(())
2015 }
2016 }
2017
2018 impl ::fidl_next::FromWire<crate::wire::RatioU64> for RatioU64 {
2019 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::RatioU64, Self> = unsafe {
2020 ::fidl_next::CopyOptimization::enable_if(
2021 true
2022 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
2023 .is_enabled()
2024 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
2025 .is_enabled(),
2026 )
2027 };
2028
2029 #[inline]
2030 fn from_wire(wire: crate::wire::RatioU64) -> Self {
2031 Self {
2032 numerator: ::fidl_next::FromWire::from_wire(wire.numerator),
2033
2034 denominator: ::fidl_next::FromWire::from_wire(wire.denominator),
2035 }
2036 }
2037 }
2038
2039 impl ::fidl_next::FromWireRef<crate::wire::RatioU64> for RatioU64 {
2040 #[inline]
2041 fn from_wire_ref(wire: &crate::wire::RatioU64) -> Self {
2042 Self {
2043 numerator: ::fidl_next::FromWireRef::from_wire_ref(&wire.numerator),
2044
2045 denominator: ::fidl_next::FromWireRef::from_wire_ref(&wire.denominator),
2046 }
2047 }
2048 }
2049
2050 #[doc = " An integral, rectangular, axis-aligned region in a 2D cartesian\n space.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
2051 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2052 #[repr(C)]
2053 pub struct Rect {
2054 pub x: i32,
2055
2056 pub y: i32,
2057
2058 pub width: i32,
2059
2060 pub height: i32,
2061 }
2062
2063 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Rect, ___E> for Rect
2064 where
2065 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2066 {
2067 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Rect> = unsafe {
2068 ::fidl_next::CopyOptimization::enable_if(
2069 true
2070
2071 && <
2072 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
2073 >::COPY_OPTIMIZATION.is_enabled()
2074
2075 && <
2076 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
2077 >::COPY_OPTIMIZATION.is_enabled()
2078
2079 && <
2080 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
2081 >::COPY_OPTIMIZATION.is_enabled()
2082
2083 && <
2084 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
2085 >::COPY_OPTIMIZATION.is_enabled()
2086
2087 )
2088 };
2089
2090 #[inline]
2091 fn encode(
2092 self,
2093 encoder_: &mut ___E,
2094 out_: &mut ::core::mem::MaybeUninit<crate::wire::Rect>,
2095 _: (),
2096 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2097 ::fidl_next::munge! {
2098 let crate::wire::Rect {
2099 x,
2100 y,
2101 width,
2102 height,
2103
2104 } = out_;
2105 }
2106
2107 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
2108
2109 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
2110
2111 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
2112
2113 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
2114
2115 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
2116
2117 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2118
2119 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
2120
2121 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2122
2123 Ok(())
2124 }
2125 }
2126
2127 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Rect, ___E> for &'a Rect
2128 where
2129 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2130 {
2131 #[inline]
2132 fn encode(
2133 self,
2134 encoder_: &mut ___E,
2135 out_: &mut ::core::mem::MaybeUninit<crate::wire::Rect>,
2136 _: (),
2137 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2138 ::fidl_next::munge! {
2139 let crate::wire::Rect {
2140 x,
2141 y,
2142 width,
2143 height,
2144
2145 } = out_;
2146 }
2147
2148 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
2149
2150 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
2151
2152 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
2153
2154 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
2155
2156 ::fidl_next::Encode::encode(&self.width, encoder_, width, ())?;
2157
2158 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2159
2160 ::fidl_next::Encode::encode(&self.height, encoder_, height, ())?;
2161
2162 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2163
2164 Ok(())
2165 }
2166 }
2167
2168 unsafe impl<___E>
2169 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Rect>, ___E> for Rect
2170 where
2171 ___E: ::fidl_next::Encoder + ?Sized,
2172 Rect: ::fidl_next::Encode<crate::wire::Rect, ___E>,
2173 {
2174 #[inline]
2175 fn encode_option(
2176 this: ::core::option::Option<Self>,
2177 encoder: &mut ___E,
2178 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Rect>>,
2179 _: (),
2180 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2181 if let Some(inner) = this {
2182 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2183 ::fidl_next::wire::Box::encode_present(out);
2184 } else {
2185 ::fidl_next::wire::Box::encode_absent(out);
2186 }
2187
2188 Ok(())
2189 }
2190 }
2191
2192 unsafe impl<'a, ___E>
2193 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Rect>, ___E>
2194 for &'a Rect
2195 where
2196 ___E: ::fidl_next::Encoder + ?Sized,
2197 &'a Rect: ::fidl_next::Encode<crate::wire::Rect, ___E>,
2198 {
2199 #[inline]
2200 fn encode_option(
2201 this: ::core::option::Option<Self>,
2202 encoder: &mut ___E,
2203 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Rect>>,
2204 _: (),
2205 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2206 if let Some(inner) = this {
2207 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2208 ::fidl_next::wire::Box::encode_present(out);
2209 } else {
2210 ::fidl_next::wire::Box::encode_absent(out);
2211 }
2212
2213 Ok(())
2214 }
2215 }
2216
2217 impl ::fidl_next::FromWire<crate::wire::Rect> for Rect {
2218 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Rect, Self> = unsafe {
2219 ::fidl_next::CopyOptimization::enable_if(
2220 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
2221 .is_enabled()
2222 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
2223 .is_enabled()
2224 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
2225 .is_enabled()
2226 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
2227 .is_enabled(),
2228 )
2229 };
2230
2231 #[inline]
2232 fn from_wire(wire: crate::wire::Rect) -> Self {
2233 Self {
2234 x: ::fidl_next::FromWire::from_wire(wire.x),
2235
2236 y: ::fidl_next::FromWire::from_wire(wire.y),
2237
2238 width: ::fidl_next::FromWire::from_wire(wire.width),
2239
2240 height: ::fidl_next::FromWire::from_wire(wire.height),
2241 }
2242 }
2243 }
2244
2245 impl ::fidl_next::FromWireRef<crate::wire::Rect> for Rect {
2246 #[inline]
2247 fn from_wire_ref(wire: &crate::wire::Rect) -> Self {
2248 Self {
2249 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
2250
2251 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
2252
2253 width: ::fidl_next::FromWireRef::from_wire_ref(&wire.width),
2254
2255 height: ::fidl_next::FromWireRef::from_wire_ref(&wire.height),
2256 }
2257 }
2258 }
2259
2260 #[doc = " A floating point, rectangular, axis-aligned region in a 2D cartesian\n space.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
2261 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
2262 #[repr(C)]
2263 pub struct RectF {
2264 pub x: f32,
2265
2266 pub y: f32,
2267
2268 pub width: f32,
2269
2270 pub height: f32,
2271 }
2272
2273 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RectF, ___E> for RectF
2274 where
2275 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2276 {
2277 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::RectF> = unsafe {
2278 ::fidl_next::CopyOptimization::enable_if(
2279 true
2280
2281 && <
2282 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
2283 >::COPY_OPTIMIZATION.is_enabled()
2284
2285 && <
2286 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
2287 >::COPY_OPTIMIZATION.is_enabled()
2288
2289 && <
2290 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
2291 >::COPY_OPTIMIZATION.is_enabled()
2292
2293 && <
2294 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
2295 >::COPY_OPTIMIZATION.is_enabled()
2296
2297 )
2298 };
2299
2300 #[inline]
2301 fn encode(
2302 self,
2303 encoder_: &mut ___E,
2304 out_: &mut ::core::mem::MaybeUninit<crate::wire::RectF>,
2305 _: (),
2306 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2307 ::fidl_next::munge! {
2308 let crate::wire::RectF {
2309 x,
2310 y,
2311 width,
2312 height,
2313
2314 } = out_;
2315 }
2316
2317 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
2318
2319 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
2320
2321 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
2322
2323 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
2324
2325 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
2326
2327 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2328
2329 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
2330
2331 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2332
2333 Ok(())
2334 }
2335 }
2336
2337 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RectF, ___E> for &'a RectF
2338 where
2339 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2340 {
2341 #[inline]
2342 fn encode(
2343 self,
2344 encoder_: &mut ___E,
2345 out_: &mut ::core::mem::MaybeUninit<crate::wire::RectF>,
2346 _: (),
2347 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2348 ::fidl_next::munge! {
2349 let crate::wire::RectF {
2350 x,
2351 y,
2352 width,
2353 height,
2354
2355 } = out_;
2356 }
2357
2358 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
2359
2360 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
2361
2362 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
2363
2364 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
2365
2366 ::fidl_next::Encode::encode(&self.width, encoder_, width, ())?;
2367
2368 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2369
2370 ::fidl_next::Encode::encode(&self.height, encoder_, height, ())?;
2371
2372 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2373
2374 Ok(())
2375 }
2376 }
2377
2378 unsafe impl<___E>
2379 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RectF>, ___E>
2380 for RectF
2381 where
2382 ___E: ::fidl_next::Encoder + ?Sized,
2383 RectF: ::fidl_next::Encode<crate::wire::RectF, ___E>,
2384 {
2385 #[inline]
2386 fn encode_option(
2387 this: ::core::option::Option<Self>,
2388 encoder: &mut ___E,
2389 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::RectF>>,
2390 _: (),
2391 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2392 if let Some(inner) = this {
2393 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2394 ::fidl_next::wire::Box::encode_present(out);
2395 } else {
2396 ::fidl_next::wire::Box::encode_absent(out);
2397 }
2398
2399 Ok(())
2400 }
2401 }
2402
2403 unsafe impl<'a, ___E>
2404 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RectF>, ___E>
2405 for &'a RectF
2406 where
2407 ___E: ::fidl_next::Encoder + ?Sized,
2408 &'a RectF: ::fidl_next::Encode<crate::wire::RectF, ___E>,
2409 {
2410 #[inline]
2411 fn encode_option(
2412 this: ::core::option::Option<Self>,
2413 encoder: &mut ___E,
2414 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::RectF>>,
2415 _: (),
2416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2417 if let Some(inner) = this {
2418 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2419 ::fidl_next::wire::Box::encode_present(out);
2420 } else {
2421 ::fidl_next::wire::Box::encode_absent(out);
2422 }
2423
2424 Ok(())
2425 }
2426 }
2427
2428 impl ::fidl_next::FromWire<crate::wire::RectF> for RectF {
2429 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::RectF, Self> = unsafe {
2430 ::fidl_next::CopyOptimization::enable_if(
2431 true
2432
2433 && <
2434 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
2435 >::COPY_OPTIMIZATION.is_enabled()
2436
2437 && <
2438 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
2439 >::COPY_OPTIMIZATION.is_enabled()
2440
2441 && <
2442 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
2443 >::COPY_OPTIMIZATION.is_enabled()
2444
2445 && <
2446 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
2447 >::COPY_OPTIMIZATION.is_enabled()
2448
2449 )
2450 };
2451
2452 #[inline]
2453 fn from_wire(wire: crate::wire::RectF) -> Self {
2454 Self {
2455 x: ::fidl_next::FromWire::from_wire(wire.x),
2456
2457 y: ::fidl_next::FromWire::from_wire(wire.y),
2458
2459 width: ::fidl_next::FromWire::from_wire(wire.width),
2460
2461 height: ::fidl_next::FromWire::from_wire(wire.height),
2462 }
2463 }
2464 }
2465
2466 impl ::fidl_next::FromWireRef<crate::wire::RectF> for RectF {
2467 #[inline]
2468 fn from_wire_ref(wire: &crate::wire::RectF) -> Self {
2469 Self {
2470 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
2471
2472 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
2473
2474 width: ::fidl_next::FromWireRef::from_wire_ref(&wire.width),
2475
2476 height: ::fidl_next::FromWireRef::from_wire_ref(&wire.height),
2477 }
2478 }
2479 }
2480
2481 #[doc = " An integral, rectangular, axis-aligned region in a 2D cartesian\n space, with unsigned location and distance fields.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
2482 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2483 #[repr(C)]
2484 pub struct RectU {
2485 pub x: u32,
2486
2487 pub y: u32,
2488
2489 pub width: u32,
2490
2491 pub height: u32,
2492 }
2493
2494 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RectU, ___E> for RectU
2495 where
2496 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2497 {
2498 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::RectU> = unsafe {
2499 ::fidl_next::CopyOptimization::enable_if(
2500 true
2501
2502 && <
2503 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
2504 >::COPY_OPTIMIZATION.is_enabled()
2505
2506 && <
2507 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
2508 >::COPY_OPTIMIZATION.is_enabled()
2509
2510 && <
2511 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
2512 >::COPY_OPTIMIZATION.is_enabled()
2513
2514 && <
2515 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
2516 >::COPY_OPTIMIZATION.is_enabled()
2517
2518 )
2519 };
2520
2521 #[inline]
2522 fn encode(
2523 self,
2524 encoder_: &mut ___E,
2525 out_: &mut ::core::mem::MaybeUninit<crate::wire::RectU>,
2526 _: (),
2527 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2528 ::fidl_next::munge! {
2529 let crate::wire::RectU {
2530 x,
2531 y,
2532 width,
2533 height,
2534
2535 } = out_;
2536 }
2537
2538 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
2539
2540 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
2541
2542 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
2543
2544 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
2545
2546 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
2547
2548 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2549
2550 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
2551
2552 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2553
2554 Ok(())
2555 }
2556 }
2557
2558 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RectU, ___E> for &'a RectU
2559 where
2560 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2561 {
2562 #[inline]
2563 fn encode(
2564 self,
2565 encoder_: &mut ___E,
2566 out_: &mut ::core::mem::MaybeUninit<crate::wire::RectU>,
2567 _: (),
2568 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2569 ::fidl_next::munge! {
2570 let crate::wire::RectU {
2571 x,
2572 y,
2573 width,
2574 height,
2575
2576 } = out_;
2577 }
2578
2579 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
2580
2581 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
2582
2583 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
2584
2585 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
2586
2587 ::fidl_next::Encode::encode(&self.width, encoder_, width, ())?;
2588
2589 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2590
2591 ::fidl_next::Encode::encode(&self.height, encoder_, height, ())?;
2592
2593 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2594
2595 Ok(())
2596 }
2597 }
2598
2599 unsafe impl<___E>
2600 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RectU>, ___E>
2601 for RectU
2602 where
2603 ___E: ::fidl_next::Encoder + ?Sized,
2604 RectU: ::fidl_next::Encode<crate::wire::RectU, ___E>,
2605 {
2606 #[inline]
2607 fn encode_option(
2608 this: ::core::option::Option<Self>,
2609 encoder: &mut ___E,
2610 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::RectU>>,
2611 _: (),
2612 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2613 if let Some(inner) = this {
2614 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2615 ::fidl_next::wire::Box::encode_present(out);
2616 } else {
2617 ::fidl_next::wire::Box::encode_absent(out);
2618 }
2619
2620 Ok(())
2621 }
2622 }
2623
2624 unsafe impl<'a, ___E>
2625 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::RectU>, ___E>
2626 for &'a RectU
2627 where
2628 ___E: ::fidl_next::Encoder + ?Sized,
2629 &'a RectU: ::fidl_next::Encode<crate::wire::RectU, ___E>,
2630 {
2631 #[inline]
2632 fn encode_option(
2633 this: ::core::option::Option<Self>,
2634 encoder: &mut ___E,
2635 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::RectU>>,
2636 _: (),
2637 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2638 if let Some(inner) = this {
2639 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2640 ::fidl_next::wire::Box::encode_present(out);
2641 } else {
2642 ::fidl_next::wire::Box::encode_absent(out);
2643 }
2644
2645 Ok(())
2646 }
2647 }
2648
2649 impl ::fidl_next::FromWire<crate::wire::RectU> for RectU {
2650 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::RectU, Self> = unsafe {
2651 ::fidl_next::CopyOptimization::enable_if(
2652 true
2653 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
2654 .is_enabled()
2655 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
2656 .is_enabled()
2657 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
2658 .is_enabled()
2659 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
2660 .is_enabled(),
2661 )
2662 };
2663
2664 #[inline]
2665 fn from_wire(wire: crate::wire::RectU) -> Self {
2666 Self {
2667 x: ::fidl_next::FromWire::from_wire(wire.x),
2668
2669 y: ::fidl_next::FromWire::from_wire(wire.y),
2670
2671 width: ::fidl_next::FromWire::from_wire(wire.width),
2672
2673 height: ::fidl_next::FromWire::from_wire(wire.height),
2674 }
2675 }
2676 }
2677
2678 impl ::fidl_next::FromWireRef<crate::wire::RectU> for RectU {
2679 #[inline]
2680 fn from_wire_ref(wire: &crate::wire::RectU) -> Self {
2681 Self {
2682 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
2683
2684 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
2685
2686 width: ::fidl_next::FromWireRef::from_wire_ref(&wire.width),
2687
2688 height: ::fidl_next::FromWireRef::from_wire_ref(&wire.height),
2689 }
2690 }
2691 }
2692
2693 #[doc = " The integer dimensions of a rectangular region in a 2D cartesian space.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n\n This type allows for negative dimensions, to which protocols can give\n semantics. Protocols that use this type should specify whether negative\n dimensions are meaningful, and, if they are meaningful, what they mean.\n"]
2694 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2695 #[repr(C)]
2696 pub struct Size {
2697 pub width: i32,
2698
2699 pub height: i32,
2700 }
2701
2702 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Size, ___E> for Size
2703 where
2704 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2705 {
2706 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Size> = unsafe {
2707 ::fidl_next::CopyOptimization::enable_if(
2708 true
2709
2710 && <
2711 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
2712 >::COPY_OPTIMIZATION.is_enabled()
2713
2714 && <
2715 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
2716 >::COPY_OPTIMIZATION.is_enabled()
2717
2718 )
2719 };
2720
2721 #[inline]
2722 fn encode(
2723 self,
2724 encoder_: &mut ___E,
2725 out_: &mut ::core::mem::MaybeUninit<crate::wire::Size>,
2726 _: (),
2727 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2728 ::fidl_next::munge! {
2729 let crate::wire::Size {
2730 width,
2731 height,
2732
2733 } = out_;
2734 }
2735
2736 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
2737
2738 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2739
2740 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
2741
2742 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2743
2744 Ok(())
2745 }
2746 }
2747
2748 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Size, ___E> for &'a Size
2749 where
2750 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2751 {
2752 #[inline]
2753 fn encode(
2754 self,
2755 encoder_: &mut ___E,
2756 out_: &mut ::core::mem::MaybeUninit<crate::wire::Size>,
2757 _: (),
2758 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2759 ::fidl_next::munge! {
2760 let crate::wire::Size {
2761 width,
2762 height,
2763
2764 } = out_;
2765 }
2766
2767 ::fidl_next::Encode::encode(&self.width, encoder_, width, ())?;
2768
2769 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2770
2771 ::fidl_next::Encode::encode(&self.height, encoder_, height, ())?;
2772
2773 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2774
2775 Ok(())
2776 }
2777 }
2778
2779 unsafe impl<___E>
2780 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Size>, ___E> for Size
2781 where
2782 ___E: ::fidl_next::Encoder + ?Sized,
2783 Size: ::fidl_next::Encode<crate::wire::Size, ___E>,
2784 {
2785 #[inline]
2786 fn encode_option(
2787 this: ::core::option::Option<Self>,
2788 encoder: &mut ___E,
2789 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Size>>,
2790 _: (),
2791 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2792 if let Some(inner) = this {
2793 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2794 ::fidl_next::wire::Box::encode_present(out);
2795 } else {
2796 ::fidl_next::wire::Box::encode_absent(out);
2797 }
2798
2799 Ok(())
2800 }
2801 }
2802
2803 unsafe impl<'a, ___E>
2804 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Size>, ___E>
2805 for &'a Size
2806 where
2807 ___E: ::fidl_next::Encoder + ?Sized,
2808 &'a Size: ::fidl_next::Encode<crate::wire::Size, ___E>,
2809 {
2810 #[inline]
2811 fn encode_option(
2812 this: ::core::option::Option<Self>,
2813 encoder: &mut ___E,
2814 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Size>>,
2815 _: (),
2816 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2817 if let Some(inner) = this {
2818 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2819 ::fidl_next::wire::Box::encode_present(out);
2820 } else {
2821 ::fidl_next::wire::Box::encode_absent(out);
2822 }
2823
2824 Ok(())
2825 }
2826 }
2827
2828 impl ::fidl_next::FromWire<crate::wire::Size> for Size {
2829 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Size, Self> = unsafe {
2830 ::fidl_next::CopyOptimization::enable_if(
2831 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
2832 .is_enabled()
2833 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
2834 .is_enabled(),
2835 )
2836 };
2837
2838 #[inline]
2839 fn from_wire(wire: crate::wire::Size) -> Self {
2840 Self {
2841 width: ::fidl_next::FromWire::from_wire(wire.width),
2842
2843 height: ::fidl_next::FromWire::from_wire(wire.height),
2844 }
2845 }
2846 }
2847
2848 impl ::fidl_next::FromWireRef<crate::wire::Size> for Size {
2849 #[inline]
2850 fn from_wire_ref(wire: &crate::wire::Size) -> Self {
2851 Self {
2852 width: ::fidl_next::FromWireRef::from_wire_ref(&wire.width),
2853
2854 height: ::fidl_next::FromWireRef::from_wire_ref(&wire.height),
2855 }
2856 }
2857 }
2858
2859 #[doc = " The floating point dimensions of a rectangular region in a 2D cartesian\n space.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n\n This type allows for negative dimensions, to which protocols can give\n semantics. Protocols that use this type should specify whether negative\n dimensions are meaningful, and, if they are meaningful, what they mean.\n"]
2860 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
2861 #[repr(C)]
2862 pub struct SizeF {
2863 pub width: f32,
2864
2865 pub height: f32,
2866 }
2867
2868 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SizeF, ___E> for SizeF
2869 where
2870 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2871 {
2872 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::SizeF> = unsafe {
2873 ::fidl_next::CopyOptimization::enable_if(
2874 true
2875
2876 && <
2877 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
2878 >::COPY_OPTIMIZATION.is_enabled()
2879
2880 && <
2881 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
2882 >::COPY_OPTIMIZATION.is_enabled()
2883
2884 )
2885 };
2886
2887 #[inline]
2888 fn encode(
2889 self,
2890 encoder_: &mut ___E,
2891 out_: &mut ::core::mem::MaybeUninit<crate::wire::SizeF>,
2892 _: (),
2893 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2894 ::fidl_next::munge! {
2895 let crate::wire::SizeF {
2896 width,
2897 height,
2898
2899 } = out_;
2900 }
2901
2902 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
2903
2904 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2905
2906 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
2907
2908 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2909
2910 Ok(())
2911 }
2912 }
2913
2914 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SizeF, ___E> for &'a SizeF
2915 where
2916 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2917 {
2918 #[inline]
2919 fn encode(
2920 self,
2921 encoder_: &mut ___E,
2922 out_: &mut ::core::mem::MaybeUninit<crate::wire::SizeF>,
2923 _: (),
2924 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2925 ::fidl_next::munge! {
2926 let crate::wire::SizeF {
2927 width,
2928 height,
2929
2930 } = out_;
2931 }
2932
2933 ::fidl_next::Encode::encode(&self.width, encoder_, width, ())?;
2934
2935 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
2936
2937 ::fidl_next::Encode::encode(&self.height, encoder_, height, ())?;
2938
2939 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
2940
2941 Ok(())
2942 }
2943 }
2944
2945 unsafe impl<___E>
2946 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SizeF>, ___E>
2947 for SizeF
2948 where
2949 ___E: ::fidl_next::Encoder + ?Sized,
2950 SizeF: ::fidl_next::Encode<crate::wire::SizeF, ___E>,
2951 {
2952 #[inline]
2953 fn encode_option(
2954 this: ::core::option::Option<Self>,
2955 encoder: &mut ___E,
2956 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::SizeF>>,
2957 _: (),
2958 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2959 if let Some(inner) = this {
2960 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2961 ::fidl_next::wire::Box::encode_present(out);
2962 } else {
2963 ::fidl_next::wire::Box::encode_absent(out);
2964 }
2965
2966 Ok(())
2967 }
2968 }
2969
2970 unsafe impl<'a, ___E>
2971 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SizeF>, ___E>
2972 for &'a SizeF
2973 where
2974 ___E: ::fidl_next::Encoder + ?Sized,
2975 &'a SizeF: ::fidl_next::Encode<crate::wire::SizeF, ___E>,
2976 {
2977 #[inline]
2978 fn encode_option(
2979 this: ::core::option::Option<Self>,
2980 encoder: &mut ___E,
2981 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::SizeF>>,
2982 _: (),
2983 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2984 if let Some(inner) = this {
2985 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2986 ::fidl_next::wire::Box::encode_present(out);
2987 } else {
2988 ::fidl_next::wire::Box::encode_absent(out);
2989 }
2990
2991 Ok(())
2992 }
2993 }
2994
2995 impl ::fidl_next::FromWire<crate::wire::SizeF> for SizeF {
2996 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::SizeF, Self> = unsafe {
2997 ::fidl_next::CopyOptimization::enable_if(
2998 true
2999
3000 && <
3001 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3002 >::COPY_OPTIMIZATION.is_enabled()
3003
3004 && <
3005 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3006 >::COPY_OPTIMIZATION.is_enabled()
3007
3008 )
3009 };
3010
3011 #[inline]
3012 fn from_wire(wire: crate::wire::SizeF) -> Self {
3013 Self {
3014 width: ::fidl_next::FromWire::from_wire(wire.width),
3015
3016 height: ::fidl_next::FromWire::from_wire(wire.height),
3017 }
3018 }
3019 }
3020
3021 impl ::fidl_next::FromWireRef<crate::wire::SizeF> for SizeF {
3022 #[inline]
3023 fn from_wire_ref(wire: &crate::wire::SizeF) -> Self {
3024 Self {
3025 width: ::fidl_next::FromWireRef::from_wire_ref(&wire.width),
3026
3027 height: ::fidl_next::FromWireRef::from_wire_ref(&wire.height),
3028 }
3029 }
3030 }
3031
3032 #[doc = " The unsigned integer dimensions of a rectangular region in a 2D cartesian\n space.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
3033 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3034 #[repr(C)]
3035 pub struct SizeU {
3036 pub width: u32,
3037
3038 pub height: u32,
3039 }
3040
3041 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SizeU, ___E> for SizeU
3042 where
3043 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3044 {
3045 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::SizeU> = unsafe {
3046 ::fidl_next::CopyOptimization::enable_if(
3047 true
3048
3049 && <
3050 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3051 >::COPY_OPTIMIZATION.is_enabled()
3052
3053 && <
3054 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3055 >::COPY_OPTIMIZATION.is_enabled()
3056
3057 )
3058 };
3059
3060 #[inline]
3061 fn encode(
3062 self,
3063 encoder_: &mut ___E,
3064 out_: &mut ::core::mem::MaybeUninit<crate::wire::SizeU>,
3065 _: (),
3066 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3067 ::fidl_next::munge! {
3068 let crate::wire::SizeU {
3069 width,
3070 height,
3071
3072 } = out_;
3073 }
3074
3075 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
3076
3077 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
3078
3079 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
3080
3081 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
3082
3083 Ok(())
3084 }
3085 }
3086
3087 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SizeU, ___E> for &'a SizeU
3088 where
3089 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3090 {
3091 #[inline]
3092 fn encode(
3093 self,
3094 encoder_: &mut ___E,
3095 out_: &mut ::core::mem::MaybeUninit<crate::wire::SizeU>,
3096 _: (),
3097 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3098 ::fidl_next::munge! {
3099 let crate::wire::SizeU {
3100 width,
3101 height,
3102
3103 } = out_;
3104 }
3105
3106 ::fidl_next::Encode::encode(&self.width, encoder_, width, ())?;
3107
3108 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(width.as_mut_ptr()) };
3109
3110 ::fidl_next::Encode::encode(&self.height, encoder_, height, ())?;
3111
3112 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(height.as_mut_ptr()) };
3113
3114 Ok(())
3115 }
3116 }
3117
3118 unsafe impl<___E>
3119 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SizeU>, ___E>
3120 for SizeU
3121 where
3122 ___E: ::fidl_next::Encoder + ?Sized,
3123 SizeU: ::fidl_next::Encode<crate::wire::SizeU, ___E>,
3124 {
3125 #[inline]
3126 fn encode_option(
3127 this: ::core::option::Option<Self>,
3128 encoder: &mut ___E,
3129 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::SizeU>>,
3130 _: (),
3131 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3132 if let Some(inner) = this {
3133 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3134 ::fidl_next::wire::Box::encode_present(out);
3135 } else {
3136 ::fidl_next::wire::Box::encode_absent(out);
3137 }
3138
3139 Ok(())
3140 }
3141 }
3142
3143 unsafe impl<'a, ___E>
3144 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SizeU>, ___E>
3145 for &'a SizeU
3146 where
3147 ___E: ::fidl_next::Encoder + ?Sized,
3148 &'a SizeU: ::fidl_next::Encode<crate::wire::SizeU, ___E>,
3149 {
3150 #[inline]
3151 fn encode_option(
3152 this: ::core::option::Option<Self>,
3153 encoder: &mut ___E,
3154 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::SizeU>>,
3155 _: (),
3156 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3157 if let Some(inner) = this {
3158 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3159 ::fidl_next::wire::Box::encode_present(out);
3160 } else {
3161 ::fidl_next::wire::Box::encode_absent(out);
3162 }
3163
3164 Ok(())
3165 }
3166 }
3167
3168 impl ::fidl_next::FromWire<crate::wire::SizeU> for SizeU {
3169 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::SizeU, Self> = unsafe {
3170 ::fidl_next::CopyOptimization::enable_if(
3171 true
3172 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
3173 .is_enabled()
3174 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
3175 .is_enabled(),
3176 )
3177 };
3178
3179 #[inline]
3180 fn from_wire(wire: crate::wire::SizeU) -> Self {
3181 Self {
3182 width: ::fidl_next::FromWire::from_wire(wire.width),
3183
3184 height: ::fidl_next::FromWire::from_wire(wire.height),
3185 }
3186 }
3187 }
3188
3189 impl ::fidl_next::FromWireRef<crate::wire::SizeU> for SizeU {
3190 #[inline]
3191 fn from_wire_ref(wire: &crate::wire::SizeU) -> Self {
3192 Self {
3193 width: ::fidl_next::FromWireRef::from_wire_ref(&wire.width),
3194
3195 height: ::fidl_next::FromWireRef::from_wire_ref(&wire.height),
3196 }
3197 }
3198 }
3199
3200 #[doc = " A projective transformation of a 3D cartesian space.\n\n A transform consists of a 4x4 matrix that operates in homogeneous\n coordinates. For example, a point located at (x, y, z) in the cartesian\n space is transformed by `M` to a point located at (x\'/w\', y\'/w\', z\'/w\'),\n where `(x\', y\', z\', w\') = M (x, y, z, 1)`.\n"]
3201 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
3202 #[repr(C)]
3203 pub struct Transform {
3204 pub matrix: [f32; 16],
3205 }
3206
3207 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Transform, ___E> for Transform
3208 where
3209 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3210 {
3211 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Transform> = unsafe {
3212 ::fidl_next::CopyOptimization::enable_if(
3213 true && <[f32; 16] as ::fidl_next::Encode<
3214 [::fidl_next::wire::Float32; 16],
3215 ___E,
3216 >>::COPY_OPTIMIZATION
3217 .is_enabled(),
3218 )
3219 };
3220
3221 #[inline]
3222 fn encode(
3223 self,
3224 encoder_: &mut ___E,
3225 out_: &mut ::core::mem::MaybeUninit<crate::wire::Transform>,
3226 _: (),
3227 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3228 ::fidl_next::munge! {
3229 let crate::wire::Transform {
3230 matrix,
3231
3232 } = out_;
3233 }
3234
3235 ::fidl_next::Encode::encode(self.matrix, encoder_, matrix, ())?;
3236
3237 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(matrix.as_mut_ptr()) };
3238
3239 Ok(())
3240 }
3241 }
3242
3243 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Transform, ___E> for &'a Transform
3244 where
3245 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3246 {
3247 #[inline]
3248 fn encode(
3249 self,
3250 encoder_: &mut ___E,
3251 out_: &mut ::core::mem::MaybeUninit<crate::wire::Transform>,
3252 _: (),
3253 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3254 ::fidl_next::munge! {
3255 let crate::wire::Transform {
3256 matrix,
3257
3258 } = out_;
3259 }
3260
3261 ::fidl_next::Encode::encode(&self.matrix, encoder_, matrix, ())?;
3262
3263 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(matrix.as_mut_ptr()) };
3264
3265 Ok(())
3266 }
3267 }
3268
3269 unsafe impl<___E>
3270 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Transform>, ___E>
3271 for Transform
3272 where
3273 ___E: ::fidl_next::Encoder + ?Sized,
3274 Transform: ::fidl_next::Encode<crate::wire::Transform, ___E>,
3275 {
3276 #[inline]
3277 fn encode_option(
3278 this: ::core::option::Option<Self>,
3279 encoder: &mut ___E,
3280 out: &mut ::core::mem::MaybeUninit<
3281 ::fidl_next::wire::Box<'static, crate::wire::Transform>,
3282 >,
3283 _: (),
3284 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3285 if let Some(inner) = this {
3286 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3287 ::fidl_next::wire::Box::encode_present(out);
3288 } else {
3289 ::fidl_next::wire::Box::encode_absent(out);
3290 }
3291
3292 Ok(())
3293 }
3294 }
3295
3296 unsafe impl<'a, ___E>
3297 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Transform>, ___E>
3298 for &'a Transform
3299 where
3300 ___E: ::fidl_next::Encoder + ?Sized,
3301 &'a Transform: ::fidl_next::Encode<crate::wire::Transform, ___E>,
3302 {
3303 #[inline]
3304 fn encode_option(
3305 this: ::core::option::Option<Self>,
3306 encoder: &mut ___E,
3307 out: &mut ::core::mem::MaybeUninit<
3308 ::fidl_next::wire::Box<'static, crate::wire::Transform>,
3309 >,
3310 _: (),
3311 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3312 if let Some(inner) = this {
3313 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3314 ::fidl_next::wire::Box::encode_present(out);
3315 } else {
3316 ::fidl_next::wire::Box::encode_absent(out);
3317 }
3318
3319 Ok(())
3320 }
3321 }
3322
3323 impl ::fidl_next::FromWire<crate::wire::Transform> for Transform {
3324 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Transform, Self> =
3325 unsafe {
3326 ::fidl_next::CopyOptimization::enable_if(
3327 true && <[f32; 16] as ::fidl_next::FromWire<
3328 [::fidl_next::wire::Float32; 16],
3329 >>::COPY_OPTIMIZATION
3330 .is_enabled(),
3331 )
3332 };
3333
3334 #[inline]
3335 fn from_wire(wire: crate::wire::Transform) -> Self {
3336 Self { matrix: ::fidl_next::FromWire::from_wire(wire.matrix) }
3337 }
3338 }
3339
3340 impl ::fidl_next::FromWireRef<crate::wire::Transform> for Transform {
3341 #[inline]
3342 fn from_wire_ref(wire: &crate::wire::Transform) -> Self {
3343 Self { matrix: ::fidl_next::FromWireRef::from_wire_ref(&wire.matrix) }
3344 }
3345 }
3346
3347 #[doc = " Represents a 2D vector with integer coordinates.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
3348 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3349 #[repr(C)]
3350 pub struct Vec {
3351 pub x: i32,
3352
3353 pub y: i32,
3354 }
3355
3356 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Vec, ___E> for Vec
3357 where
3358 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3359 {
3360 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Vec> = unsafe {
3361 ::fidl_next::CopyOptimization::enable_if(
3362 true
3363
3364 && <
3365 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
3366 >::COPY_OPTIMIZATION.is_enabled()
3367
3368 && <
3369 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
3370 >::COPY_OPTIMIZATION.is_enabled()
3371
3372 )
3373 };
3374
3375 #[inline]
3376 fn encode(
3377 self,
3378 encoder_: &mut ___E,
3379 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec>,
3380 _: (),
3381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3382 ::fidl_next::munge! {
3383 let crate::wire::Vec {
3384 x,
3385 y,
3386
3387 } = out_;
3388 }
3389
3390 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
3391
3392 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3393
3394 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
3395
3396 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3397
3398 Ok(())
3399 }
3400 }
3401
3402 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Vec, ___E> for &'a Vec
3403 where
3404 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3405 {
3406 #[inline]
3407 fn encode(
3408 self,
3409 encoder_: &mut ___E,
3410 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec>,
3411 _: (),
3412 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3413 ::fidl_next::munge! {
3414 let crate::wire::Vec {
3415 x,
3416 y,
3417
3418 } = out_;
3419 }
3420
3421 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
3422
3423 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3424
3425 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
3426
3427 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3428
3429 Ok(())
3430 }
3431 }
3432
3433 unsafe impl<___E>
3434 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec>, ___E> for Vec
3435 where
3436 ___E: ::fidl_next::Encoder + ?Sized,
3437 Vec: ::fidl_next::Encode<crate::wire::Vec, ___E>,
3438 {
3439 #[inline]
3440 fn encode_option(
3441 this: ::core::option::Option<Self>,
3442 encoder: &mut ___E,
3443 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec>>,
3444 _: (),
3445 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3446 if let Some(inner) = this {
3447 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3448 ::fidl_next::wire::Box::encode_present(out);
3449 } else {
3450 ::fidl_next::wire::Box::encode_absent(out);
3451 }
3452
3453 Ok(())
3454 }
3455 }
3456
3457 unsafe impl<'a, ___E>
3458 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec>, ___E>
3459 for &'a Vec
3460 where
3461 ___E: ::fidl_next::Encoder + ?Sized,
3462 &'a Vec: ::fidl_next::Encode<crate::wire::Vec, ___E>,
3463 {
3464 #[inline]
3465 fn encode_option(
3466 this: ::core::option::Option<Self>,
3467 encoder: &mut ___E,
3468 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec>>,
3469 _: (),
3470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3471 if let Some(inner) = this {
3472 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3473 ::fidl_next::wire::Box::encode_present(out);
3474 } else {
3475 ::fidl_next::wire::Box::encode_absent(out);
3476 }
3477
3478 Ok(())
3479 }
3480 }
3481
3482 impl ::fidl_next::FromWire<crate::wire::Vec> for Vec {
3483 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Vec, Self> = unsafe {
3484 ::fidl_next::CopyOptimization::enable_if(
3485 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
3486 .is_enabled()
3487 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
3488 .is_enabled(),
3489 )
3490 };
3491
3492 #[inline]
3493 fn from_wire(wire: crate::wire::Vec) -> Self {
3494 Self {
3495 x: ::fidl_next::FromWire::from_wire(wire.x),
3496
3497 y: ::fidl_next::FromWire::from_wire(wire.y),
3498 }
3499 }
3500 }
3501
3502 impl ::fidl_next::FromWireRef<crate::wire::Vec> for Vec {
3503 #[inline]
3504 fn from_wire_ref(wire: &crate::wire::Vec) -> Self {
3505 Self {
3506 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
3507
3508 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
3509 }
3510 }
3511 }
3512
3513 #[doc = " Represents a 3D vector with floating point coordinates.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
3514 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
3515 #[repr(C)]
3516 pub struct Vec3F {
3517 pub x: f32,
3518
3519 pub y: f32,
3520
3521 pub z: f32,
3522 }
3523
3524 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Vec3F, ___E> for Vec3F
3525 where
3526 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3527 {
3528 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Vec3F> = unsafe {
3529 ::fidl_next::CopyOptimization::enable_if(
3530 true
3531
3532 && <
3533 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3534 >::COPY_OPTIMIZATION.is_enabled()
3535
3536 && <
3537 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3538 >::COPY_OPTIMIZATION.is_enabled()
3539
3540 && <
3541 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3542 >::COPY_OPTIMIZATION.is_enabled()
3543
3544 )
3545 };
3546
3547 #[inline]
3548 fn encode(
3549 self,
3550 encoder_: &mut ___E,
3551 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec3F>,
3552 _: (),
3553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3554 ::fidl_next::munge! {
3555 let crate::wire::Vec3F {
3556 x,
3557 y,
3558 z,
3559
3560 } = out_;
3561 }
3562
3563 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
3564
3565 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3566
3567 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
3568
3569 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3570
3571 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
3572
3573 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(z.as_mut_ptr()) };
3574
3575 Ok(())
3576 }
3577 }
3578
3579 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Vec3F, ___E> for &'a Vec3F
3580 where
3581 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3582 {
3583 #[inline]
3584 fn encode(
3585 self,
3586 encoder_: &mut ___E,
3587 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec3F>,
3588 _: (),
3589 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3590 ::fidl_next::munge! {
3591 let crate::wire::Vec3F {
3592 x,
3593 y,
3594 z,
3595
3596 } = out_;
3597 }
3598
3599 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
3600
3601 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3602
3603 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
3604
3605 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3606
3607 ::fidl_next::Encode::encode(&self.z, encoder_, z, ())?;
3608
3609 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(z.as_mut_ptr()) };
3610
3611 Ok(())
3612 }
3613 }
3614
3615 unsafe impl<___E>
3616 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec3F>, ___E>
3617 for Vec3F
3618 where
3619 ___E: ::fidl_next::Encoder + ?Sized,
3620 Vec3F: ::fidl_next::Encode<crate::wire::Vec3F, ___E>,
3621 {
3622 #[inline]
3623 fn encode_option(
3624 this: ::core::option::Option<Self>,
3625 encoder: &mut ___E,
3626 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec3F>>,
3627 _: (),
3628 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3629 if let Some(inner) = this {
3630 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3631 ::fidl_next::wire::Box::encode_present(out);
3632 } else {
3633 ::fidl_next::wire::Box::encode_absent(out);
3634 }
3635
3636 Ok(())
3637 }
3638 }
3639
3640 unsafe impl<'a, ___E>
3641 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec3F>, ___E>
3642 for &'a Vec3F
3643 where
3644 ___E: ::fidl_next::Encoder + ?Sized,
3645 &'a Vec3F: ::fidl_next::Encode<crate::wire::Vec3F, ___E>,
3646 {
3647 #[inline]
3648 fn encode_option(
3649 this: ::core::option::Option<Self>,
3650 encoder: &mut ___E,
3651 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec3F>>,
3652 _: (),
3653 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3654 if let Some(inner) = this {
3655 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3656 ::fidl_next::wire::Box::encode_present(out);
3657 } else {
3658 ::fidl_next::wire::Box::encode_absent(out);
3659 }
3660
3661 Ok(())
3662 }
3663 }
3664
3665 impl ::fidl_next::FromWire<crate::wire::Vec3F> for Vec3F {
3666 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Vec3F, Self> = unsafe {
3667 ::fidl_next::CopyOptimization::enable_if(
3668 true
3669
3670 && <
3671 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3672 >::COPY_OPTIMIZATION.is_enabled()
3673
3674 && <
3675 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3676 >::COPY_OPTIMIZATION.is_enabled()
3677
3678 && <
3679 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3680 >::COPY_OPTIMIZATION.is_enabled()
3681
3682 )
3683 };
3684
3685 #[inline]
3686 fn from_wire(wire: crate::wire::Vec3F) -> Self {
3687 Self {
3688 x: ::fidl_next::FromWire::from_wire(wire.x),
3689
3690 y: ::fidl_next::FromWire::from_wire(wire.y),
3691
3692 z: ::fidl_next::FromWire::from_wire(wire.z),
3693 }
3694 }
3695 }
3696
3697 impl ::fidl_next::FromWireRef<crate::wire::Vec3F> for Vec3F {
3698 #[inline]
3699 fn from_wire_ref(wire: &crate::wire::Vec3F) -> Self {
3700 Self {
3701 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
3702
3703 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
3704
3705 z: ::fidl_next::FromWireRef::from_wire_ref(&wire.z),
3706 }
3707 }
3708 }
3709
3710 #[doc = " Represents a 2D vector with floating point coordinates.\n\n This type does not specify units. Protocols that use this type should\n specify the characteristics of the vector space, including orientation and\n units.\n"]
3711 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
3712 #[repr(C)]
3713 pub struct VecF {
3714 pub x: f32,
3715
3716 pub y: f32,
3717 }
3718
3719 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VecF, ___E> for VecF
3720 where
3721 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3722 {
3723 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::VecF> = unsafe {
3724 ::fidl_next::CopyOptimization::enable_if(
3725 true
3726
3727 && <
3728 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3729 >::COPY_OPTIMIZATION.is_enabled()
3730
3731 && <
3732 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3733 >::COPY_OPTIMIZATION.is_enabled()
3734
3735 )
3736 };
3737
3738 #[inline]
3739 fn encode(
3740 self,
3741 encoder_: &mut ___E,
3742 out_: &mut ::core::mem::MaybeUninit<crate::wire::VecF>,
3743 _: (),
3744 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3745 ::fidl_next::munge! {
3746 let crate::wire::VecF {
3747 x,
3748 y,
3749
3750 } = out_;
3751 }
3752
3753 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
3754
3755 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3756
3757 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
3758
3759 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3760
3761 Ok(())
3762 }
3763 }
3764
3765 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VecF, ___E> for &'a VecF
3766 where
3767 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3768 {
3769 #[inline]
3770 fn encode(
3771 self,
3772 encoder_: &mut ___E,
3773 out_: &mut ::core::mem::MaybeUninit<crate::wire::VecF>,
3774 _: (),
3775 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3776 ::fidl_next::munge! {
3777 let crate::wire::VecF {
3778 x,
3779 y,
3780
3781 } = out_;
3782 }
3783
3784 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
3785
3786 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3787
3788 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
3789
3790 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3791
3792 Ok(())
3793 }
3794 }
3795
3796 unsafe impl<___E>
3797 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::VecF>, ___E> for VecF
3798 where
3799 ___E: ::fidl_next::Encoder + ?Sized,
3800 VecF: ::fidl_next::Encode<crate::wire::VecF, ___E>,
3801 {
3802 #[inline]
3803 fn encode_option(
3804 this: ::core::option::Option<Self>,
3805 encoder: &mut ___E,
3806 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::VecF>>,
3807 _: (),
3808 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3809 if let Some(inner) = this {
3810 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3811 ::fidl_next::wire::Box::encode_present(out);
3812 } else {
3813 ::fidl_next::wire::Box::encode_absent(out);
3814 }
3815
3816 Ok(())
3817 }
3818 }
3819
3820 unsafe impl<'a, ___E>
3821 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::VecF>, ___E>
3822 for &'a VecF
3823 where
3824 ___E: ::fidl_next::Encoder + ?Sized,
3825 &'a VecF: ::fidl_next::Encode<crate::wire::VecF, ___E>,
3826 {
3827 #[inline]
3828 fn encode_option(
3829 this: ::core::option::Option<Self>,
3830 encoder: &mut ___E,
3831 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::VecF>>,
3832 _: (),
3833 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3834 if let Some(inner) = this {
3835 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3836 ::fidl_next::wire::Box::encode_present(out);
3837 } else {
3838 ::fidl_next::wire::Box::encode_absent(out);
3839 }
3840
3841 Ok(())
3842 }
3843 }
3844
3845 impl ::fidl_next::FromWire<crate::wire::VecF> for VecF {
3846 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::VecF, Self> = unsafe {
3847 ::fidl_next::CopyOptimization::enable_if(
3848 true
3849
3850 && <
3851 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3852 >::COPY_OPTIMIZATION.is_enabled()
3853
3854 && <
3855 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3856 >::COPY_OPTIMIZATION.is_enabled()
3857
3858 )
3859 };
3860
3861 #[inline]
3862 fn from_wire(wire: crate::wire::VecF) -> Self {
3863 Self {
3864 x: ::fidl_next::FromWire::from_wire(wire.x),
3865
3866 y: ::fidl_next::FromWire::from_wire(wire.y),
3867 }
3868 }
3869 }
3870
3871 impl ::fidl_next::FromWireRef<crate::wire::VecF> for VecF {
3872 #[inline]
3873 fn from_wire_ref(wire: &crate::wire::VecF) -> Self {
3874 Self {
3875 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
3876
3877 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
3878 }
3879 }
3880 }
3881}
3882
3883pub mod wire {
3884
3885 #[derive(Clone, Debug)]
3887 #[repr(C)]
3888 pub struct Inset {
3889 pub top: ::fidl_next::wire::Int32,
3890
3891 pub right: ::fidl_next::wire::Int32,
3892
3893 pub bottom: ::fidl_next::wire::Int32,
3894
3895 pub left: ::fidl_next::wire::Int32,
3896 }
3897
3898 static_assertions::const_assert_eq!(std::mem::size_of::<Inset>(), 16);
3899 static_assertions::const_assert_eq!(std::mem::align_of::<Inset>(), 4);
3900
3901 static_assertions::const_assert_eq!(std::mem::offset_of!(Inset, top), 0);
3902
3903 static_assertions::const_assert_eq!(std::mem::offset_of!(Inset, right), 4);
3904
3905 static_assertions::const_assert_eq!(std::mem::offset_of!(Inset, bottom), 8);
3906
3907 static_assertions::const_assert_eq!(std::mem::offset_of!(Inset, left), 12);
3908
3909 impl ::fidl_next::Constrained for Inset {
3910 type Constraint = ();
3911
3912 fn validate(
3913 _: ::fidl_next::Slot<'_, Self>,
3914 _: Self::Constraint,
3915 ) -> Result<(), ::fidl_next::ValidationError> {
3916 Ok(())
3917 }
3918 }
3919
3920 unsafe impl ::fidl_next::Wire for Inset {
3921 type Narrowed<'de> = Inset;
3922
3923 #[inline]
3924 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3925 ::fidl_next::munge! {
3926 let Self {
3927 top,
3928 right,
3929 bottom,
3930 left,
3931
3932 } = &mut *out_;
3933 }
3934
3935 ::fidl_next::Wire::zero_padding(top);
3936
3937 ::fidl_next::Wire::zero_padding(right);
3938
3939 ::fidl_next::Wire::zero_padding(bottom);
3940
3941 ::fidl_next::Wire::zero_padding(left);
3942 }
3943 }
3944
3945 unsafe impl<___D> ::fidl_next::Decode<___D> for Inset
3946 where
3947 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3948 {
3949 fn decode(
3950 slot_: ::fidl_next::Slot<'_, Self>,
3951 decoder_: &mut ___D,
3952 _: (),
3953 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3954 ::fidl_next::munge! {
3955 let Self {
3956 mut top,
3957 mut right,
3958 mut bottom,
3959 mut left,
3960
3961 } = slot_;
3962 }
3963
3964 let _field = top.as_mut();
3965
3966 ::fidl_next::Decode::decode(top.as_mut(), decoder_, ())?;
3967
3968 let _field = right.as_mut();
3969
3970 ::fidl_next::Decode::decode(right.as_mut(), decoder_, ())?;
3971
3972 let _field = bottom.as_mut();
3973
3974 ::fidl_next::Decode::decode(bottom.as_mut(), decoder_, ())?;
3975
3976 let _field = left.as_mut();
3977
3978 ::fidl_next::Decode::decode(left.as_mut(), decoder_, ())?;
3979
3980 Ok(())
3981 }
3982 }
3983
3984 impl ::fidl_next::IntoNatural for Inset {
3985 type Natural = crate::natural::Inset;
3986 }
3987
3988 #[derive(Clone, Debug)]
3990 #[repr(C)]
3991 pub struct InsetF {
3992 pub top: ::fidl_next::wire::Float32,
3993
3994 pub right: ::fidl_next::wire::Float32,
3995
3996 pub bottom: ::fidl_next::wire::Float32,
3997
3998 pub left: ::fidl_next::wire::Float32,
3999 }
4000
4001 static_assertions::const_assert_eq!(std::mem::size_of::<InsetF>(), 16);
4002 static_assertions::const_assert_eq!(std::mem::align_of::<InsetF>(), 4);
4003
4004 static_assertions::const_assert_eq!(std::mem::offset_of!(InsetF, top), 0);
4005
4006 static_assertions::const_assert_eq!(std::mem::offset_of!(InsetF, right), 4);
4007
4008 static_assertions::const_assert_eq!(std::mem::offset_of!(InsetF, bottom), 8);
4009
4010 static_assertions::const_assert_eq!(std::mem::offset_of!(InsetF, left), 12);
4011
4012 impl ::fidl_next::Constrained for InsetF {
4013 type Constraint = ();
4014
4015 fn validate(
4016 _: ::fidl_next::Slot<'_, Self>,
4017 _: Self::Constraint,
4018 ) -> Result<(), ::fidl_next::ValidationError> {
4019 Ok(())
4020 }
4021 }
4022
4023 unsafe impl ::fidl_next::Wire for InsetF {
4024 type Narrowed<'de> = InsetF;
4025
4026 #[inline]
4027 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4028 ::fidl_next::munge! {
4029 let Self {
4030 top,
4031 right,
4032 bottom,
4033 left,
4034
4035 } = &mut *out_;
4036 }
4037
4038 ::fidl_next::Wire::zero_padding(top);
4039
4040 ::fidl_next::Wire::zero_padding(right);
4041
4042 ::fidl_next::Wire::zero_padding(bottom);
4043
4044 ::fidl_next::Wire::zero_padding(left);
4045 }
4046 }
4047
4048 unsafe impl<___D> ::fidl_next::Decode<___D> for InsetF
4049 where
4050 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4051 {
4052 fn decode(
4053 slot_: ::fidl_next::Slot<'_, Self>,
4054 decoder_: &mut ___D,
4055 _: (),
4056 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4057 ::fidl_next::munge! {
4058 let Self {
4059 mut top,
4060 mut right,
4061 mut bottom,
4062 mut left,
4063
4064 } = slot_;
4065 }
4066
4067 let _field = top.as_mut();
4068
4069 ::fidl_next::Decode::decode(top.as_mut(), decoder_, ())?;
4070
4071 let _field = right.as_mut();
4072
4073 ::fidl_next::Decode::decode(right.as_mut(), decoder_, ())?;
4074
4075 let _field = bottom.as_mut();
4076
4077 ::fidl_next::Decode::decode(bottom.as_mut(), decoder_, ())?;
4078
4079 let _field = left.as_mut();
4080
4081 ::fidl_next::Decode::decode(left.as_mut(), decoder_, ())?;
4082
4083 Ok(())
4084 }
4085 }
4086
4087 impl ::fidl_next::IntoNatural for InsetF {
4088 type Natural = crate::natural::InsetF;
4089 }
4090
4091 #[derive(Clone, Debug)]
4093 #[repr(C)]
4094 pub struct Point {
4095 pub x: ::fidl_next::wire::Int32,
4096
4097 pub y: ::fidl_next::wire::Int32,
4098 }
4099
4100 static_assertions::const_assert_eq!(std::mem::size_of::<Point>(), 8);
4101 static_assertions::const_assert_eq!(std::mem::align_of::<Point>(), 4);
4102
4103 static_assertions::const_assert_eq!(std::mem::offset_of!(Point, x), 0);
4104
4105 static_assertions::const_assert_eq!(std::mem::offset_of!(Point, y), 4);
4106
4107 impl ::fidl_next::Constrained for Point {
4108 type Constraint = ();
4109
4110 fn validate(
4111 _: ::fidl_next::Slot<'_, Self>,
4112 _: Self::Constraint,
4113 ) -> Result<(), ::fidl_next::ValidationError> {
4114 Ok(())
4115 }
4116 }
4117
4118 unsafe impl ::fidl_next::Wire for Point {
4119 type Narrowed<'de> = Point;
4120
4121 #[inline]
4122 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4123 ::fidl_next::munge! {
4124 let Self {
4125 x,
4126 y,
4127
4128 } = &mut *out_;
4129 }
4130
4131 ::fidl_next::Wire::zero_padding(x);
4132
4133 ::fidl_next::Wire::zero_padding(y);
4134 }
4135 }
4136
4137 unsafe impl<___D> ::fidl_next::Decode<___D> for Point
4138 where
4139 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4140 {
4141 fn decode(
4142 slot_: ::fidl_next::Slot<'_, Self>,
4143 decoder_: &mut ___D,
4144 _: (),
4145 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4146 ::fidl_next::munge! {
4147 let Self {
4148 mut x,
4149 mut y,
4150
4151 } = slot_;
4152 }
4153
4154 let _field = x.as_mut();
4155
4156 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4157
4158 let _field = y.as_mut();
4159
4160 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4161
4162 Ok(())
4163 }
4164 }
4165
4166 impl ::fidl_next::IntoNatural for Point {
4167 type Natural = crate::natural::Point;
4168 }
4169
4170 #[derive(Clone, Debug)]
4172 #[repr(C)]
4173 pub struct Point3F {
4174 pub x: ::fidl_next::wire::Float32,
4175
4176 pub y: ::fidl_next::wire::Float32,
4177
4178 pub z: ::fidl_next::wire::Float32,
4179 }
4180
4181 static_assertions::const_assert_eq!(std::mem::size_of::<Point3F>(), 12);
4182 static_assertions::const_assert_eq!(std::mem::align_of::<Point3F>(), 4);
4183
4184 static_assertions::const_assert_eq!(std::mem::offset_of!(Point3F, x), 0);
4185
4186 static_assertions::const_assert_eq!(std::mem::offset_of!(Point3F, y), 4);
4187
4188 static_assertions::const_assert_eq!(std::mem::offset_of!(Point3F, z), 8);
4189
4190 impl ::fidl_next::Constrained for Point3F {
4191 type Constraint = ();
4192
4193 fn validate(
4194 _: ::fidl_next::Slot<'_, Self>,
4195 _: Self::Constraint,
4196 ) -> Result<(), ::fidl_next::ValidationError> {
4197 Ok(())
4198 }
4199 }
4200
4201 unsafe impl ::fidl_next::Wire for Point3F {
4202 type Narrowed<'de> = Point3F;
4203
4204 #[inline]
4205 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4206 ::fidl_next::munge! {
4207 let Self {
4208 x,
4209 y,
4210 z,
4211
4212 } = &mut *out_;
4213 }
4214
4215 ::fidl_next::Wire::zero_padding(x);
4216
4217 ::fidl_next::Wire::zero_padding(y);
4218
4219 ::fidl_next::Wire::zero_padding(z);
4220 }
4221 }
4222
4223 unsafe impl<___D> ::fidl_next::Decode<___D> for Point3F
4224 where
4225 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4226 {
4227 fn decode(
4228 slot_: ::fidl_next::Slot<'_, Self>,
4229 decoder_: &mut ___D,
4230 _: (),
4231 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4232 ::fidl_next::munge! {
4233 let Self {
4234 mut x,
4235 mut y,
4236 mut z,
4237
4238 } = slot_;
4239 }
4240
4241 let _field = x.as_mut();
4242
4243 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4244
4245 let _field = y.as_mut();
4246
4247 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4248
4249 let _field = z.as_mut();
4250
4251 ::fidl_next::Decode::decode(z.as_mut(), decoder_, ())?;
4252
4253 Ok(())
4254 }
4255 }
4256
4257 impl ::fidl_next::IntoNatural for Point3F {
4258 type Natural = crate::natural::Point3F;
4259 }
4260
4261 #[derive(Clone, Debug)]
4263 #[repr(C)]
4264 pub struct PointF {
4265 pub x: ::fidl_next::wire::Float32,
4266
4267 pub y: ::fidl_next::wire::Float32,
4268 }
4269
4270 static_assertions::const_assert_eq!(std::mem::size_of::<PointF>(), 8);
4271 static_assertions::const_assert_eq!(std::mem::align_of::<PointF>(), 4);
4272
4273 static_assertions::const_assert_eq!(std::mem::offset_of!(PointF, x), 0);
4274
4275 static_assertions::const_assert_eq!(std::mem::offset_of!(PointF, y), 4);
4276
4277 impl ::fidl_next::Constrained for PointF {
4278 type Constraint = ();
4279
4280 fn validate(
4281 _: ::fidl_next::Slot<'_, Self>,
4282 _: Self::Constraint,
4283 ) -> Result<(), ::fidl_next::ValidationError> {
4284 Ok(())
4285 }
4286 }
4287
4288 unsafe impl ::fidl_next::Wire for PointF {
4289 type Narrowed<'de> = PointF;
4290
4291 #[inline]
4292 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4293 ::fidl_next::munge! {
4294 let Self {
4295 x,
4296 y,
4297
4298 } = &mut *out_;
4299 }
4300
4301 ::fidl_next::Wire::zero_padding(x);
4302
4303 ::fidl_next::Wire::zero_padding(y);
4304 }
4305 }
4306
4307 unsafe impl<___D> ::fidl_next::Decode<___D> for PointF
4308 where
4309 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4310 {
4311 fn decode(
4312 slot_: ::fidl_next::Slot<'_, Self>,
4313 decoder_: &mut ___D,
4314 _: (),
4315 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4316 ::fidl_next::munge! {
4317 let Self {
4318 mut x,
4319 mut y,
4320
4321 } = slot_;
4322 }
4323
4324 let _field = x.as_mut();
4325
4326 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4327
4328 let _field = y.as_mut();
4329
4330 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4331
4332 Ok(())
4333 }
4334 }
4335
4336 impl ::fidl_next::IntoNatural for PointF {
4337 type Natural = crate::natural::PointF;
4338 }
4339
4340 #[derive(Clone, Debug)]
4342 #[repr(C)]
4343 pub struct Vec4F {
4344 pub x: ::fidl_next::wire::Float32,
4345
4346 pub y: ::fidl_next::wire::Float32,
4347
4348 pub z: ::fidl_next::wire::Float32,
4349
4350 pub w: ::fidl_next::wire::Float32,
4351 }
4352
4353 static_assertions::const_assert_eq!(std::mem::size_of::<Vec4F>(), 16);
4354 static_assertions::const_assert_eq!(std::mem::align_of::<Vec4F>(), 4);
4355
4356 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec4F, x), 0);
4357
4358 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec4F, y), 4);
4359
4360 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec4F, z), 8);
4361
4362 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec4F, w), 12);
4363
4364 impl ::fidl_next::Constrained for Vec4F {
4365 type Constraint = ();
4366
4367 fn validate(
4368 _: ::fidl_next::Slot<'_, Self>,
4369 _: Self::Constraint,
4370 ) -> Result<(), ::fidl_next::ValidationError> {
4371 Ok(())
4372 }
4373 }
4374
4375 unsafe impl ::fidl_next::Wire for Vec4F {
4376 type Narrowed<'de> = Vec4F;
4377
4378 #[inline]
4379 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4380 ::fidl_next::munge! {
4381 let Self {
4382 x,
4383 y,
4384 z,
4385 w,
4386
4387 } = &mut *out_;
4388 }
4389
4390 ::fidl_next::Wire::zero_padding(x);
4391
4392 ::fidl_next::Wire::zero_padding(y);
4393
4394 ::fidl_next::Wire::zero_padding(z);
4395
4396 ::fidl_next::Wire::zero_padding(w);
4397 }
4398 }
4399
4400 unsafe impl<___D> ::fidl_next::Decode<___D> for Vec4F
4401 where
4402 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4403 {
4404 fn decode(
4405 slot_: ::fidl_next::Slot<'_, Self>,
4406 decoder_: &mut ___D,
4407 _: (),
4408 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4409 ::fidl_next::munge! {
4410 let Self {
4411 mut x,
4412 mut y,
4413 mut z,
4414 mut w,
4415
4416 } = slot_;
4417 }
4418
4419 let _field = x.as_mut();
4420
4421 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4422
4423 let _field = y.as_mut();
4424
4425 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4426
4427 let _field = z.as_mut();
4428
4429 ::fidl_next::Decode::decode(z.as_mut(), decoder_, ())?;
4430
4431 let _field = w.as_mut();
4432
4433 ::fidl_next::Decode::decode(w.as_mut(), decoder_, ())?;
4434
4435 Ok(())
4436 }
4437 }
4438
4439 impl ::fidl_next::IntoNatural for Vec4F {
4440 type Natural = crate::natural::Vec4F;
4441 }
4442
4443 pub type QuaternionF = crate::wire::Vec4F;
4445
4446 #[derive(Clone, Debug)]
4448 #[repr(C)]
4449 pub struct RRectF {
4450 pub x: ::fidl_next::wire::Float32,
4451
4452 pub y: ::fidl_next::wire::Float32,
4453
4454 pub width: ::fidl_next::wire::Float32,
4455
4456 pub height: ::fidl_next::wire::Float32,
4457
4458 pub top_left_radius_x: ::fidl_next::wire::Float32,
4459
4460 pub top_left_radius_y: ::fidl_next::wire::Float32,
4461
4462 pub top_right_radius_x: ::fidl_next::wire::Float32,
4463
4464 pub top_right_radius_y: ::fidl_next::wire::Float32,
4465
4466 pub bottom_left_radius_x: ::fidl_next::wire::Float32,
4467
4468 pub bottom_left_radius_y: ::fidl_next::wire::Float32,
4469
4470 pub bottom_right_radius_x: ::fidl_next::wire::Float32,
4471
4472 pub bottom_right_radius_y: ::fidl_next::wire::Float32,
4473 }
4474
4475 static_assertions::const_assert_eq!(std::mem::size_of::<RRectF>(), 48);
4476 static_assertions::const_assert_eq!(std::mem::align_of::<RRectF>(), 4);
4477
4478 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, x), 0);
4479
4480 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, y), 4);
4481
4482 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, width), 8);
4483
4484 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, height), 12);
4485
4486 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, top_left_radius_x), 16);
4487
4488 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, top_left_radius_y), 20);
4489
4490 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, top_right_radius_x), 24);
4491
4492 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, top_right_radius_y), 28);
4493
4494 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, bottom_left_radius_x), 32);
4495
4496 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, bottom_left_radius_y), 36);
4497
4498 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, bottom_right_radius_x), 40);
4499
4500 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, bottom_right_radius_y), 44);
4501
4502 impl ::fidl_next::Constrained for RRectF {
4503 type Constraint = ();
4504
4505 fn validate(
4506 _: ::fidl_next::Slot<'_, Self>,
4507 _: Self::Constraint,
4508 ) -> Result<(), ::fidl_next::ValidationError> {
4509 Ok(())
4510 }
4511 }
4512
4513 unsafe impl ::fidl_next::Wire for RRectF {
4514 type Narrowed<'de> = RRectF;
4515
4516 #[inline]
4517 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4518 ::fidl_next::munge! {
4519 let Self {
4520 x,
4521 y,
4522 width,
4523 height,
4524 top_left_radius_x,
4525 top_left_radius_y,
4526 top_right_radius_x,
4527 top_right_radius_y,
4528 bottom_left_radius_x,
4529 bottom_left_radius_y,
4530 bottom_right_radius_x,
4531 bottom_right_radius_y,
4532
4533 } = &mut *out_;
4534 }
4535
4536 ::fidl_next::Wire::zero_padding(x);
4537
4538 ::fidl_next::Wire::zero_padding(y);
4539
4540 ::fidl_next::Wire::zero_padding(width);
4541
4542 ::fidl_next::Wire::zero_padding(height);
4543
4544 ::fidl_next::Wire::zero_padding(top_left_radius_x);
4545
4546 ::fidl_next::Wire::zero_padding(top_left_radius_y);
4547
4548 ::fidl_next::Wire::zero_padding(top_right_radius_x);
4549
4550 ::fidl_next::Wire::zero_padding(top_right_radius_y);
4551
4552 ::fidl_next::Wire::zero_padding(bottom_left_radius_x);
4553
4554 ::fidl_next::Wire::zero_padding(bottom_left_radius_y);
4555
4556 ::fidl_next::Wire::zero_padding(bottom_right_radius_x);
4557
4558 ::fidl_next::Wire::zero_padding(bottom_right_radius_y);
4559 }
4560 }
4561
4562 unsafe impl<___D> ::fidl_next::Decode<___D> for RRectF
4563 where
4564 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4565 {
4566 fn decode(
4567 slot_: ::fidl_next::Slot<'_, Self>,
4568 decoder_: &mut ___D,
4569 _: (),
4570 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4571 ::fidl_next::munge! {
4572 let Self {
4573 mut x,
4574 mut y,
4575 mut width,
4576 mut height,
4577 mut top_left_radius_x,
4578 mut top_left_radius_y,
4579 mut top_right_radius_x,
4580 mut top_right_radius_y,
4581 mut bottom_left_radius_x,
4582 mut bottom_left_radius_y,
4583 mut bottom_right_radius_x,
4584 mut bottom_right_radius_y,
4585
4586 } = slot_;
4587 }
4588
4589 let _field = x.as_mut();
4590
4591 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4592
4593 let _field = y.as_mut();
4594
4595 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4596
4597 let _field = width.as_mut();
4598
4599 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
4600
4601 let _field = height.as_mut();
4602
4603 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
4604
4605 let _field = top_left_radius_x.as_mut();
4606
4607 ::fidl_next::Decode::decode(top_left_radius_x.as_mut(), decoder_, ())?;
4608
4609 let _field = top_left_radius_y.as_mut();
4610
4611 ::fidl_next::Decode::decode(top_left_radius_y.as_mut(), decoder_, ())?;
4612
4613 let _field = top_right_radius_x.as_mut();
4614
4615 ::fidl_next::Decode::decode(top_right_radius_x.as_mut(), decoder_, ())?;
4616
4617 let _field = top_right_radius_y.as_mut();
4618
4619 ::fidl_next::Decode::decode(top_right_radius_y.as_mut(), decoder_, ())?;
4620
4621 let _field = bottom_left_radius_x.as_mut();
4622
4623 ::fidl_next::Decode::decode(bottom_left_radius_x.as_mut(), decoder_, ())?;
4624
4625 let _field = bottom_left_radius_y.as_mut();
4626
4627 ::fidl_next::Decode::decode(bottom_left_radius_y.as_mut(), decoder_, ())?;
4628
4629 let _field = bottom_right_radius_x.as_mut();
4630
4631 ::fidl_next::Decode::decode(bottom_right_radius_x.as_mut(), decoder_, ())?;
4632
4633 let _field = bottom_right_radius_y.as_mut();
4634
4635 ::fidl_next::Decode::decode(bottom_right_radius_y.as_mut(), decoder_, ())?;
4636
4637 Ok(())
4638 }
4639 }
4640
4641 impl ::fidl_next::IntoNatural for RRectF {
4642 type Natural = crate::natural::RRectF;
4643 }
4644
4645 #[derive(Clone, Debug)]
4647 #[repr(C)]
4648 pub struct RatioU32 {
4649 pub numerator: ::fidl_next::wire::Uint32,
4650
4651 pub denominator: ::fidl_next::wire::Uint32,
4652 }
4653
4654 static_assertions::const_assert_eq!(std::mem::size_of::<RatioU32>(), 8);
4655 static_assertions::const_assert_eq!(std::mem::align_of::<RatioU32>(), 4);
4656
4657 static_assertions::const_assert_eq!(std::mem::offset_of!(RatioU32, numerator), 0);
4658
4659 static_assertions::const_assert_eq!(std::mem::offset_of!(RatioU32, denominator), 4);
4660
4661 impl ::fidl_next::Constrained for RatioU32 {
4662 type Constraint = ();
4663
4664 fn validate(
4665 _: ::fidl_next::Slot<'_, Self>,
4666 _: Self::Constraint,
4667 ) -> Result<(), ::fidl_next::ValidationError> {
4668 Ok(())
4669 }
4670 }
4671
4672 unsafe impl ::fidl_next::Wire for RatioU32 {
4673 type Narrowed<'de> = RatioU32;
4674
4675 #[inline]
4676 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4677 ::fidl_next::munge! {
4678 let Self {
4679 numerator,
4680 denominator,
4681
4682 } = &mut *out_;
4683 }
4684
4685 ::fidl_next::Wire::zero_padding(numerator);
4686
4687 ::fidl_next::Wire::zero_padding(denominator);
4688 }
4689 }
4690
4691 unsafe impl<___D> ::fidl_next::Decode<___D> for RatioU32
4692 where
4693 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4694 {
4695 fn decode(
4696 slot_: ::fidl_next::Slot<'_, Self>,
4697 decoder_: &mut ___D,
4698 _: (),
4699 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4700 ::fidl_next::munge! {
4701 let Self {
4702 mut numerator,
4703 mut denominator,
4704
4705 } = slot_;
4706 }
4707
4708 let _field = numerator.as_mut();
4709
4710 ::fidl_next::Decode::decode(numerator.as_mut(), decoder_, ())?;
4711
4712 let _field = denominator.as_mut();
4713
4714 ::fidl_next::Decode::decode(denominator.as_mut(), decoder_, ())?;
4715
4716 Ok(())
4717 }
4718 }
4719
4720 impl ::fidl_next::IntoNatural for RatioU32 {
4721 type Natural = crate::natural::RatioU32;
4722 }
4723
4724 #[derive(Clone, Debug)]
4726 #[repr(C)]
4727 pub struct RatioU64 {
4728 pub numerator: ::fidl_next::wire::Uint64,
4729
4730 pub denominator: ::fidl_next::wire::Uint64,
4731 }
4732
4733 static_assertions::const_assert_eq!(std::mem::size_of::<RatioU64>(), 16);
4734 static_assertions::const_assert_eq!(std::mem::align_of::<RatioU64>(), 8);
4735
4736 static_assertions::const_assert_eq!(std::mem::offset_of!(RatioU64, numerator), 0);
4737
4738 static_assertions::const_assert_eq!(std::mem::offset_of!(RatioU64, denominator), 8);
4739
4740 impl ::fidl_next::Constrained for RatioU64 {
4741 type Constraint = ();
4742
4743 fn validate(
4744 _: ::fidl_next::Slot<'_, Self>,
4745 _: Self::Constraint,
4746 ) -> Result<(), ::fidl_next::ValidationError> {
4747 Ok(())
4748 }
4749 }
4750
4751 unsafe impl ::fidl_next::Wire for RatioU64 {
4752 type Narrowed<'de> = RatioU64;
4753
4754 #[inline]
4755 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4756 ::fidl_next::munge! {
4757 let Self {
4758 numerator,
4759 denominator,
4760
4761 } = &mut *out_;
4762 }
4763
4764 ::fidl_next::Wire::zero_padding(numerator);
4765
4766 ::fidl_next::Wire::zero_padding(denominator);
4767 }
4768 }
4769
4770 unsafe impl<___D> ::fidl_next::Decode<___D> for RatioU64
4771 where
4772 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4773 {
4774 fn decode(
4775 slot_: ::fidl_next::Slot<'_, Self>,
4776 decoder_: &mut ___D,
4777 _: (),
4778 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4779 ::fidl_next::munge! {
4780 let Self {
4781 mut numerator,
4782 mut denominator,
4783
4784 } = slot_;
4785 }
4786
4787 let _field = numerator.as_mut();
4788
4789 ::fidl_next::Decode::decode(numerator.as_mut(), decoder_, ())?;
4790
4791 let _field = denominator.as_mut();
4792
4793 ::fidl_next::Decode::decode(denominator.as_mut(), decoder_, ())?;
4794
4795 Ok(())
4796 }
4797 }
4798
4799 impl ::fidl_next::IntoNatural for RatioU64 {
4800 type Natural = crate::natural::RatioU64;
4801 }
4802
4803 #[derive(Clone, Debug)]
4805 #[repr(C)]
4806 pub struct Rect {
4807 pub x: ::fidl_next::wire::Int32,
4808
4809 pub y: ::fidl_next::wire::Int32,
4810
4811 pub width: ::fidl_next::wire::Int32,
4812
4813 pub height: ::fidl_next::wire::Int32,
4814 }
4815
4816 static_assertions::const_assert_eq!(std::mem::size_of::<Rect>(), 16);
4817 static_assertions::const_assert_eq!(std::mem::align_of::<Rect>(), 4);
4818
4819 static_assertions::const_assert_eq!(std::mem::offset_of!(Rect, x), 0);
4820
4821 static_assertions::const_assert_eq!(std::mem::offset_of!(Rect, y), 4);
4822
4823 static_assertions::const_assert_eq!(std::mem::offset_of!(Rect, width), 8);
4824
4825 static_assertions::const_assert_eq!(std::mem::offset_of!(Rect, height), 12);
4826
4827 impl ::fidl_next::Constrained for Rect {
4828 type Constraint = ();
4829
4830 fn validate(
4831 _: ::fidl_next::Slot<'_, Self>,
4832 _: Self::Constraint,
4833 ) -> Result<(), ::fidl_next::ValidationError> {
4834 Ok(())
4835 }
4836 }
4837
4838 unsafe impl ::fidl_next::Wire for Rect {
4839 type Narrowed<'de> = Rect;
4840
4841 #[inline]
4842 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4843 ::fidl_next::munge! {
4844 let Self {
4845 x,
4846 y,
4847 width,
4848 height,
4849
4850 } = &mut *out_;
4851 }
4852
4853 ::fidl_next::Wire::zero_padding(x);
4854
4855 ::fidl_next::Wire::zero_padding(y);
4856
4857 ::fidl_next::Wire::zero_padding(width);
4858
4859 ::fidl_next::Wire::zero_padding(height);
4860 }
4861 }
4862
4863 unsafe impl<___D> ::fidl_next::Decode<___D> for Rect
4864 where
4865 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4866 {
4867 fn decode(
4868 slot_: ::fidl_next::Slot<'_, Self>,
4869 decoder_: &mut ___D,
4870 _: (),
4871 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4872 ::fidl_next::munge! {
4873 let Self {
4874 mut x,
4875 mut y,
4876 mut width,
4877 mut height,
4878
4879 } = slot_;
4880 }
4881
4882 let _field = x.as_mut();
4883
4884 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4885
4886 let _field = y.as_mut();
4887
4888 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4889
4890 let _field = width.as_mut();
4891
4892 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
4893
4894 let _field = height.as_mut();
4895
4896 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
4897
4898 Ok(())
4899 }
4900 }
4901
4902 impl ::fidl_next::IntoNatural for Rect {
4903 type Natural = crate::natural::Rect;
4904 }
4905
4906 #[derive(Clone, Debug)]
4908 #[repr(C)]
4909 pub struct RectF {
4910 pub x: ::fidl_next::wire::Float32,
4911
4912 pub y: ::fidl_next::wire::Float32,
4913
4914 pub width: ::fidl_next::wire::Float32,
4915
4916 pub height: ::fidl_next::wire::Float32,
4917 }
4918
4919 static_assertions::const_assert_eq!(std::mem::size_of::<RectF>(), 16);
4920 static_assertions::const_assert_eq!(std::mem::align_of::<RectF>(), 4);
4921
4922 static_assertions::const_assert_eq!(std::mem::offset_of!(RectF, x), 0);
4923
4924 static_assertions::const_assert_eq!(std::mem::offset_of!(RectF, y), 4);
4925
4926 static_assertions::const_assert_eq!(std::mem::offset_of!(RectF, width), 8);
4927
4928 static_assertions::const_assert_eq!(std::mem::offset_of!(RectF, height), 12);
4929
4930 impl ::fidl_next::Constrained for RectF {
4931 type Constraint = ();
4932
4933 fn validate(
4934 _: ::fidl_next::Slot<'_, Self>,
4935 _: Self::Constraint,
4936 ) -> Result<(), ::fidl_next::ValidationError> {
4937 Ok(())
4938 }
4939 }
4940
4941 unsafe impl ::fidl_next::Wire for RectF {
4942 type Narrowed<'de> = RectF;
4943
4944 #[inline]
4945 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4946 ::fidl_next::munge! {
4947 let Self {
4948 x,
4949 y,
4950 width,
4951 height,
4952
4953 } = &mut *out_;
4954 }
4955
4956 ::fidl_next::Wire::zero_padding(x);
4957
4958 ::fidl_next::Wire::zero_padding(y);
4959
4960 ::fidl_next::Wire::zero_padding(width);
4961
4962 ::fidl_next::Wire::zero_padding(height);
4963 }
4964 }
4965
4966 unsafe impl<___D> ::fidl_next::Decode<___D> for RectF
4967 where
4968 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4969 {
4970 fn decode(
4971 slot_: ::fidl_next::Slot<'_, Self>,
4972 decoder_: &mut ___D,
4973 _: (),
4974 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4975 ::fidl_next::munge! {
4976 let Self {
4977 mut x,
4978 mut y,
4979 mut width,
4980 mut height,
4981
4982 } = slot_;
4983 }
4984
4985 let _field = x.as_mut();
4986
4987 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4988
4989 let _field = y.as_mut();
4990
4991 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4992
4993 let _field = width.as_mut();
4994
4995 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
4996
4997 let _field = height.as_mut();
4998
4999 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5000
5001 Ok(())
5002 }
5003 }
5004
5005 impl ::fidl_next::IntoNatural for RectF {
5006 type Natural = crate::natural::RectF;
5007 }
5008
5009 #[derive(Clone, Debug)]
5011 #[repr(C)]
5012 pub struct RectU {
5013 pub x: ::fidl_next::wire::Uint32,
5014
5015 pub y: ::fidl_next::wire::Uint32,
5016
5017 pub width: ::fidl_next::wire::Uint32,
5018
5019 pub height: ::fidl_next::wire::Uint32,
5020 }
5021
5022 static_assertions::const_assert_eq!(std::mem::size_of::<RectU>(), 16);
5023 static_assertions::const_assert_eq!(std::mem::align_of::<RectU>(), 4);
5024
5025 static_assertions::const_assert_eq!(std::mem::offset_of!(RectU, x), 0);
5026
5027 static_assertions::const_assert_eq!(std::mem::offset_of!(RectU, y), 4);
5028
5029 static_assertions::const_assert_eq!(std::mem::offset_of!(RectU, width), 8);
5030
5031 static_assertions::const_assert_eq!(std::mem::offset_of!(RectU, height), 12);
5032
5033 impl ::fidl_next::Constrained for RectU {
5034 type Constraint = ();
5035
5036 fn validate(
5037 _: ::fidl_next::Slot<'_, Self>,
5038 _: Self::Constraint,
5039 ) -> Result<(), ::fidl_next::ValidationError> {
5040 Ok(())
5041 }
5042 }
5043
5044 unsafe impl ::fidl_next::Wire for RectU {
5045 type Narrowed<'de> = RectU;
5046
5047 #[inline]
5048 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5049 ::fidl_next::munge! {
5050 let Self {
5051 x,
5052 y,
5053 width,
5054 height,
5055
5056 } = &mut *out_;
5057 }
5058
5059 ::fidl_next::Wire::zero_padding(x);
5060
5061 ::fidl_next::Wire::zero_padding(y);
5062
5063 ::fidl_next::Wire::zero_padding(width);
5064
5065 ::fidl_next::Wire::zero_padding(height);
5066 }
5067 }
5068
5069 unsafe impl<___D> ::fidl_next::Decode<___D> for RectU
5070 where
5071 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5072 {
5073 fn decode(
5074 slot_: ::fidl_next::Slot<'_, Self>,
5075 decoder_: &mut ___D,
5076 _: (),
5077 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5078 ::fidl_next::munge! {
5079 let Self {
5080 mut x,
5081 mut y,
5082 mut width,
5083 mut height,
5084
5085 } = slot_;
5086 }
5087
5088 let _field = x.as_mut();
5089
5090 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
5091
5092 let _field = y.as_mut();
5093
5094 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
5095
5096 let _field = width.as_mut();
5097
5098 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
5099
5100 let _field = height.as_mut();
5101
5102 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5103
5104 Ok(())
5105 }
5106 }
5107
5108 impl ::fidl_next::IntoNatural for RectU {
5109 type Natural = crate::natural::RectU;
5110 }
5111
5112 #[derive(Clone, Debug)]
5114 #[repr(C)]
5115 pub struct Size {
5116 pub width: ::fidl_next::wire::Int32,
5117
5118 pub height: ::fidl_next::wire::Int32,
5119 }
5120
5121 static_assertions::const_assert_eq!(std::mem::size_of::<Size>(), 8);
5122 static_assertions::const_assert_eq!(std::mem::align_of::<Size>(), 4);
5123
5124 static_assertions::const_assert_eq!(std::mem::offset_of!(Size, width), 0);
5125
5126 static_assertions::const_assert_eq!(std::mem::offset_of!(Size, height), 4);
5127
5128 impl ::fidl_next::Constrained for Size {
5129 type Constraint = ();
5130
5131 fn validate(
5132 _: ::fidl_next::Slot<'_, Self>,
5133 _: Self::Constraint,
5134 ) -> Result<(), ::fidl_next::ValidationError> {
5135 Ok(())
5136 }
5137 }
5138
5139 unsafe impl ::fidl_next::Wire for Size {
5140 type Narrowed<'de> = Size;
5141
5142 #[inline]
5143 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5144 ::fidl_next::munge! {
5145 let Self {
5146 width,
5147 height,
5148
5149 } = &mut *out_;
5150 }
5151
5152 ::fidl_next::Wire::zero_padding(width);
5153
5154 ::fidl_next::Wire::zero_padding(height);
5155 }
5156 }
5157
5158 unsafe impl<___D> ::fidl_next::Decode<___D> for Size
5159 where
5160 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5161 {
5162 fn decode(
5163 slot_: ::fidl_next::Slot<'_, Self>,
5164 decoder_: &mut ___D,
5165 _: (),
5166 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5167 ::fidl_next::munge! {
5168 let Self {
5169 mut width,
5170 mut height,
5171
5172 } = slot_;
5173 }
5174
5175 let _field = width.as_mut();
5176
5177 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
5178
5179 let _field = height.as_mut();
5180
5181 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5182
5183 Ok(())
5184 }
5185 }
5186
5187 impl ::fidl_next::IntoNatural for Size {
5188 type Natural = crate::natural::Size;
5189 }
5190
5191 #[derive(Clone, Debug)]
5193 #[repr(C)]
5194 pub struct SizeF {
5195 pub width: ::fidl_next::wire::Float32,
5196
5197 pub height: ::fidl_next::wire::Float32,
5198 }
5199
5200 static_assertions::const_assert_eq!(std::mem::size_of::<SizeF>(), 8);
5201 static_assertions::const_assert_eq!(std::mem::align_of::<SizeF>(), 4);
5202
5203 static_assertions::const_assert_eq!(std::mem::offset_of!(SizeF, width), 0);
5204
5205 static_assertions::const_assert_eq!(std::mem::offset_of!(SizeF, height), 4);
5206
5207 impl ::fidl_next::Constrained for SizeF {
5208 type Constraint = ();
5209
5210 fn validate(
5211 _: ::fidl_next::Slot<'_, Self>,
5212 _: Self::Constraint,
5213 ) -> Result<(), ::fidl_next::ValidationError> {
5214 Ok(())
5215 }
5216 }
5217
5218 unsafe impl ::fidl_next::Wire for SizeF {
5219 type Narrowed<'de> = SizeF;
5220
5221 #[inline]
5222 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5223 ::fidl_next::munge! {
5224 let Self {
5225 width,
5226 height,
5227
5228 } = &mut *out_;
5229 }
5230
5231 ::fidl_next::Wire::zero_padding(width);
5232
5233 ::fidl_next::Wire::zero_padding(height);
5234 }
5235 }
5236
5237 unsafe impl<___D> ::fidl_next::Decode<___D> for SizeF
5238 where
5239 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5240 {
5241 fn decode(
5242 slot_: ::fidl_next::Slot<'_, Self>,
5243 decoder_: &mut ___D,
5244 _: (),
5245 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5246 ::fidl_next::munge! {
5247 let Self {
5248 mut width,
5249 mut height,
5250
5251 } = slot_;
5252 }
5253
5254 let _field = width.as_mut();
5255
5256 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
5257
5258 let _field = height.as_mut();
5259
5260 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5261
5262 Ok(())
5263 }
5264 }
5265
5266 impl ::fidl_next::IntoNatural for SizeF {
5267 type Natural = crate::natural::SizeF;
5268 }
5269
5270 #[derive(Clone, Debug)]
5272 #[repr(C)]
5273 pub struct SizeU {
5274 pub width: ::fidl_next::wire::Uint32,
5275
5276 pub height: ::fidl_next::wire::Uint32,
5277 }
5278
5279 static_assertions::const_assert_eq!(std::mem::size_of::<SizeU>(), 8);
5280 static_assertions::const_assert_eq!(std::mem::align_of::<SizeU>(), 4);
5281
5282 static_assertions::const_assert_eq!(std::mem::offset_of!(SizeU, width), 0);
5283
5284 static_assertions::const_assert_eq!(std::mem::offset_of!(SizeU, height), 4);
5285
5286 impl ::fidl_next::Constrained for SizeU {
5287 type Constraint = ();
5288
5289 fn validate(
5290 _: ::fidl_next::Slot<'_, Self>,
5291 _: Self::Constraint,
5292 ) -> Result<(), ::fidl_next::ValidationError> {
5293 Ok(())
5294 }
5295 }
5296
5297 unsafe impl ::fidl_next::Wire for SizeU {
5298 type Narrowed<'de> = SizeU;
5299
5300 #[inline]
5301 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5302 ::fidl_next::munge! {
5303 let Self {
5304 width,
5305 height,
5306
5307 } = &mut *out_;
5308 }
5309
5310 ::fidl_next::Wire::zero_padding(width);
5311
5312 ::fidl_next::Wire::zero_padding(height);
5313 }
5314 }
5315
5316 unsafe impl<___D> ::fidl_next::Decode<___D> for SizeU
5317 where
5318 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5319 {
5320 fn decode(
5321 slot_: ::fidl_next::Slot<'_, Self>,
5322 decoder_: &mut ___D,
5323 _: (),
5324 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5325 ::fidl_next::munge! {
5326 let Self {
5327 mut width,
5328 mut height,
5329
5330 } = slot_;
5331 }
5332
5333 let _field = width.as_mut();
5334
5335 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
5336
5337 let _field = height.as_mut();
5338
5339 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5340
5341 Ok(())
5342 }
5343 }
5344
5345 impl ::fidl_next::IntoNatural for SizeU {
5346 type Natural = crate::natural::SizeU;
5347 }
5348
5349 #[derive(Clone, Debug)]
5351 #[repr(C)]
5352 pub struct Transform {
5353 pub matrix: [::fidl_next::wire::Float32; 16],
5354 }
5355
5356 static_assertions::const_assert_eq!(std::mem::size_of::<Transform>(), 64);
5357 static_assertions::const_assert_eq!(std::mem::align_of::<Transform>(), 4);
5358
5359 static_assertions::const_assert_eq!(std::mem::offset_of!(Transform, matrix), 0);
5360
5361 impl ::fidl_next::Constrained for Transform {
5362 type Constraint = ();
5363
5364 fn validate(
5365 _: ::fidl_next::Slot<'_, Self>,
5366 _: Self::Constraint,
5367 ) -> Result<(), ::fidl_next::ValidationError> {
5368 Ok(())
5369 }
5370 }
5371
5372 unsafe impl ::fidl_next::Wire for Transform {
5373 type Narrowed<'de> = Transform;
5374
5375 #[inline]
5376 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5377 ::fidl_next::munge! {
5378 let Self {
5379 matrix,
5380
5381 } = &mut *out_;
5382 }
5383
5384 ::fidl_next::Wire::zero_padding(matrix);
5385 }
5386 }
5387
5388 unsafe impl<___D> ::fidl_next::Decode<___D> for Transform
5389 where
5390 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5391 {
5392 fn decode(
5393 slot_: ::fidl_next::Slot<'_, Self>,
5394 decoder_: &mut ___D,
5395 _: (),
5396 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5397 ::fidl_next::munge! {
5398 let Self {
5399 mut matrix,
5400
5401 } = slot_;
5402 }
5403
5404 let _field = matrix.as_mut();
5405
5406 ::fidl_next::Decode::decode(matrix.as_mut(), decoder_, ())?;
5407
5408 Ok(())
5409 }
5410 }
5411
5412 impl ::fidl_next::IntoNatural for Transform {
5413 type Natural = crate::natural::Transform;
5414 }
5415
5416 #[derive(Clone, Debug)]
5418 #[repr(C)]
5419 pub struct Vec {
5420 pub x: ::fidl_next::wire::Int32,
5421
5422 pub y: ::fidl_next::wire::Int32,
5423 }
5424
5425 static_assertions::const_assert_eq!(std::mem::size_of::<Vec>(), 8);
5426 static_assertions::const_assert_eq!(std::mem::align_of::<Vec>(), 4);
5427
5428 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec, x), 0);
5429
5430 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec, y), 4);
5431
5432 impl ::fidl_next::Constrained for Vec {
5433 type Constraint = ();
5434
5435 fn validate(
5436 _: ::fidl_next::Slot<'_, Self>,
5437 _: Self::Constraint,
5438 ) -> Result<(), ::fidl_next::ValidationError> {
5439 Ok(())
5440 }
5441 }
5442
5443 unsafe impl ::fidl_next::Wire for Vec {
5444 type Narrowed<'de> = Vec;
5445
5446 #[inline]
5447 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5448 ::fidl_next::munge! {
5449 let Self {
5450 x,
5451 y,
5452
5453 } = &mut *out_;
5454 }
5455
5456 ::fidl_next::Wire::zero_padding(x);
5457
5458 ::fidl_next::Wire::zero_padding(y);
5459 }
5460 }
5461
5462 unsafe impl<___D> ::fidl_next::Decode<___D> for Vec
5463 where
5464 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5465 {
5466 fn decode(
5467 slot_: ::fidl_next::Slot<'_, Self>,
5468 decoder_: &mut ___D,
5469 _: (),
5470 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5471 ::fidl_next::munge! {
5472 let Self {
5473 mut x,
5474 mut y,
5475
5476 } = slot_;
5477 }
5478
5479 let _field = x.as_mut();
5480
5481 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
5482
5483 let _field = y.as_mut();
5484
5485 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
5486
5487 Ok(())
5488 }
5489 }
5490
5491 impl ::fidl_next::IntoNatural for Vec {
5492 type Natural = crate::natural::Vec;
5493 }
5494
5495 #[derive(Clone, Debug)]
5497 #[repr(C)]
5498 pub struct Vec3F {
5499 pub x: ::fidl_next::wire::Float32,
5500
5501 pub y: ::fidl_next::wire::Float32,
5502
5503 pub z: ::fidl_next::wire::Float32,
5504 }
5505
5506 static_assertions::const_assert_eq!(std::mem::size_of::<Vec3F>(), 12);
5507 static_assertions::const_assert_eq!(std::mem::align_of::<Vec3F>(), 4);
5508
5509 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec3F, x), 0);
5510
5511 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec3F, y), 4);
5512
5513 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec3F, z), 8);
5514
5515 impl ::fidl_next::Constrained for Vec3F {
5516 type Constraint = ();
5517
5518 fn validate(
5519 _: ::fidl_next::Slot<'_, Self>,
5520 _: Self::Constraint,
5521 ) -> Result<(), ::fidl_next::ValidationError> {
5522 Ok(())
5523 }
5524 }
5525
5526 unsafe impl ::fidl_next::Wire for Vec3F {
5527 type Narrowed<'de> = Vec3F;
5528
5529 #[inline]
5530 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5531 ::fidl_next::munge! {
5532 let Self {
5533 x,
5534 y,
5535 z,
5536
5537 } = &mut *out_;
5538 }
5539
5540 ::fidl_next::Wire::zero_padding(x);
5541
5542 ::fidl_next::Wire::zero_padding(y);
5543
5544 ::fidl_next::Wire::zero_padding(z);
5545 }
5546 }
5547
5548 unsafe impl<___D> ::fidl_next::Decode<___D> for Vec3F
5549 where
5550 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5551 {
5552 fn decode(
5553 slot_: ::fidl_next::Slot<'_, Self>,
5554 decoder_: &mut ___D,
5555 _: (),
5556 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5557 ::fidl_next::munge! {
5558 let Self {
5559 mut x,
5560 mut y,
5561 mut z,
5562
5563 } = slot_;
5564 }
5565
5566 let _field = x.as_mut();
5567
5568 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
5569
5570 let _field = y.as_mut();
5571
5572 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
5573
5574 let _field = z.as_mut();
5575
5576 ::fidl_next::Decode::decode(z.as_mut(), decoder_, ())?;
5577
5578 Ok(())
5579 }
5580 }
5581
5582 impl ::fidl_next::IntoNatural for Vec3F {
5583 type Natural = crate::natural::Vec3F;
5584 }
5585
5586 #[derive(Clone, Debug)]
5588 #[repr(C)]
5589 pub struct VecF {
5590 pub x: ::fidl_next::wire::Float32,
5591
5592 pub y: ::fidl_next::wire::Float32,
5593 }
5594
5595 static_assertions::const_assert_eq!(std::mem::size_of::<VecF>(), 8);
5596 static_assertions::const_assert_eq!(std::mem::align_of::<VecF>(), 4);
5597
5598 static_assertions::const_assert_eq!(std::mem::offset_of!(VecF, x), 0);
5599
5600 static_assertions::const_assert_eq!(std::mem::offset_of!(VecF, y), 4);
5601
5602 impl ::fidl_next::Constrained for VecF {
5603 type Constraint = ();
5604
5605 fn validate(
5606 _: ::fidl_next::Slot<'_, Self>,
5607 _: Self::Constraint,
5608 ) -> Result<(), ::fidl_next::ValidationError> {
5609 Ok(())
5610 }
5611 }
5612
5613 unsafe impl ::fidl_next::Wire for VecF {
5614 type Narrowed<'de> = VecF;
5615
5616 #[inline]
5617 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5618 ::fidl_next::munge! {
5619 let Self {
5620 x,
5621 y,
5622
5623 } = &mut *out_;
5624 }
5625
5626 ::fidl_next::Wire::zero_padding(x);
5627
5628 ::fidl_next::Wire::zero_padding(y);
5629 }
5630 }
5631
5632 unsafe impl<___D> ::fidl_next::Decode<___D> for VecF
5633 where
5634 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5635 {
5636 fn decode(
5637 slot_: ::fidl_next::Slot<'_, Self>,
5638 decoder_: &mut ___D,
5639 _: (),
5640 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5641 ::fidl_next::munge! {
5642 let Self {
5643 mut x,
5644 mut y,
5645
5646 } = slot_;
5647 }
5648
5649 let _field = x.as_mut();
5650
5651 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
5652
5653 let _field = y.as_mut();
5654
5655 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
5656
5657 Ok(())
5658 }
5659 }
5660
5661 impl ::fidl_next::IntoNatural for VecF {
5662 type Natural = crate::natural::VecF;
5663 }
5664}
5665
5666pub mod wire_optional {}
5667
5668pub mod generic {
5669
5670 pub struct Inset<T0, T1, T2, T3> {
5672 pub top: T0,
5673
5674 pub right: T1,
5675
5676 pub bottom: T2,
5677
5678 pub left: T3,
5679 }
5680
5681 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::Inset, ___E>
5682 for Inset<T0, T1, T2, T3>
5683 where
5684 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5685 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5686 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5687 T2: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5688 T3: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5689 {
5690 #[inline]
5691 fn encode(
5692 self,
5693 encoder_: &mut ___E,
5694 out_: &mut ::core::mem::MaybeUninit<crate::wire::Inset>,
5695 _: (),
5696 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5697 ::fidl_next::munge! {
5698 let crate::wire::Inset {
5699 top,
5700 right,
5701 bottom,
5702 left,
5703
5704 } = out_;
5705 }
5706
5707 ::fidl_next::Encode::encode(self.top, encoder_, top, ())?;
5708
5709 ::fidl_next::Encode::encode(self.right, encoder_, right, ())?;
5710
5711 ::fidl_next::Encode::encode(self.bottom, encoder_, bottom, ())?;
5712
5713 ::fidl_next::Encode::encode(self.left, encoder_, left, ())?;
5714
5715 Ok(())
5716 }
5717 }
5718
5719 pub struct InsetF<T0, T1, T2, T3> {
5721 pub top: T0,
5722
5723 pub right: T1,
5724
5725 pub bottom: T2,
5726
5727 pub left: T3,
5728 }
5729
5730 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::InsetF, ___E>
5731 for InsetF<T0, T1, T2, T3>
5732 where
5733 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5734 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5735 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5736 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5737 T3: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5738 {
5739 #[inline]
5740 fn encode(
5741 self,
5742 encoder_: &mut ___E,
5743 out_: &mut ::core::mem::MaybeUninit<crate::wire::InsetF>,
5744 _: (),
5745 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5746 ::fidl_next::munge! {
5747 let crate::wire::InsetF {
5748 top,
5749 right,
5750 bottom,
5751 left,
5752
5753 } = out_;
5754 }
5755
5756 ::fidl_next::Encode::encode(self.top, encoder_, top, ())?;
5757
5758 ::fidl_next::Encode::encode(self.right, encoder_, right, ())?;
5759
5760 ::fidl_next::Encode::encode(self.bottom, encoder_, bottom, ())?;
5761
5762 ::fidl_next::Encode::encode(self.left, encoder_, left, ())?;
5763
5764 Ok(())
5765 }
5766 }
5767
5768 pub struct Point<T0, T1> {
5770 pub x: T0,
5771
5772 pub y: T1,
5773 }
5774
5775 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Point, ___E> for Point<T0, T1>
5776 where
5777 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5778 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5779 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5780 {
5781 #[inline]
5782 fn encode(
5783 self,
5784 encoder_: &mut ___E,
5785 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
5786 _: (),
5787 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5788 ::fidl_next::munge! {
5789 let crate::wire::Point {
5790 x,
5791 y,
5792
5793 } = out_;
5794 }
5795
5796 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
5797
5798 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
5799
5800 Ok(())
5801 }
5802 }
5803
5804 pub struct Point3F<T0, T1, T2> {
5806 pub x: T0,
5807
5808 pub y: T1,
5809
5810 pub z: T2,
5811 }
5812
5813 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Point3F, ___E>
5814 for Point3F<T0, T1, T2>
5815 where
5816 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5817 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5818 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5819 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5820 {
5821 #[inline]
5822 fn encode(
5823 self,
5824 encoder_: &mut ___E,
5825 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point3F>,
5826 _: (),
5827 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5828 ::fidl_next::munge! {
5829 let crate::wire::Point3F {
5830 x,
5831 y,
5832 z,
5833
5834 } = out_;
5835 }
5836
5837 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
5838
5839 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
5840
5841 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
5842
5843 Ok(())
5844 }
5845 }
5846
5847 pub struct PointF<T0, T1> {
5849 pub x: T0,
5850
5851 pub y: T1,
5852 }
5853
5854 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::PointF, ___E> for PointF<T0, T1>
5855 where
5856 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5857 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5858 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5859 {
5860 #[inline]
5861 fn encode(
5862 self,
5863 encoder_: &mut ___E,
5864 out_: &mut ::core::mem::MaybeUninit<crate::wire::PointF>,
5865 _: (),
5866 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5867 ::fidl_next::munge! {
5868 let crate::wire::PointF {
5869 x,
5870 y,
5871
5872 } = out_;
5873 }
5874
5875 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
5876
5877 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
5878
5879 Ok(())
5880 }
5881 }
5882
5883 pub struct Vec4F<T0, T1, T2, T3> {
5885 pub x: T0,
5886
5887 pub y: T1,
5888
5889 pub z: T2,
5890
5891 pub w: T3,
5892 }
5893
5894 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::Vec4F, ___E>
5895 for Vec4F<T0, T1, T2, T3>
5896 where
5897 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5898 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5899 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5900 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5901 T3: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5902 {
5903 #[inline]
5904 fn encode(
5905 self,
5906 encoder_: &mut ___E,
5907 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec4F>,
5908 _: (),
5909 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5910 ::fidl_next::munge! {
5911 let crate::wire::Vec4F {
5912 x,
5913 y,
5914 z,
5915 w,
5916
5917 } = out_;
5918 }
5919
5920 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
5921
5922 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
5923
5924 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
5925
5926 ::fidl_next::Encode::encode(self.w, encoder_, w, ())?;
5927
5928 Ok(())
5929 }
5930 }
5931
5932 pub struct RRectF<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> {
5934 pub x: T0,
5935
5936 pub y: T1,
5937
5938 pub width: T2,
5939
5940 pub height: T3,
5941
5942 pub top_left_radius_x: T4,
5943
5944 pub top_left_radius_y: T5,
5945
5946 pub top_right_radius_x: T6,
5947
5948 pub top_right_radius_y: T7,
5949
5950 pub bottom_left_radius_x: T8,
5951
5952 pub bottom_left_radius_y: T9,
5953
5954 pub bottom_right_radius_x: T10,
5955
5956 pub bottom_right_radius_y: T11,
5957 }
5958
5959 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
5960 ::fidl_next::Encode<crate::wire::RRectF, ___E>
5961 for RRectF<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
5962 where
5963 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5964 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5965 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5966 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5967 T3: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5968 T4: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5969 T5: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5970 T6: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5971 T7: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5972 T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5973 T9: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5974 T10: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5975 T11: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5976 {
5977 #[inline]
5978 fn encode(
5979 self,
5980 encoder_: &mut ___E,
5981 out_: &mut ::core::mem::MaybeUninit<crate::wire::RRectF>,
5982 _: (),
5983 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5984 ::fidl_next::munge! {
5985 let crate::wire::RRectF {
5986 x,
5987 y,
5988 width,
5989 height,
5990 top_left_radius_x,
5991 top_left_radius_y,
5992 top_right_radius_x,
5993 top_right_radius_y,
5994 bottom_left_radius_x,
5995 bottom_left_radius_y,
5996 bottom_right_radius_x,
5997 bottom_right_radius_y,
5998
5999 } = out_;
6000 }
6001
6002 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6003
6004 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6005
6006 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6007
6008 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6009
6010 ::fidl_next::Encode::encode(self.top_left_radius_x, encoder_, top_left_radius_x, ())?;
6011
6012 ::fidl_next::Encode::encode(self.top_left_radius_y, encoder_, top_left_radius_y, ())?;
6013
6014 ::fidl_next::Encode::encode(self.top_right_radius_x, encoder_, top_right_radius_x, ())?;
6015
6016 ::fidl_next::Encode::encode(self.top_right_radius_y, encoder_, top_right_radius_y, ())?;
6017
6018 ::fidl_next::Encode::encode(
6019 self.bottom_left_radius_x,
6020 encoder_,
6021 bottom_left_radius_x,
6022 (),
6023 )?;
6024
6025 ::fidl_next::Encode::encode(
6026 self.bottom_left_radius_y,
6027 encoder_,
6028 bottom_left_radius_y,
6029 (),
6030 )?;
6031
6032 ::fidl_next::Encode::encode(
6033 self.bottom_right_radius_x,
6034 encoder_,
6035 bottom_right_radius_x,
6036 (),
6037 )?;
6038
6039 ::fidl_next::Encode::encode(
6040 self.bottom_right_radius_y,
6041 encoder_,
6042 bottom_right_radius_y,
6043 (),
6044 )?;
6045
6046 Ok(())
6047 }
6048 }
6049
6050 pub struct RatioU32<T0, T1> {
6052 pub numerator: T0,
6053
6054 pub denominator: T1,
6055 }
6056
6057 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::RatioU32, ___E> for RatioU32<T0, T1>
6058 where
6059 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6060 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6061 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6062 {
6063 #[inline]
6064 fn encode(
6065 self,
6066 encoder_: &mut ___E,
6067 out_: &mut ::core::mem::MaybeUninit<crate::wire::RatioU32>,
6068 _: (),
6069 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6070 ::fidl_next::munge! {
6071 let crate::wire::RatioU32 {
6072 numerator,
6073 denominator,
6074
6075 } = out_;
6076 }
6077
6078 ::fidl_next::Encode::encode(self.numerator, encoder_, numerator, ())?;
6079
6080 ::fidl_next::Encode::encode(self.denominator, encoder_, denominator, ())?;
6081
6082 Ok(())
6083 }
6084 }
6085
6086 pub struct RatioU64<T0, T1> {
6088 pub numerator: T0,
6089
6090 pub denominator: T1,
6091 }
6092
6093 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::RatioU64, ___E> for RatioU64<T0, T1>
6094 where
6095 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6096 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
6097 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
6098 {
6099 #[inline]
6100 fn encode(
6101 self,
6102 encoder_: &mut ___E,
6103 out_: &mut ::core::mem::MaybeUninit<crate::wire::RatioU64>,
6104 _: (),
6105 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6106 ::fidl_next::munge! {
6107 let crate::wire::RatioU64 {
6108 numerator,
6109 denominator,
6110
6111 } = out_;
6112 }
6113
6114 ::fidl_next::Encode::encode(self.numerator, encoder_, numerator, ())?;
6115
6116 ::fidl_next::Encode::encode(self.denominator, encoder_, denominator, ())?;
6117
6118 Ok(())
6119 }
6120 }
6121
6122 pub struct Rect<T0, T1, T2, T3> {
6124 pub x: T0,
6125
6126 pub y: T1,
6127
6128 pub width: T2,
6129
6130 pub height: T3,
6131 }
6132
6133 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::Rect, ___E>
6134 for Rect<T0, T1, T2, T3>
6135 where
6136 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6137 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6138 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6139 T2: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6140 T3: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6141 {
6142 #[inline]
6143 fn encode(
6144 self,
6145 encoder_: &mut ___E,
6146 out_: &mut ::core::mem::MaybeUninit<crate::wire::Rect>,
6147 _: (),
6148 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6149 ::fidl_next::munge! {
6150 let crate::wire::Rect {
6151 x,
6152 y,
6153 width,
6154 height,
6155
6156 } = out_;
6157 }
6158
6159 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6160
6161 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6162
6163 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6164
6165 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6166
6167 Ok(())
6168 }
6169 }
6170
6171 pub struct RectF<T0, T1, T2, T3> {
6173 pub x: T0,
6174
6175 pub y: T1,
6176
6177 pub width: T2,
6178
6179 pub height: T3,
6180 }
6181
6182 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::RectF, ___E>
6183 for RectF<T0, T1, T2, T3>
6184 where
6185 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6186 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6187 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6188 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6189 T3: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6190 {
6191 #[inline]
6192 fn encode(
6193 self,
6194 encoder_: &mut ___E,
6195 out_: &mut ::core::mem::MaybeUninit<crate::wire::RectF>,
6196 _: (),
6197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6198 ::fidl_next::munge! {
6199 let crate::wire::RectF {
6200 x,
6201 y,
6202 width,
6203 height,
6204
6205 } = out_;
6206 }
6207
6208 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6209
6210 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6211
6212 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6213
6214 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6215
6216 Ok(())
6217 }
6218 }
6219
6220 pub struct RectU<T0, T1, T2, T3> {
6222 pub x: T0,
6223
6224 pub y: T1,
6225
6226 pub width: T2,
6227
6228 pub height: T3,
6229 }
6230
6231 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::RectU, ___E>
6232 for RectU<T0, T1, T2, T3>
6233 where
6234 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6235 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6236 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6237 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6238 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6239 {
6240 #[inline]
6241 fn encode(
6242 self,
6243 encoder_: &mut ___E,
6244 out_: &mut ::core::mem::MaybeUninit<crate::wire::RectU>,
6245 _: (),
6246 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6247 ::fidl_next::munge! {
6248 let crate::wire::RectU {
6249 x,
6250 y,
6251 width,
6252 height,
6253
6254 } = out_;
6255 }
6256
6257 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6258
6259 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6260
6261 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6262
6263 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6264
6265 Ok(())
6266 }
6267 }
6268
6269 pub struct Size<T0, T1> {
6271 pub width: T0,
6272
6273 pub height: T1,
6274 }
6275
6276 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Size, ___E> for Size<T0, T1>
6277 where
6278 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6279 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6280 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6281 {
6282 #[inline]
6283 fn encode(
6284 self,
6285 encoder_: &mut ___E,
6286 out_: &mut ::core::mem::MaybeUninit<crate::wire::Size>,
6287 _: (),
6288 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6289 ::fidl_next::munge! {
6290 let crate::wire::Size {
6291 width,
6292 height,
6293
6294 } = out_;
6295 }
6296
6297 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6298
6299 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6300
6301 Ok(())
6302 }
6303 }
6304
6305 pub struct SizeF<T0, T1> {
6307 pub width: T0,
6308
6309 pub height: T1,
6310 }
6311
6312 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SizeF, ___E> for SizeF<T0, T1>
6313 where
6314 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6315 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6316 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6317 {
6318 #[inline]
6319 fn encode(
6320 self,
6321 encoder_: &mut ___E,
6322 out_: &mut ::core::mem::MaybeUninit<crate::wire::SizeF>,
6323 _: (),
6324 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6325 ::fidl_next::munge! {
6326 let crate::wire::SizeF {
6327 width,
6328 height,
6329
6330 } = out_;
6331 }
6332
6333 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6334
6335 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6336
6337 Ok(())
6338 }
6339 }
6340
6341 pub struct SizeU<T0, T1> {
6343 pub width: T0,
6344
6345 pub height: T1,
6346 }
6347
6348 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SizeU, ___E> for SizeU<T0, T1>
6349 where
6350 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6351 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6352 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6353 {
6354 #[inline]
6355 fn encode(
6356 self,
6357 encoder_: &mut ___E,
6358 out_: &mut ::core::mem::MaybeUninit<crate::wire::SizeU>,
6359 _: (),
6360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6361 ::fidl_next::munge! {
6362 let crate::wire::SizeU {
6363 width,
6364 height,
6365
6366 } = out_;
6367 }
6368
6369 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6370
6371 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6372
6373 Ok(())
6374 }
6375 }
6376
6377 pub struct Transform<T0> {
6379 pub matrix: T0,
6380 }
6381
6382 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::Transform, ___E> for Transform<T0>
6383 where
6384 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6385 T0: ::fidl_next::Encode<[::fidl_next::wire::Float32; 16], ___E>,
6386 {
6387 #[inline]
6388 fn encode(
6389 self,
6390 encoder_: &mut ___E,
6391 out_: &mut ::core::mem::MaybeUninit<crate::wire::Transform>,
6392 _: (),
6393 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6394 ::fidl_next::munge! {
6395 let crate::wire::Transform {
6396 matrix,
6397
6398 } = out_;
6399 }
6400
6401 ::fidl_next::Encode::encode(self.matrix, encoder_, matrix, ())?;
6402
6403 Ok(())
6404 }
6405 }
6406
6407 pub struct Vec<T0, T1> {
6409 pub x: T0,
6410
6411 pub y: T1,
6412 }
6413
6414 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Vec, ___E> for Vec<T0, T1>
6415 where
6416 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6417 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6418 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6419 {
6420 #[inline]
6421 fn encode(
6422 self,
6423 encoder_: &mut ___E,
6424 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec>,
6425 _: (),
6426 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6427 ::fidl_next::munge! {
6428 let crate::wire::Vec {
6429 x,
6430 y,
6431
6432 } = out_;
6433 }
6434
6435 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6436
6437 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6438
6439 Ok(())
6440 }
6441 }
6442
6443 pub struct Vec3F<T0, T1, T2> {
6445 pub x: T0,
6446
6447 pub y: T1,
6448
6449 pub z: T2,
6450 }
6451
6452 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Vec3F, ___E> for Vec3F<T0, T1, T2>
6453 where
6454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6455 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6456 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6457 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6458 {
6459 #[inline]
6460 fn encode(
6461 self,
6462 encoder_: &mut ___E,
6463 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec3F>,
6464 _: (),
6465 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6466 ::fidl_next::munge! {
6467 let crate::wire::Vec3F {
6468 x,
6469 y,
6470 z,
6471
6472 } = out_;
6473 }
6474
6475 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6476
6477 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6478
6479 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
6480
6481 Ok(())
6482 }
6483 }
6484
6485 pub struct VecF<T0, T1> {
6487 pub x: T0,
6488
6489 pub y: T1,
6490 }
6491
6492 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::VecF, ___E> for VecF<T0, T1>
6493 where
6494 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6495 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6496 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6497 {
6498 #[inline]
6499 fn encode(
6500 self,
6501 encoder_: &mut ___E,
6502 out_: &mut ::core::mem::MaybeUninit<crate::wire::VecF>,
6503 _: (),
6504 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6505 ::fidl_next::munge! {
6506 let crate::wire::VecF {
6507 x,
6508 y,
6509
6510 } = out_;
6511 }
6512
6513 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6514
6515 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6516
6517 Ok(())
6518 }
6519 }
6520}
6521
6522pub use self::natural::*;