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> = unsafe {
3325 ::fidl_next::CopyOptimization::enable_if(
3326 true && <[f32; 16] as ::fidl_next::FromWire<
3327 [::fidl_next::wire::Float32; 16],
3328 >>::COPY_OPTIMIZATION
3329 .is_enabled(),
3330 )
3331 };
3332
3333 #[inline]
3334 fn from_wire(wire: crate::wire::Transform) -> Self {
3335 Self { matrix: ::fidl_next::FromWire::from_wire(wire.matrix) }
3336 }
3337 }
3338
3339 impl ::fidl_next::FromWireRef<crate::wire::Transform> for Transform {
3340 #[inline]
3341 fn from_wire_ref(wire: &crate::wire::Transform) -> Self {
3342 Self { matrix: ::fidl_next::FromWireRef::from_wire_ref(&wire.matrix) }
3343 }
3344 }
3345
3346 #[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"]
3347 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3348 #[repr(C)]
3349 pub struct Vec {
3350 pub x: i32,
3351
3352 pub y: i32,
3353 }
3354
3355 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Vec, ___E> for Vec
3356 where
3357 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3358 {
3359 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Vec> = unsafe {
3360 ::fidl_next::CopyOptimization::enable_if(
3361 true
3362
3363 && <
3364 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
3365 >::COPY_OPTIMIZATION.is_enabled()
3366
3367 && <
3368 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
3369 >::COPY_OPTIMIZATION.is_enabled()
3370
3371 )
3372 };
3373
3374 #[inline]
3375 fn encode(
3376 self,
3377 encoder_: &mut ___E,
3378 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec>,
3379 _: (),
3380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3381 ::fidl_next::munge! {
3382 let crate::wire::Vec {
3383 x,
3384 y,
3385
3386 } = out_;
3387 }
3388
3389 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
3390
3391 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3392
3393 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
3394
3395 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3396
3397 Ok(())
3398 }
3399 }
3400
3401 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Vec, ___E> for &'a Vec
3402 where
3403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3404 {
3405 #[inline]
3406 fn encode(
3407 self,
3408 encoder_: &mut ___E,
3409 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec>,
3410 _: (),
3411 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3412 ::fidl_next::munge! {
3413 let crate::wire::Vec {
3414 x,
3415 y,
3416
3417 } = out_;
3418 }
3419
3420 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
3421
3422 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3423
3424 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
3425
3426 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3427
3428 Ok(())
3429 }
3430 }
3431
3432 unsafe impl<___E>
3433 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec>, ___E> for Vec
3434 where
3435 ___E: ::fidl_next::Encoder + ?Sized,
3436 Vec: ::fidl_next::Encode<crate::wire::Vec, ___E>,
3437 {
3438 #[inline]
3439 fn encode_option(
3440 this: ::core::option::Option<Self>,
3441 encoder: &mut ___E,
3442 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec>>,
3443 _: (),
3444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3445 if let Some(inner) = this {
3446 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3447 ::fidl_next::wire::Box::encode_present(out);
3448 } else {
3449 ::fidl_next::wire::Box::encode_absent(out);
3450 }
3451
3452 Ok(())
3453 }
3454 }
3455
3456 unsafe impl<'a, ___E>
3457 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec>, ___E>
3458 for &'a Vec
3459 where
3460 ___E: ::fidl_next::Encoder + ?Sized,
3461 &'a Vec: ::fidl_next::Encode<crate::wire::Vec, ___E>,
3462 {
3463 #[inline]
3464 fn encode_option(
3465 this: ::core::option::Option<Self>,
3466 encoder: &mut ___E,
3467 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec>>,
3468 _: (),
3469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3470 if let Some(inner) = this {
3471 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3472 ::fidl_next::wire::Box::encode_present(out);
3473 } else {
3474 ::fidl_next::wire::Box::encode_absent(out);
3475 }
3476
3477 Ok(())
3478 }
3479 }
3480
3481 impl ::fidl_next::FromWire<crate::wire::Vec> for Vec {
3482 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Vec, Self> = unsafe {
3483 ::fidl_next::CopyOptimization::enable_if(
3484 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
3485 .is_enabled()
3486 && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
3487 .is_enabled(),
3488 )
3489 };
3490
3491 #[inline]
3492 fn from_wire(wire: crate::wire::Vec) -> Self {
3493 Self {
3494 x: ::fidl_next::FromWire::from_wire(wire.x),
3495
3496 y: ::fidl_next::FromWire::from_wire(wire.y),
3497 }
3498 }
3499 }
3500
3501 impl ::fidl_next::FromWireRef<crate::wire::Vec> for Vec {
3502 #[inline]
3503 fn from_wire_ref(wire: &crate::wire::Vec) -> Self {
3504 Self {
3505 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
3506
3507 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
3508 }
3509 }
3510 }
3511
3512 #[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"]
3513 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
3514 #[repr(C)]
3515 pub struct Vec3F {
3516 pub x: f32,
3517
3518 pub y: f32,
3519
3520 pub z: f32,
3521 }
3522
3523 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Vec3F, ___E> for Vec3F
3524 where
3525 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3526 {
3527 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Vec3F> = unsafe {
3528 ::fidl_next::CopyOptimization::enable_if(
3529 true
3530
3531 && <
3532 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3533 >::COPY_OPTIMIZATION.is_enabled()
3534
3535 && <
3536 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3537 >::COPY_OPTIMIZATION.is_enabled()
3538
3539 && <
3540 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3541 >::COPY_OPTIMIZATION.is_enabled()
3542
3543 )
3544 };
3545
3546 #[inline]
3547 fn encode(
3548 self,
3549 encoder_: &mut ___E,
3550 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec3F>,
3551 _: (),
3552 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3553 ::fidl_next::munge! {
3554 let crate::wire::Vec3F {
3555 x,
3556 y,
3557 z,
3558
3559 } = out_;
3560 }
3561
3562 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
3563
3564 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3565
3566 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
3567
3568 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3569
3570 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
3571
3572 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(z.as_mut_ptr()) };
3573
3574 Ok(())
3575 }
3576 }
3577
3578 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Vec3F, ___E> for &'a Vec3F
3579 where
3580 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3581 {
3582 #[inline]
3583 fn encode(
3584 self,
3585 encoder_: &mut ___E,
3586 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec3F>,
3587 _: (),
3588 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3589 ::fidl_next::munge! {
3590 let crate::wire::Vec3F {
3591 x,
3592 y,
3593 z,
3594
3595 } = out_;
3596 }
3597
3598 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
3599
3600 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3601
3602 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
3603
3604 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3605
3606 ::fidl_next::Encode::encode(&self.z, encoder_, z, ())?;
3607
3608 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(z.as_mut_ptr()) };
3609
3610 Ok(())
3611 }
3612 }
3613
3614 unsafe impl<___E>
3615 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec3F>, ___E>
3616 for Vec3F
3617 where
3618 ___E: ::fidl_next::Encoder + ?Sized,
3619 Vec3F: ::fidl_next::Encode<crate::wire::Vec3F, ___E>,
3620 {
3621 #[inline]
3622 fn encode_option(
3623 this: ::core::option::Option<Self>,
3624 encoder: &mut ___E,
3625 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec3F>>,
3626 _: (),
3627 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3628 if let Some(inner) = this {
3629 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3630 ::fidl_next::wire::Box::encode_present(out);
3631 } else {
3632 ::fidl_next::wire::Box::encode_absent(out);
3633 }
3634
3635 Ok(())
3636 }
3637 }
3638
3639 unsafe impl<'a, ___E>
3640 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Vec3F>, ___E>
3641 for &'a Vec3F
3642 where
3643 ___E: ::fidl_next::Encoder + ?Sized,
3644 &'a Vec3F: ::fidl_next::Encode<crate::wire::Vec3F, ___E>,
3645 {
3646 #[inline]
3647 fn encode_option(
3648 this: ::core::option::Option<Self>,
3649 encoder: &mut ___E,
3650 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Vec3F>>,
3651 _: (),
3652 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3653 if let Some(inner) = this {
3654 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3655 ::fidl_next::wire::Box::encode_present(out);
3656 } else {
3657 ::fidl_next::wire::Box::encode_absent(out);
3658 }
3659
3660 Ok(())
3661 }
3662 }
3663
3664 impl ::fidl_next::FromWire<crate::wire::Vec3F> for Vec3F {
3665 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Vec3F, Self> = unsafe {
3666 ::fidl_next::CopyOptimization::enable_if(
3667 true
3668
3669 && <
3670 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3671 >::COPY_OPTIMIZATION.is_enabled()
3672
3673 && <
3674 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3675 >::COPY_OPTIMIZATION.is_enabled()
3676
3677 && <
3678 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3679 >::COPY_OPTIMIZATION.is_enabled()
3680
3681 )
3682 };
3683
3684 #[inline]
3685 fn from_wire(wire: crate::wire::Vec3F) -> Self {
3686 Self {
3687 x: ::fidl_next::FromWire::from_wire(wire.x),
3688
3689 y: ::fidl_next::FromWire::from_wire(wire.y),
3690
3691 z: ::fidl_next::FromWire::from_wire(wire.z),
3692 }
3693 }
3694 }
3695
3696 impl ::fidl_next::FromWireRef<crate::wire::Vec3F> for Vec3F {
3697 #[inline]
3698 fn from_wire_ref(wire: &crate::wire::Vec3F) -> Self {
3699 Self {
3700 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
3701
3702 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
3703
3704 z: ::fidl_next::FromWireRef::from_wire_ref(&wire.z),
3705 }
3706 }
3707 }
3708
3709 #[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"]
3710 #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
3711 #[repr(C)]
3712 pub struct VecF {
3713 pub x: f32,
3714
3715 pub y: f32,
3716 }
3717
3718 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VecF, ___E> for VecF
3719 where
3720 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3721 {
3722 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::VecF> = unsafe {
3723 ::fidl_next::CopyOptimization::enable_if(
3724 true
3725
3726 && <
3727 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3728 >::COPY_OPTIMIZATION.is_enabled()
3729
3730 && <
3731 f32 as ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>
3732 >::COPY_OPTIMIZATION.is_enabled()
3733
3734 )
3735 };
3736
3737 #[inline]
3738 fn encode(
3739 self,
3740 encoder_: &mut ___E,
3741 out_: &mut ::core::mem::MaybeUninit<crate::wire::VecF>,
3742 _: (),
3743 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3744 ::fidl_next::munge! {
3745 let crate::wire::VecF {
3746 x,
3747 y,
3748
3749 } = out_;
3750 }
3751
3752 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
3753
3754 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3755
3756 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
3757
3758 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3759
3760 Ok(())
3761 }
3762 }
3763
3764 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VecF, ___E> for &'a VecF
3765 where
3766 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3767 {
3768 #[inline]
3769 fn encode(
3770 self,
3771 encoder_: &mut ___E,
3772 out_: &mut ::core::mem::MaybeUninit<crate::wire::VecF>,
3773 _: (),
3774 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3775 ::fidl_next::munge! {
3776 let crate::wire::VecF {
3777 x,
3778 y,
3779
3780 } = out_;
3781 }
3782
3783 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
3784
3785 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
3786
3787 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
3788
3789 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
3790
3791 Ok(())
3792 }
3793 }
3794
3795 unsafe impl<___E>
3796 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::VecF>, ___E> for VecF
3797 where
3798 ___E: ::fidl_next::Encoder + ?Sized,
3799 VecF: ::fidl_next::Encode<crate::wire::VecF, ___E>,
3800 {
3801 #[inline]
3802 fn encode_option(
3803 this: ::core::option::Option<Self>,
3804 encoder: &mut ___E,
3805 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::VecF>>,
3806 _: (),
3807 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3808 if let Some(inner) = this {
3809 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3810 ::fidl_next::wire::Box::encode_present(out);
3811 } else {
3812 ::fidl_next::wire::Box::encode_absent(out);
3813 }
3814
3815 Ok(())
3816 }
3817 }
3818
3819 unsafe impl<'a, ___E>
3820 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::VecF>, ___E>
3821 for &'a VecF
3822 where
3823 ___E: ::fidl_next::Encoder + ?Sized,
3824 &'a VecF: ::fidl_next::Encode<crate::wire::VecF, ___E>,
3825 {
3826 #[inline]
3827 fn encode_option(
3828 this: ::core::option::Option<Self>,
3829 encoder: &mut ___E,
3830 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::VecF>>,
3831 _: (),
3832 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3833 if let Some(inner) = this {
3834 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3835 ::fidl_next::wire::Box::encode_present(out);
3836 } else {
3837 ::fidl_next::wire::Box::encode_absent(out);
3838 }
3839
3840 Ok(())
3841 }
3842 }
3843
3844 impl ::fidl_next::FromWire<crate::wire::VecF> for VecF {
3845 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::VecF, Self> = unsafe {
3846 ::fidl_next::CopyOptimization::enable_if(
3847 true
3848
3849 && <
3850 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3851 >::COPY_OPTIMIZATION.is_enabled()
3852
3853 && <
3854 f32 as ::fidl_next::FromWire<::fidl_next::wire::Float32>
3855 >::COPY_OPTIMIZATION.is_enabled()
3856
3857 )
3858 };
3859
3860 #[inline]
3861 fn from_wire(wire: crate::wire::VecF) -> Self {
3862 Self {
3863 x: ::fidl_next::FromWire::from_wire(wire.x),
3864
3865 y: ::fidl_next::FromWire::from_wire(wire.y),
3866 }
3867 }
3868 }
3869
3870 impl ::fidl_next::FromWireRef<crate::wire::VecF> for VecF {
3871 #[inline]
3872 fn from_wire_ref(wire: &crate::wire::VecF) -> Self {
3873 Self {
3874 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
3875
3876 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
3877 }
3878 }
3879 }
3880}
3881
3882pub mod wire {
3883
3884 #[derive(Clone, Debug)]
3886 #[repr(C)]
3887 pub struct Inset {
3888 pub top: ::fidl_next::wire::Int32,
3889
3890 pub right: ::fidl_next::wire::Int32,
3891
3892 pub bottom: ::fidl_next::wire::Int32,
3893
3894 pub left: ::fidl_next::wire::Int32,
3895 }
3896
3897 static_assertions::const_assert_eq!(std::mem::size_of::<Inset>(), 16);
3898 static_assertions::const_assert_eq!(std::mem::align_of::<Inset>(), 4);
3899
3900 static_assertions::const_assert_eq!(std::mem::offset_of!(Inset, top), 0);
3901
3902 static_assertions::const_assert_eq!(std::mem::offset_of!(Inset, right), 4);
3903
3904 static_assertions::const_assert_eq!(std::mem::offset_of!(Inset, bottom), 8);
3905
3906 static_assertions::const_assert_eq!(std::mem::offset_of!(Inset, left), 12);
3907
3908 impl ::fidl_next::Constrained for Inset {
3909 type Constraint = ();
3910
3911 fn validate(
3912 _: ::fidl_next::Slot<'_, Self>,
3913 _: Self::Constraint,
3914 ) -> Result<(), ::fidl_next::ValidationError> {
3915 Ok(())
3916 }
3917 }
3918
3919 unsafe impl ::fidl_next::Wire for Inset {
3920 type Narrowed<'de> = Inset;
3921
3922 #[inline]
3923 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3924 ::fidl_next::munge! {
3925 let Self {
3926 top,
3927 right,
3928 bottom,
3929 left,
3930
3931 } = &mut *out_;
3932 }
3933
3934 ::fidl_next::Wire::zero_padding(top);
3935
3936 ::fidl_next::Wire::zero_padding(right);
3937
3938 ::fidl_next::Wire::zero_padding(bottom);
3939
3940 ::fidl_next::Wire::zero_padding(left);
3941 }
3942 }
3943
3944 unsafe impl<___D> ::fidl_next::Decode<___D> for Inset
3945 where
3946 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3947 {
3948 fn decode(
3949 slot_: ::fidl_next::Slot<'_, Self>,
3950 decoder_: &mut ___D,
3951 _: (),
3952 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3953 ::fidl_next::munge! {
3954 let Self {
3955 mut top,
3956 mut right,
3957 mut bottom,
3958 mut left,
3959
3960 } = slot_;
3961 }
3962
3963 let _field = top.as_mut();
3964
3965 ::fidl_next::Decode::decode(top.as_mut(), decoder_, ())?;
3966
3967 let _field = right.as_mut();
3968
3969 ::fidl_next::Decode::decode(right.as_mut(), decoder_, ())?;
3970
3971 let _field = bottom.as_mut();
3972
3973 ::fidl_next::Decode::decode(bottom.as_mut(), decoder_, ())?;
3974
3975 let _field = left.as_mut();
3976
3977 ::fidl_next::Decode::decode(left.as_mut(), decoder_, ())?;
3978
3979 Ok(())
3980 }
3981 }
3982
3983 impl ::fidl_next::IntoNatural for Inset {
3984 type Natural = crate::natural::Inset;
3985 }
3986
3987 #[derive(Clone, Debug)]
3989 #[repr(C)]
3990 pub struct InsetF {
3991 pub top: ::fidl_next::wire::Float32,
3992
3993 pub right: ::fidl_next::wire::Float32,
3994
3995 pub bottom: ::fidl_next::wire::Float32,
3996
3997 pub left: ::fidl_next::wire::Float32,
3998 }
3999
4000 static_assertions::const_assert_eq!(std::mem::size_of::<InsetF>(), 16);
4001 static_assertions::const_assert_eq!(std::mem::align_of::<InsetF>(), 4);
4002
4003 static_assertions::const_assert_eq!(std::mem::offset_of!(InsetF, top), 0);
4004
4005 static_assertions::const_assert_eq!(std::mem::offset_of!(InsetF, right), 4);
4006
4007 static_assertions::const_assert_eq!(std::mem::offset_of!(InsetF, bottom), 8);
4008
4009 static_assertions::const_assert_eq!(std::mem::offset_of!(InsetF, left), 12);
4010
4011 impl ::fidl_next::Constrained for InsetF {
4012 type Constraint = ();
4013
4014 fn validate(
4015 _: ::fidl_next::Slot<'_, Self>,
4016 _: Self::Constraint,
4017 ) -> Result<(), ::fidl_next::ValidationError> {
4018 Ok(())
4019 }
4020 }
4021
4022 unsafe impl ::fidl_next::Wire for InsetF {
4023 type Narrowed<'de> = InsetF;
4024
4025 #[inline]
4026 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4027 ::fidl_next::munge! {
4028 let Self {
4029 top,
4030 right,
4031 bottom,
4032 left,
4033
4034 } = &mut *out_;
4035 }
4036
4037 ::fidl_next::Wire::zero_padding(top);
4038
4039 ::fidl_next::Wire::zero_padding(right);
4040
4041 ::fidl_next::Wire::zero_padding(bottom);
4042
4043 ::fidl_next::Wire::zero_padding(left);
4044 }
4045 }
4046
4047 unsafe impl<___D> ::fidl_next::Decode<___D> for InsetF
4048 where
4049 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4050 {
4051 fn decode(
4052 slot_: ::fidl_next::Slot<'_, Self>,
4053 decoder_: &mut ___D,
4054 _: (),
4055 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4056 ::fidl_next::munge! {
4057 let Self {
4058 mut top,
4059 mut right,
4060 mut bottom,
4061 mut left,
4062
4063 } = slot_;
4064 }
4065
4066 let _field = top.as_mut();
4067
4068 ::fidl_next::Decode::decode(top.as_mut(), decoder_, ())?;
4069
4070 let _field = right.as_mut();
4071
4072 ::fidl_next::Decode::decode(right.as_mut(), decoder_, ())?;
4073
4074 let _field = bottom.as_mut();
4075
4076 ::fidl_next::Decode::decode(bottom.as_mut(), decoder_, ())?;
4077
4078 let _field = left.as_mut();
4079
4080 ::fidl_next::Decode::decode(left.as_mut(), decoder_, ())?;
4081
4082 Ok(())
4083 }
4084 }
4085
4086 impl ::fidl_next::IntoNatural for InsetF {
4087 type Natural = crate::natural::InsetF;
4088 }
4089
4090 #[derive(Clone, Debug)]
4092 #[repr(C)]
4093 pub struct Point {
4094 pub x: ::fidl_next::wire::Int32,
4095
4096 pub y: ::fidl_next::wire::Int32,
4097 }
4098
4099 static_assertions::const_assert_eq!(std::mem::size_of::<Point>(), 8);
4100 static_assertions::const_assert_eq!(std::mem::align_of::<Point>(), 4);
4101
4102 static_assertions::const_assert_eq!(std::mem::offset_of!(Point, x), 0);
4103
4104 static_assertions::const_assert_eq!(std::mem::offset_of!(Point, y), 4);
4105
4106 impl ::fidl_next::Constrained for Point {
4107 type Constraint = ();
4108
4109 fn validate(
4110 _: ::fidl_next::Slot<'_, Self>,
4111 _: Self::Constraint,
4112 ) -> Result<(), ::fidl_next::ValidationError> {
4113 Ok(())
4114 }
4115 }
4116
4117 unsafe impl ::fidl_next::Wire for Point {
4118 type Narrowed<'de> = Point;
4119
4120 #[inline]
4121 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4122 ::fidl_next::munge! {
4123 let Self {
4124 x,
4125 y,
4126
4127 } = &mut *out_;
4128 }
4129
4130 ::fidl_next::Wire::zero_padding(x);
4131
4132 ::fidl_next::Wire::zero_padding(y);
4133 }
4134 }
4135
4136 unsafe impl<___D> ::fidl_next::Decode<___D> for Point
4137 where
4138 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4139 {
4140 fn decode(
4141 slot_: ::fidl_next::Slot<'_, Self>,
4142 decoder_: &mut ___D,
4143 _: (),
4144 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4145 ::fidl_next::munge! {
4146 let Self {
4147 mut x,
4148 mut y,
4149
4150 } = slot_;
4151 }
4152
4153 let _field = x.as_mut();
4154
4155 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4156
4157 let _field = y.as_mut();
4158
4159 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4160
4161 Ok(())
4162 }
4163 }
4164
4165 impl ::fidl_next::IntoNatural for Point {
4166 type Natural = crate::natural::Point;
4167 }
4168
4169 #[derive(Clone, Debug)]
4171 #[repr(C)]
4172 pub struct Point3F {
4173 pub x: ::fidl_next::wire::Float32,
4174
4175 pub y: ::fidl_next::wire::Float32,
4176
4177 pub z: ::fidl_next::wire::Float32,
4178 }
4179
4180 static_assertions::const_assert_eq!(std::mem::size_of::<Point3F>(), 12);
4181 static_assertions::const_assert_eq!(std::mem::align_of::<Point3F>(), 4);
4182
4183 static_assertions::const_assert_eq!(std::mem::offset_of!(Point3F, x), 0);
4184
4185 static_assertions::const_assert_eq!(std::mem::offset_of!(Point3F, y), 4);
4186
4187 static_assertions::const_assert_eq!(std::mem::offset_of!(Point3F, z), 8);
4188
4189 impl ::fidl_next::Constrained for Point3F {
4190 type Constraint = ();
4191
4192 fn validate(
4193 _: ::fidl_next::Slot<'_, Self>,
4194 _: Self::Constraint,
4195 ) -> Result<(), ::fidl_next::ValidationError> {
4196 Ok(())
4197 }
4198 }
4199
4200 unsafe impl ::fidl_next::Wire for Point3F {
4201 type Narrowed<'de> = Point3F;
4202
4203 #[inline]
4204 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4205 ::fidl_next::munge! {
4206 let Self {
4207 x,
4208 y,
4209 z,
4210
4211 } = &mut *out_;
4212 }
4213
4214 ::fidl_next::Wire::zero_padding(x);
4215
4216 ::fidl_next::Wire::zero_padding(y);
4217
4218 ::fidl_next::Wire::zero_padding(z);
4219 }
4220 }
4221
4222 unsafe impl<___D> ::fidl_next::Decode<___D> for Point3F
4223 where
4224 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4225 {
4226 fn decode(
4227 slot_: ::fidl_next::Slot<'_, Self>,
4228 decoder_: &mut ___D,
4229 _: (),
4230 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4231 ::fidl_next::munge! {
4232 let Self {
4233 mut x,
4234 mut y,
4235 mut z,
4236
4237 } = slot_;
4238 }
4239
4240 let _field = x.as_mut();
4241
4242 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4243
4244 let _field = y.as_mut();
4245
4246 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4247
4248 let _field = z.as_mut();
4249
4250 ::fidl_next::Decode::decode(z.as_mut(), decoder_, ())?;
4251
4252 Ok(())
4253 }
4254 }
4255
4256 impl ::fidl_next::IntoNatural for Point3F {
4257 type Natural = crate::natural::Point3F;
4258 }
4259
4260 #[derive(Clone, Debug)]
4262 #[repr(C)]
4263 pub struct PointF {
4264 pub x: ::fidl_next::wire::Float32,
4265
4266 pub y: ::fidl_next::wire::Float32,
4267 }
4268
4269 static_assertions::const_assert_eq!(std::mem::size_of::<PointF>(), 8);
4270 static_assertions::const_assert_eq!(std::mem::align_of::<PointF>(), 4);
4271
4272 static_assertions::const_assert_eq!(std::mem::offset_of!(PointF, x), 0);
4273
4274 static_assertions::const_assert_eq!(std::mem::offset_of!(PointF, y), 4);
4275
4276 impl ::fidl_next::Constrained for PointF {
4277 type Constraint = ();
4278
4279 fn validate(
4280 _: ::fidl_next::Slot<'_, Self>,
4281 _: Self::Constraint,
4282 ) -> Result<(), ::fidl_next::ValidationError> {
4283 Ok(())
4284 }
4285 }
4286
4287 unsafe impl ::fidl_next::Wire for PointF {
4288 type Narrowed<'de> = PointF;
4289
4290 #[inline]
4291 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4292 ::fidl_next::munge! {
4293 let Self {
4294 x,
4295 y,
4296
4297 } = &mut *out_;
4298 }
4299
4300 ::fidl_next::Wire::zero_padding(x);
4301
4302 ::fidl_next::Wire::zero_padding(y);
4303 }
4304 }
4305
4306 unsafe impl<___D> ::fidl_next::Decode<___D> for PointF
4307 where
4308 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4309 {
4310 fn decode(
4311 slot_: ::fidl_next::Slot<'_, Self>,
4312 decoder_: &mut ___D,
4313 _: (),
4314 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4315 ::fidl_next::munge! {
4316 let Self {
4317 mut x,
4318 mut y,
4319
4320 } = slot_;
4321 }
4322
4323 let _field = x.as_mut();
4324
4325 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4326
4327 let _field = y.as_mut();
4328
4329 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4330
4331 Ok(())
4332 }
4333 }
4334
4335 impl ::fidl_next::IntoNatural for PointF {
4336 type Natural = crate::natural::PointF;
4337 }
4338
4339 #[derive(Clone, Debug)]
4341 #[repr(C)]
4342 pub struct Vec4F {
4343 pub x: ::fidl_next::wire::Float32,
4344
4345 pub y: ::fidl_next::wire::Float32,
4346
4347 pub z: ::fidl_next::wire::Float32,
4348
4349 pub w: ::fidl_next::wire::Float32,
4350 }
4351
4352 static_assertions::const_assert_eq!(std::mem::size_of::<Vec4F>(), 16);
4353 static_assertions::const_assert_eq!(std::mem::align_of::<Vec4F>(), 4);
4354
4355 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec4F, x), 0);
4356
4357 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec4F, y), 4);
4358
4359 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec4F, z), 8);
4360
4361 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec4F, w), 12);
4362
4363 impl ::fidl_next::Constrained for Vec4F {
4364 type Constraint = ();
4365
4366 fn validate(
4367 _: ::fidl_next::Slot<'_, Self>,
4368 _: Self::Constraint,
4369 ) -> Result<(), ::fidl_next::ValidationError> {
4370 Ok(())
4371 }
4372 }
4373
4374 unsafe impl ::fidl_next::Wire for Vec4F {
4375 type Narrowed<'de> = Vec4F;
4376
4377 #[inline]
4378 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4379 ::fidl_next::munge! {
4380 let Self {
4381 x,
4382 y,
4383 z,
4384 w,
4385
4386 } = &mut *out_;
4387 }
4388
4389 ::fidl_next::Wire::zero_padding(x);
4390
4391 ::fidl_next::Wire::zero_padding(y);
4392
4393 ::fidl_next::Wire::zero_padding(z);
4394
4395 ::fidl_next::Wire::zero_padding(w);
4396 }
4397 }
4398
4399 unsafe impl<___D> ::fidl_next::Decode<___D> for Vec4F
4400 where
4401 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4402 {
4403 fn decode(
4404 slot_: ::fidl_next::Slot<'_, Self>,
4405 decoder_: &mut ___D,
4406 _: (),
4407 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4408 ::fidl_next::munge! {
4409 let Self {
4410 mut x,
4411 mut y,
4412 mut z,
4413 mut w,
4414
4415 } = slot_;
4416 }
4417
4418 let _field = x.as_mut();
4419
4420 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4421
4422 let _field = y.as_mut();
4423
4424 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4425
4426 let _field = z.as_mut();
4427
4428 ::fidl_next::Decode::decode(z.as_mut(), decoder_, ())?;
4429
4430 let _field = w.as_mut();
4431
4432 ::fidl_next::Decode::decode(w.as_mut(), decoder_, ())?;
4433
4434 Ok(())
4435 }
4436 }
4437
4438 impl ::fidl_next::IntoNatural for Vec4F {
4439 type Natural = crate::natural::Vec4F;
4440 }
4441
4442 pub type QuaternionF = crate::wire::Vec4F;
4444
4445 #[derive(Clone, Debug)]
4447 #[repr(C)]
4448 pub struct RRectF {
4449 pub x: ::fidl_next::wire::Float32,
4450
4451 pub y: ::fidl_next::wire::Float32,
4452
4453 pub width: ::fidl_next::wire::Float32,
4454
4455 pub height: ::fidl_next::wire::Float32,
4456
4457 pub top_left_radius_x: ::fidl_next::wire::Float32,
4458
4459 pub top_left_radius_y: ::fidl_next::wire::Float32,
4460
4461 pub top_right_radius_x: ::fidl_next::wire::Float32,
4462
4463 pub top_right_radius_y: ::fidl_next::wire::Float32,
4464
4465 pub bottom_left_radius_x: ::fidl_next::wire::Float32,
4466
4467 pub bottom_left_radius_y: ::fidl_next::wire::Float32,
4468
4469 pub bottom_right_radius_x: ::fidl_next::wire::Float32,
4470
4471 pub bottom_right_radius_y: ::fidl_next::wire::Float32,
4472 }
4473
4474 static_assertions::const_assert_eq!(std::mem::size_of::<RRectF>(), 48);
4475 static_assertions::const_assert_eq!(std::mem::align_of::<RRectF>(), 4);
4476
4477 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, x), 0);
4478
4479 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, y), 4);
4480
4481 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, width), 8);
4482
4483 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, height), 12);
4484
4485 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, top_left_radius_x), 16);
4486
4487 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, top_left_radius_y), 20);
4488
4489 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, top_right_radius_x), 24);
4490
4491 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, top_right_radius_y), 28);
4492
4493 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, bottom_left_radius_x), 32);
4494
4495 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, bottom_left_radius_y), 36);
4496
4497 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, bottom_right_radius_x), 40);
4498
4499 static_assertions::const_assert_eq!(std::mem::offset_of!(RRectF, bottom_right_radius_y), 44);
4500
4501 impl ::fidl_next::Constrained for RRectF {
4502 type Constraint = ();
4503
4504 fn validate(
4505 _: ::fidl_next::Slot<'_, Self>,
4506 _: Self::Constraint,
4507 ) -> Result<(), ::fidl_next::ValidationError> {
4508 Ok(())
4509 }
4510 }
4511
4512 unsafe impl ::fidl_next::Wire for RRectF {
4513 type Narrowed<'de> = RRectF;
4514
4515 #[inline]
4516 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4517 ::fidl_next::munge! {
4518 let Self {
4519 x,
4520 y,
4521 width,
4522 height,
4523 top_left_radius_x,
4524 top_left_radius_y,
4525 top_right_radius_x,
4526 top_right_radius_y,
4527 bottom_left_radius_x,
4528 bottom_left_radius_y,
4529 bottom_right_radius_x,
4530 bottom_right_radius_y,
4531
4532 } = &mut *out_;
4533 }
4534
4535 ::fidl_next::Wire::zero_padding(x);
4536
4537 ::fidl_next::Wire::zero_padding(y);
4538
4539 ::fidl_next::Wire::zero_padding(width);
4540
4541 ::fidl_next::Wire::zero_padding(height);
4542
4543 ::fidl_next::Wire::zero_padding(top_left_radius_x);
4544
4545 ::fidl_next::Wire::zero_padding(top_left_radius_y);
4546
4547 ::fidl_next::Wire::zero_padding(top_right_radius_x);
4548
4549 ::fidl_next::Wire::zero_padding(top_right_radius_y);
4550
4551 ::fidl_next::Wire::zero_padding(bottom_left_radius_x);
4552
4553 ::fidl_next::Wire::zero_padding(bottom_left_radius_y);
4554
4555 ::fidl_next::Wire::zero_padding(bottom_right_radius_x);
4556
4557 ::fidl_next::Wire::zero_padding(bottom_right_radius_y);
4558 }
4559 }
4560
4561 unsafe impl<___D> ::fidl_next::Decode<___D> for RRectF
4562 where
4563 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4564 {
4565 fn decode(
4566 slot_: ::fidl_next::Slot<'_, Self>,
4567 decoder_: &mut ___D,
4568 _: (),
4569 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4570 ::fidl_next::munge! {
4571 let Self {
4572 mut x,
4573 mut y,
4574 mut width,
4575 mut height,
4576 mut top_left_radius_x,
4577 mut top_left_radius_y,
4578 mut top_right_radius_x,
4579 mut top_right_radius_y,
4580 mut bottom_left_radius_x,
4581 mut bottom_left_radius_y,
4582 mut bottom_right_radius_x,
4583 mut bottom_right_radius_y,
4584
4585 } = slot_;
4586 }
4587
4588 let _field = x.as_mut();
4589
4590 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4591
4592 let _field = y.as_mut();
4593
4594 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4595
4596 let _field = width.as_mut();
4597
4598 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
4599
4600 let _field = height.as_mut();
4601
4602 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
4603
4604 let _field = top_left_radius_x.as_mut();
4605
4606 ::fidl_next::Decode::decode(top_left_radius_x.as_mut(), decoder_, ())?;
4607
4608 let _field = top_left_radius_y.as_mut();
4609
4610 ::fidl_next::Decode::decode(top_left_radius_y.as_mut(), decoder_, ())?;
4611
4612 let _field = top_right_radius_x.as_mut();
4613
4614 ::fidl_next::Decode::decode(top_right_radius_x.as_mut(), decoder_, ())?;
4615
4616 let _field = top_right_radius_y.as_mut();
4617
4618 ::fidl_next::Decode::decode(top_right_radius_y.as_mut(), decoder_, ())?;
4619
4620 let _field = bottom_left_radius_x.as_mut();
4621
4622 ::fidl_next::Decode::decode(bottom_left_radius_x.as_mut(), decoder_, ())?;
4623
4624 let _field = bottom_left_radius_y.as_mut();
4625
4626 ::fidl_next::Decode::decode(bottom_left_radius_y.as_mut(), decoder_, ())?;
4627
4628 let _field = bottom_right_radius_x.as_mut();
4629
4630 ::fidl_next::Decode::decode(bottom_right_radius_x.as_mut(), decoder_, ())?;
4631
4632 let _field = bottom_right_radius_y.as_mut();
4633
4634 ::fidl_next::Decode::decode(bottom_right_radius_y.as_mut(), decoder_, ())?;
4635
4636 Ok(())
4637 }
4638 }
4639
4640 impl ::fidl_next::IntoNatural for RRectF {
4641 type Natural = crate::natural::RRectF;
4642 }
4643
4644 #[derive(Clone, Debug)]
4646 #[repr(C)]
4647 pub struct RatioU32 {
4648 pub numerator: ::fidl_next::wire::Uint32,
4649
4650 pub denominator: ::fidl_next::wire::Uint32,
4651 }
4652
4653 static_assertions::const_assert_eq!(std::mem::size_of::<RatioU32>(), 8);
4654 static_assertions::const_assert_eq!(std::mem::align_of::<RatioU32>(), 4);
4655
4656 static_assertions::const_assert_eq!(std::mem::offset_of!(RatioU32, numerator), 0);
4657
4658 static_assertions::const_assert_eq!(std::mem::offset_of!(RatioU32, denominator), 4);
4659
4660 impl ::fidl_next::Constrained for RatioU32 {
4661 type Constraint = ();
4662
4663 fn validate(
4664 _: ::fidl_next::Slot<'_, Self>,
4665 _: Self::Constraint,
4666 ) -> Result<(), ::fidl_next::ValidationError> {
4667 Ok(())
4668 }
4669 }
4670
4671 unsafe impl ::fidl_next::Wire for RatioU32 {
4672 type Narrowed<'de> = RatioU32;
4673
4674 #[inline]
4675 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4676 ::fidl_next::munge! {
4677 let Self {
4678 numerator,
4679 denominator,
4680
4681 } = &mut *out_;
4682 }
4683
4684 ::fidl_next::Wire::zero_padding(numerator);
4685
4686 ::fidl_next::Wire::zero_padding(denominator);
4687 }
4688 }
4689
4690 unsafe impl<___D> ::fidl_next::Decode<___D> for RatioU32
4691 where
4692 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4693 {
4694 fn decode(
4695 slot_: ::fidl_next::Slot<'_, Self>,
4696 decoder_: &mut ___D,
4697 _: (),
4698 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4699 ::fidl_next::munge! {
4700 let Self {
4701 mut numerator,
4702 mut denominator,
4703
4704 } = slot_;
4705 }
4706
4707 let _field = numerator.as_mut();
4708
4709 ::fidl_next::Decode::decode(numerator.as_mut(), decoder_, ())?;
4710
4711 let _field = denominator.as_mut();
4712
4713 ::fidl_next::Decode::decode(denominator.as_mut(), decoder_, ())?;
4714
4715 Ok(())
4716 }
4717 }
4718
4719 impl ::fidl_next::IntoNatural for RatioU32 {
4720 type Natural = crate::natural::RatioU32;
4721 }
4722
4723 #[derive(Clone, Debug)]
4725 #[repr(C)]
4726 pub struct RatioU64 {
4727 pub numerator: ::fidl_next::wire::Uint64,
4728
4729 pub denominator: ::fidl_next::wire::Uint64,
4730 }
4731
4732 static_assertions::const_assert_eq!(std::mem::size_of::<RatioU64>(), 16);
4733 static_assertions::const_assert_eq!(std::mem::align_of::<RatioU64>(), 8);
4734
4735 static_assertions::const_assert_eq!(std::mem::offset_of!(RatioU64, numerator), 0);
4736
4737 static_assertions::const_assert_eq!(std::mem::offset_of!(RatioU64, denominator), 8);
4738
4739 impl ::fidl_next::Constrained for RatioU64 {
4740 type Constraint = ();
4741
4742 fn validate(
4743 _: ::fidl_next::Slot<'_, Self>,
4744 _: Self::Constraint,
4745 ) -> Result<(), ::fidl_next::ValidationError> {
4746 Ok(())
4747 }
4748 }
4749
4750 unsafe impl ::fidl_next::Wire for RatioU64 {
4751 type Narrowed<'de> = RatioU64;
4752
4753 #[inline]
4754 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4755 ::fidl_next::munge! {
4756 let Self {
4757 numerator,
4758 denominator,
4759
4760 } = &mut *out_;
4761 }
4762
4763 ::fidl_next::Wire::zero_padding(numerator);
4764
4765 ::fidl_next::Wire::zero_padding(denominator);
4766 }
4767 }
4768
4769 unsafe impl<___D> ::fidl_next::Decode<___D> for RatioU64
4770 where
4771 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4772 {
4773 fn decode(
4774 slot_: ::fidl_next::Slot<'_, Self>,
4775 decoder_: &mut ___D,
4776 _: (),
4777 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4778 ::fidl_next::munge! {
4779 let Self {
4780 mut numerator,
4781 mut denominator,
4782
4783 } = slot_;
4784 }
4785
4786 let _field = numerator.as_mut();
4787
4788 ::fidl_next::Decode::decode(numerator.as_mut(), decoder_, ())?;
4789
4790 let _field = denominator.as_mut();
4791
4792 ::fidl_next::Decode::decode(denominator.as_mut(), decoder_, ())?;
4793
4794 Ok(())
4795 }
4796 }
4797
4798 impl ::fidl_next::IntoNatural for RatioU64 {
4799 type Natural = crate::natural::RatioU64;
4800 }
4801
4802 #[derive(Clone, Debug)]
4804 #[repr(C)]
4805 pub struct Rect {
4806 pub x: ::fidl_next::wire::Int32,
4807
4808 pub y: ::fidl_next::wire::Int32,
4809
4810 pub width: ::fidl_next::wire::Int32,
4811
4812 pub height: ::fidl_next::wire::Int32,
4813 }
4814
4815 static_assertions::const_assert_eq!(std::mem::size_of::<Rect>(), 16);
4816 static_assertions::const_assert_eq!(std::mem::align_of::<Rect>(), 4);
4817
4818 static_assertions::const_assert_eq!(std::mem::offset_of!(Rect, x), 0);
4819
4820 static_assertions::const_assert_eq!(std::mem::offset_of!(Rect, y), 4);
4821
4822 static_assertions::const_assert_eq!(std::mem::offset_of!(Rect, width), 8);
4823
4824 static_assertions::const_assert_eq!(std::mem::offset_of!(Rect, height), 12);
4825
4826 impl ::fidl_next::Constrained for Rect {
4827 type Constraint = ();
4828
4829 fn validate(
4830 _: ::fidl_next::Slot<'_, Self>,
4831 _: Self::Constraint,
4832 ) -> Result<(), ::fidl_next::ValidationError> {
4833 Ok(())
4834 }
4835 }
4836
4837 unsafe impl ::fidl_next::Wire for Rect {
4838 type Narrowed<'de> = Rect;
4839
4840 #[inline]
4841 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4842 ::fidl_next::munge! {
4843 let Self {
4844 x,
4845 y,
4846 width,
4847 height,
4848
4849 } = &mut *out_;
4850 }
4851
4852 ::fidl_next::Wire::zero_padding(x);
4853
4854 ::fidl_next::Wire::zero_padding(y);
4855
4856 ::fidl_next::Wire::zero_padding(width);
4857
4858 ::fidl_next::Wire::zero_padding(height);
4859 }
4860 }
4861
4862 unsafe impl<___D> ::fidl_next::Decode<___D> for Rect
4863 where
4864 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4865 {
4866 fn decode(
4867 slot_: ::fidl_next::Slot<'_, Self>,
4868 decoder_: &mut ___D,
4869 _: (),
4870 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4871 ::fidl_next::munge! {
4872 let Self {
4873 mut x,
4874 mut y,
4875 mut width,
4876 mut height,
4877
4878 } = slot_;
4879 }
4880
4881 let _field = x.as_mut();
4882
4883 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4884
4885 let _field = y.as_mut();
4886
4887 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4888
4889 let _field = width.as_mut();
4890
4891 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
4892
4893 let _field = height.as_mut();
4894
4895 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
4896
4897 Ok(())
4898 }
4899 }
4900
4901 impl ::fidl_next::IntoNatural for Rect {
4902 type Natural = crate::natural::Rect;
4903 }
4904
4905 #[derive(Clone, Debug)]
4907 #[repr(C)]
4908 pub struct RectF {
4909 pub x: ::fidl_next::wire::Float32,
4910
4911 pub y: ::fidl_next::wire::Float32,
4912
4913 pub width: ::fidl_next::wire::Float32,
4914
4915 pub height: ::fidl_next::wire::Float32,
4916 }
4917
4918 static_assertions::const_assert_eq!(std::mem::size_of::<RectF>(), 16);
4919 static_assertions::const_assert_eq!(std::mem::align_of::<RectF>(), 4);
4920
4921 static_assertions::const_assert_eq!(std::mem::offset_of!(RectF, x), 0);
4922
4923 static_assertions::const_assert_eq!(std::mem::offset_of!(RectF, y), 4);
4924
4925 static_assertions::const_assert_eq!(std::mem::offset_of!(RectF, width), 8);
4926
4927 static_assertions::const_assert_eq!(std::mem::offset_of!(RectF, height), 12);
4928
4929 impl ::fidl_next::Constrained for RectF {
4930 type Constraint = ();
4931
4932 fn validate(
4933 _: ::fidl_next::Slot<'_, Self>,
4934 _: Self::Constraint,
4935 ) -> Result<(), ::fidl_next::ValidationError> {
4936 Ok(())
4937 }
4938 }
4939
4940 unsafe impl ::fidl_next::Wire for RectF {
4941 type Narrowed<'de> = RectF;
4942
4943 #[inline]
4944 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4945 ::fidl_next::munge! {
4946 let Self {
4947 x,
4948 y,
4949 width,
4950 height,
4951
4952 } = &mut *out_;
4953 }
4954
4955 ::fidl_next::Wire::zero_padding(x);
4956
4957 ::fidl_next::Wire::zero_padding(y);
4958
4959 ::fidl_next::Wire::zero_padding(width);
4960
4961 ::fidl_next::Wire::zero_padding(height);
4962 }
4963 }
4964
4965 unsafe impl<___D> ::fidl_next::Decode<___D> for RectF
4966 where
4967 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4968 {
4969 fn decode(
4970 slot_: ::fidl_next::Slot<'_, Self>,
4971 decoder_: &mut ___D,
4972 _: (),
4973 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4974 ::fidl_next::munge! {
4975 let Self {
4976 mut x,
4977 mut y,
4978 mut width,
4979 mut height,
4980
4981 } = slot_;
4982 }
4983
4984 let _field = x.as_mut();
4985
4986 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
4987
4988 let _field = y.as_mut();
4989
4990 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
4991
4992 let _field = width.as_mut();
4993
4994 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
4995
4996 let _field = height.as_mut();
4997
4998 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
4999
5000 Ok(())
5001 }
5002 }
5003
5004 impl ::fidl_next::IntoNatural for RectF {
5005 type Natural = crate::natural::RectF;
5006 }
5007
5008 #[derive(Clone, Debug)]
5010 #[repr(C)]
5011 pub struct RectU {
5012 pub x: ::fidl_next::wire::Uint32,
5013
5014 pub y: ::fidl_next::wire::Uint32,
5015
5016 pub width: ::fidl_next::wire::Uint32,
5017
5018 pub height: ::fidl_next::wire::Uint32,
5019 }
5020
5021 static_assertions::const_assert_eq!(std::mem::size_of::<RectU>(), 16);
5022 static_assertions::const_assert_eq!(std::mem::align_of::<RectU>(), 4);
5023
5024 static_assertions::const_assert_eq!(std::mem::offset_of!(RectU, x), 0);
5025
5026 static_assertions::const_assert_eq!(std::mem::offset_of!(RectU, y), 4);
5027
5028 static_assertions::const_assert_eq!(std::mem::offset_of!(RectU, width), 8);
5029
5030 static_assertions::const_assert_eq!(std::mem::offset_of!(RectU, height), 12);
5031
5032 impl ::fidl_next::Constrained for RectU {
5033 type Constraint = ();
5034
5035 fn validate(
5036 _: ::fidl_next::Slot<'_, Self>,
5037 _: Self::Constraint,
5038 ) -> Result<(), ::fidl_next::ValidationError> {
5039 Ok(())
5040 }
5041 }
5042
5043 unsafe impl ::fidl_next::Wire for RectU {
5044 type Narrowed<'de> = RectU;
5045
5046 #[inline]
5047 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5048 ::fidl_next::munge! {
5049 let Self {
5050 x,
5051 y,
5052 width,
5053 height,
5054
5055 } = &mut *out_;
5056 }
5057
5058 ::fidl_next::Wire::zero_padding(x);
5059
5060 ::fidl_next::Wire::zero_padding(y);
5061
5062 ::fidl_next::Wire::zero_padding(width);
5063
5064 ::fidl_next::Wire::zero_padding(height);
5065 }
5066 }
5067
5068 unsafe impl<___D> ::fidl_next::Decode<___D> for RectU
5069 where
5070 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5071 {
5072 fn decode(
5073 slot_: ::fidl_next::Slot<'_, Self>,
5074 decoder_: &mut ___D,
5075 _: (),
5076 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5077 ::fidl_next::munge! {
5078 let Self {
5079 mut x,
5080 mut y,
5081 mut width,
5082 mut height,
5083
5084 } = slot_;
5085 }
5086
5087 let _field = x.as_mut();
5088
5089 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
5090
5091 let _field = y.as_mut();
5092
5093 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
5094
5095 let _field = width.as_mut();
5096
5097 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
5098
5099 let _field = height.as_mut();
5100
5101 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5102
5103 Ok(())
5104 }
5105 }
5106
5107 impl ::fidl_next::IntoNatural for RectU {
5108 type Natural = crate::natural::RectU;
5109 }
5110
5111 #[derive(Clone, Debug)]
5113 #[repr(C)]
5114 pub struct Size {
5115 pub width: ::fidl_next::wire::Int32,
5116
5117 pub height: ::fidl_next::wire::Int32,
5118 }
5119
5120 static_assertions::const_assert_eq!(std::mem::size_of::<Size>(), 8);
5121 static_assertions::const_assert_eq!(std::mem::align_of::<Size>(), 4);
5122
5123 static_assertions::const_assert_eq!(std::mem::offset_of!(Size, width), 0);
5124
5125 static_assertions::const_assert_eq!(std::mem::offset_of!(Size, height), 4);
5126
5127 impl ::fidl_next::Constrained for Size {
5128 type Constraint = ();
5129
5130 fn validate(
5131 _: ::fidl_next::Slot<'_, Self>,
5132 _: Self::Constraint,
5133 ) -> Result<(), ::fidl_next::ValidationError> {
5134 Ok(())
5135 }
5136 }
5137
5138 unsafe impl ::fidl_next::Wire for Size {
5139 type Narrowed<'de> = Size;
5140
5141 #[inline]
5142 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5143 ::fidl_next::munge! {
5144 let Self {
5145 width,
5146 height,
5147
5148 } = &mut *out_;
5149 }
5150
5151 ::fidl_next::Wire::zero_padding(width);
5152
5153 ::fidl_next::Wire::zero_padding(height);
5154 }
5155 }
5156
5157 unsafe impl<___D> ::fidl_next::Decode<___D> for Size
5158 where
5159 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5160 {
5161 fn decode(
5162 slot_: ::fidl_next::Slot<'_, Self>,
5163 decoder_: &mut ___D,
5164 _: (),
5165 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5166 ::fidl_next::munge! {
5167 let Self {
5168 mut width,
5169 mut height,
5170
5171 } = slot_;
5172 }
5173
5174 let _field = width.as_mut();
5175
5176 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
5177
5178 let _field = height.as_mut();
5179
5180 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5181
5182 Ok(())
5183 }
5184 }
5185
5186 impl ::fidl_next::IntoNatural for Size {
5187 type Natural = crate::natural::Size;
5188 }
5189
5190 #[derive(Clone, Debug)]
5192 #[repr(C)]
5193 pub struct SizeF {
5194 pub width: ::fidl_next::wire::Float32,
5195
5196 pub height: ::fidl_next::wire::Float32,
5197 }
5198
5199 static_assertions::const_assert_eq!(std::mem::size_of::<SizeF>(), 8);
5200 static_assertions::const_assert_eq!(std::mem::align_of::<SizeF>(), 4);
5201
5202 static_assertions::const_assert_eq!(std::mem::offset_of!(SizeF, width), 0);
5203
5204 static_assertions::const_assert_eq!(std::mem::offset_of!(SizeF, height), 4);
5205
5206 impl ::fidl_next::Constrained for SizeF {
5207 type Constraint = ();
5208
5209 fn validate(
5210 _: ::fidl_next::Slot<'_, Self>,
5211 _: Self::Constraint,
5212 ) -> Result<(), ::fidl_next::ValidationError> {
5213 Ok(())
5214 }
5215 }
5216
5217 unsafe impl ::fidl_next::Wire for SizeF {
5218 type Narrowed<'de> = SizeF;
5219
5220 #[inline]
5221 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5222 ::fidl_next::munge! {
5223 let Self {
5224 width,
5225 height,
5226
5227 } = &mut *out_;
5228 }
5229
5230 ::fidl_next::Wire::zero_padding(width);
5231
5232 ::fidl_next::Wire::zero_padding(height);
5233 }
5234 }
5235
5236 unsafe impl<___D> ::fidl_next::Decode<___D> for SizeF
5237 where
5238 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5239 {
5240 fn decode(
5241 slot_: ::fidl_next::Slot<'_, Self>,
5242 decoder_: &mut ___D,
5243 _: (),
5244 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5245 ::fidl_next::munge! {
5246 let Self {
5247 mut width,
5248 mut height,
5249
5250 } = slot_;
5251 }
5252
5253 let _field = width.as_mut();
5254
5255 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
5256
5257 let _field = height.as_mut();
5258
5259 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5260
5261 Ok(())
5262 }
5263 }
5264
5265 impl ::fidl_next::IntoNatural for SizeF {
5266 type Natural = crate::natural::SizeF;
5267 }
5268
5269 #[derive(Clone, Debug)]
5271 #[repr(C)]
5272 pub struct SizeU {
5273 pub width: ::fidl_next::wire::Uint32,
5274
5275 pub height: ::fidl_next::wire::Uint32,
5276 }
5277
5278 static_assertions::const_assert_eq!(std::mem::size_of::<SizeU>(), 8);
5279 static_assertions::const_assert_eq!(std::mem::align_of::<SizeU>(), 4);
5280
5281 static_assertions::const_assert_eq!(std::mem::offset_of!(SizeU, width), 0);
5282
5283 static_assertions::const_assert_eq!(std::mem::offset_of!(SizeU, height), 4);
5284
5285 impl ::fidl_next::Constrained for SizeU {
5286 type Constraint = ();
5287
5288 fn validate(
5289 _: ::fidl_next::Slot<'_, Self>,
5290 _: Self::Constraint,
5291 ) -> Result<(), ::fidl_next::ValidationError> {
5292 Ok(())
5293 }
5294 }
5295
5296 unsafe impl ::fidl_next::Wire for SizeU {
5297 type Narrowed<'de> = SizeU;
5298
5299 #[inline]
5300 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5301 ::fidl_next::munge! {
5302 let Self {
5303 width,
5304 height,
5305
5306 } = &mut *out_;
5307 }
5308
5309 ::fidl_next::Wire::zero_padding(width);
5310
5311 ::fidl_next::Wire::zero_padding(height);
5312 }
5313 }
5314
5315 unsafe impl<___D> ::fidl_next::Decode<___D> for SizeU
5316 where
5317 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5318 {
5319 fn decode(
5320 slot_: ::fidl_next::Slot<'_, Self>,
5321 decoder_: &mut ___D,
5322 _: (),
5323 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5324 ::fidl_next::munge! {
5325 let Self {
5326 mut width,
5327 mut height,
5328
5329 } = slot_;
5330 }
5331
5332 let _field = width.as_mut();
5333
5334 ::fidl_next::Decode::decode(width.as_mut(), decoder_, ())?;
5335
5336 let _field = height.as_mut();
5337
5338 ::fidl_next::Decode::decode(height.as_mut(), decoder_, ())?;
5339
5340 Ok(())
5341 }
5342 }
5343
5344 impl ::fidl_next::IntoNatural for SizeU {
5345 type Natural = crate::natural::SizeU;
5346 }
5347
5348 #[derive(Clone, Debug)]
5350 #[repr(C)]
5351 pub struct Transform {
5352 pub matrix: [::fidl_next::wire::Float32; 16],
5353 }
5354
5355 static_assertions::const_assert_eq!(std::mem::size_of::<Transform>(), 64);
5356 static_assertions::const_assert_eq!(std::mem::align_of::<Transform>(), 4);
5357
5358 static_assertions::const_assert_eq!(std::mem::offset_of!(Transform, matrix), 0);
5359
5360 impl ::fidl_next::Constrained for Transform {
5361 type Constraint = ();
5362
5363 fn validate(
5364 _: ::fidl_next::Slot<'_, Self>,
5365 _: Self::Constraint,
5366 ) -> Result<(), ::fidl_next::ValidationError> {
5367 Ok(())
5368 }
5369 }
5370
5371 unsafe impl ::fidl_next::Wire for Transform {
5372 type Narrowed<'de> = Transform;
5373
5374 #[inline]
5375 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5376 ::fidl_next::munge! {
5377 let Self {
5378 matrix,
5379
5380 } = &mut *out_;
5381 }
5382
5383 ::fidl_next::Wire::zero_padding(matrix);
5384 }
5385 }
5386
5387 unsafe impl<___D> ::fidl_next::Decode<___D> for Transform
5388 where
5389 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5390 {
5391 fn decode(
5392 slot_: ::fidl_next::Slot<'_, Self>,
5393 decoder_: &mut ___D,
5394 _: (),
5395 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5396 ::fidl_next::munge! {
5397 let Self {
5398 mut matrix,
5399
5400 } = slot_;
5401 }
5402
5403 let _field = matrix.as_mut();
5404
5405 ::fidl_next::Decode::decode(matrix.as_mut(), decoder_, ())?;
5406
5407 Ok(())
5408 }
5409 }
5410
5411 impl ::fidl_next::IntoNatural for Transform {
5412 type Natural = crate::natural::Transform;
5413 }
5414
5415 #[derive(Clone, Debug)]
5417 #[repr(C)]
5418 pub struct Vec {
5419 pub x: ::fidl_next::wire::Int32,
5420
5421 pub y: ::fidl_next::wire::Int32,
5422 }
5423
5424 static_assertions::const_assert_eq!(std::mem::size_of::<Vec>(), 8);
5425 static_assertions::const_assert_eq!(std::mem::align_of::<Vec>(), 4);
5426
5427 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec, x), 0);
5428
5429 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec, y), 4);
5430
5431 impl ::fidl_next::Constrained for Vec {
5432 type Constraint = ();
5433
5434 fn validate(
5435 _: ::fidl_next::Slot<'_, Self>,
5436 _: Self::Constraint,
5437 ) -> Result<(), ::fidl_next::ValidationError> {
5438 Ok(())
5439 }
5440 }
5441
5442 unsafe impl ::fidl_next::Wire for Vec {
5443 type Narrowed<'de> = Vec;
5444
5445 #[inline]
5446 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5447 ::fidl_next::munge! {
5448 let Self {
5449 x,
5450 y,
5451
5452 } = &mut *out_;
5453 }
5454
5455 ::fidl_next::Wire::zero_padding(x);
5456
5457 ::fidl_next::Wire::zero_padding(y);
5458 }
5459 }
5460
5461 unsafe impl<___D> ::fidl_next::Decode<___D> for Vec
5462 where
5463 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5464 {
5465 fn decode(
5466 slot_: ::fidl_next::Slot<'_, Self>,
5467 decoder_: &mut ___D,
5468 _: (),
5469 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5470 ::fidl_next::munge! {
5471 let Self {
5472 mut x,
5473 mut y,
5474
5475 } = slot_;
5476 }
5477
5478 let _field = x.as_mut();
5479
5480 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
5481
5482 let _field = y.as_mut();
5483
5484 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
5485
5486 Ok(())
5487 }
5488 }
5489
5490 impl ::fidl_next::IntoNatural for Vec {
5491 type Natural = crate::natural::Vec;
5492 }
5493
5494 #[derive(Clone, Debug)]
5496 #[repr(C)]
5497 pub struct Vec3F {
5498 pub x: ::fidl_next::wire::Float32,
5499
5500 pub y: ::fidl_next::wire::Float32,
5501
5502 pub z: ::fidl_next::wire::Float32,
5503 }
5504
5505 static_assertions::const_assert_eq!(std::mem::size_of::<Vec3F>(), 12);
5506 static_assertions::const_assert_eq!(std::mem::align_of::<Vec3F>(), 4);
5507
5508 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec3F, x), 0);
5509
5510 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec3F, y), 4);
5511
5512 static_assertions::const_assert_eq!(std::mem::offset_of!(Vec3F, z), 8);
5513
5514 impl ::fidl_next::Constrained for Vec3F {
5515 type Constraint = ();
5516
5517 fn validate(
5518 _: ::fidl_next::Slot<'_, Self>,
5519 _: Self::Constraint,
5520 ) -> Result<(), ::fidl_next::ValidationError> {
5521 Ok(())
5522 }
5523 }
5524
5525 unsafe impl ::fidl_next::Wire for Vec3F {
5526 type Narrowed<'de> = Vec3F;
5527
5528 #[inline]
5529 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5530 ::fidl_next::munge! {
5531 let Self {
5532 x,
5533 y,
5534 z,
5535
5536 } = &mut *out_;
5537 }
5538
5539 ::fidl_next::Wire::zero_padding(x);
5540
5541 ::fidl_next::Wire::zero_padding(y);
5542
5543 ::fidl_next::Wire::zero_padding(z);
5544 }
5545 }
5546
5547 unsafe impl<___D> ::fidl_next::Decode<___D> for Vec3F
5548 where
5549 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5550 {
5551 fn decode(
5552 slot_: ::fidl_next::Slot<'_, Self>,
5553 decoder_: &mut ___D,
5554 _: (),
5555 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5556 ::fidl_next::munge! {
5557 let Self {
5558 mut x,
5559 mut y,
5560 mut z,
5561
5562 } = slot_;
5563 }
5564
5565 let _field = x.as_mut();
5566
5567 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
5568
5569 let _field = y.as_mut();
5570
5571 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
5572
5573 let _field = z.as_mut();
5574
5575 ::fidl_next::Decode::decode(z.as_mut(), decoder_, ())?;
5576
5577 Ok(())
5578 }
5579 }
5580
5581 impl ::fidl_next::IntoNatural for Vec3F {
5582 type Natural = crate::natural::Vec3F;
5583 }
5584
5585 #[derive(Clone, Debug)]
5587 #[repr(C)]
5588 pub struct VecF {
5589 pub x: ::fidl_next::wire::Float32,
5590
5591 pub y: ::fidl_next::wire::Float32,
5592 }
5593
5594 static_assertions::const_assert_eq!(std::mem::size_of::<VecF>(), 8);
5595 static_assertions::const_assert_eq!(std::mem::align_of::<VecF>(), 4);
5596
5597 static_assertions::const_assert_eq!(std::mem::offset_of!(VecF, x), 0);
5598
5599 static_assertions::const_assert_eq!(std::mem::offset_of!(VecF, y), 4);
5600
5601 impl ::fidl_next::Constrained for VecF {
5602 type Constraint = ();
5603
5604 fn validate(
5605 _: ::fidl_next::Slot<'_, Self>,
5606 _: Self::Constraint,
5607 ) -> Result<(), ::fidl_next::ValidationError> {
5608 Ok(())
5609 }
5610 }
5611
5612 unsafe impl ::fidl_next::Wire for VecF {
5613 type Narrowed<'de> = VecF;
5614
5615 #[inline]
5616 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5617 ::fidl_next::munge! {
5618 let Self {
5619 x,
5620 y,
5621
5622 } = &mut *out_;
5623 }
5624
5625 ::fidl_next::Wire::zero_padding(x);
5626
5627 ::fidl_next::Wire::zero_padding(y);
5628 }
5629 }
5630
5631 unsafe impl<___D> ::fidl_next::Decode<___D> for VecF
5632 where
5633 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5634 {
5635 fn decode(
5636 slot_: ::fidl_next::Slot<'_, Self>,
5637 decoder_: &mut ___D,
5638 _: (),
5639 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5640 ::fidl_next::munge! {
5641 let Self {
5642 mut x,
5643 mut y,
5644
5645 } = slot_;
5646 }
5647
5648 let _field = x.as_mut();
5649
5650 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
5651
5652 let _field = y.as_mut();
5653
5654 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
5655
5656 Ok(())
5657 }
5658 }
5659
5660 impl ::fidl_next::IntoNatural for VecF {
5661 type Natural = crate::natural::VecF;
5662 }
5663}
5664
5665pub mod wire_optional {}
5666
5667pub mod generic {
5668
5669 pub struct Inset<T0, T1, T2, T3> {
5671 pub top: T0,
5672
5673 pub right: T1,
5674
5675 pub bottom: T2,
5676
5677 pub left: T3,
5678 }
5679
5680 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::Inset, ___E>
5681 for Inset<T0, T1, T2, T3>
5682 where
5683 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5684 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5685 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5686 T2: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5687 T3: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5688 {
5689 #[inline]
5690 fn encode(
5691 self,
5692 encoder_: &mut ___E,
5693 out_: &mut ::core::mem::MaybeUninit<crate::wire::Inset>,
5694 _: (),
5695 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5696 ::fidl_next::munge! {
5697 let crate::wire::Inset {
5698 top,
5699 right,
5700 bottom,
5701 left,
5702
5703 } = out_;
5704 }
5705
5706 ::fidl_next::Encode::encode(self.top, encoder_, top, ())?;
5707
5708 ::fidl_next::Encode::encode(self.right, encoder_, right, ())?;
5709
5710 ::fidl_next::Encode::encode(self.bottom, encoder_, bottom, ())?;
5711
5712 ::fidl_next::Encode::encode(self.left, encoder_, left, ())?;
5713
5714 Ok(())
5715 }
5716 }
5717
5718 pub struct InsetF<T0, T1, T2, T3> {
5720 pub top: T0,
5721
5722 pub right: T1,
5723
5724 pub bottom: T2,
5725
5726 pub left: T3,
5727 }
5728
5729 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::InsetF, ___E>
5730 for InsetF<T0, T1, T2, T3>
5731 where
5732 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5733 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5734 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5735 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5736 T3: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5737 {
5738 #[inline]
5739 fn encode(
5740 self,
5741 encoder_: &mut ___E,
5742 out_: &mut ::core::mem::MaybeUninit<crate::wire::InsetF>,
5743 _: (),
5744 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5745 ::fidl_next::munge! {
5746 let crate::wire::InsetF {
5747 top,
5748 right,
5749 bottom,
5750 left,
5751
5752 } = out_;
5753 }
5754
5755 ::fidl_next::Encode::encode(self.top, encoder_, top, ())?;
5756
5757 ::fidl_next::Encode::encode(self.right, encoder_, right, ())?;
5758
5759 ::fidl_next::Encode::encode(self.bottom, encoder_, bottom, ())?;
5760
5761 ::fidl_next::Encode::encode(self.left, encoder_, left, ())?;
5762
5763 Ok(())
5764 }
5765 }
5766
5767 pub struct Point<T0, T1> {
5769 pub x: T0,
5770
5771 pub y: T1,
5772 }
5773
5774 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Point, ___E> for Point<T0, T1>
5775 where
5776 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5777 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5778 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5779 {
5780 #[inline]
5781 fn encode(
5782 self,
5783 encoder_: &mut ___E,
5784 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
5785 _: (),
5786 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5787 ::fidl_next::munge! {
5788 let crate::wire::Point {
5789 x,
5790 y,
5791
5792 } = out_;
5793 }
5794
5795 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
5796
5797 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
5798
5799 Ok(())
5800 }
5801 }
5802
5803 pub struct Point3F<T0, T1, T2> {
5805 pub x: T0,
5806
5807 pub y: T1,
5808
5809 pub z: T2,
5810 }
5811
5812 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Point3F, ___E>
5813 for Point3F<T0, T1, T2>
5814 where
5815 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5816 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5817 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5818 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5819 {
5820 #[inline]
5821 fn encode(
5822 self,
5823 encoder_: &mut ___E,
5824 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point3F>,
5825 _: (),
5826 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5827 ::fidl_next::munge! {
5828 let crate::wire::Point3F {
5829 x,
5830 y,
5831 z,
5832
5833 } = out_;
5834 }
5835
5836 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
5837
5838 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
5839
5840 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
5841
5842 Ok(())
5843 }
5844 }
5845
5846 pub struct PointF<T0, T1> {
5848 pub x: T0,
5849
5850 pub y: T1,
5851 }
5852
5853 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::PointF, ___E> for PointF<T0, T1>
5854 where
5855 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5856 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5857 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5858 {
5859 #[inline]
5860 fn encode(
5861 self,
5862 encoder_: &mut ___E,
5863 out_: &mut ::core::mem::MaybeUninit<crate::wire::PointF>,
5864 _: (),
5865 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5866 ::fidl_next::munge! {
5867 let crate::wire::PointF {
5868 x,
5869 y,
5870
5871 } = out_;
5872 }
5873
5874 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
5875
5876 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
5877
5878 Ok(())
5879 }
5880 }
5881
5882 pub struct Vec4F<T0, T1, T2, T3> {
5884 pub x: T0,
5885
5886 pub y: T1,
5887
5888 pub z: T2,
5889
5890 pub w: T3,
5891 }
5892
5893 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::Vec4F, ___E>
5894 for Vec4F<T0, T1, T2, T3>
5895 where
5896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5897 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5898 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5899 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5900 T3: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5901 {
5902 #[inline]
5903 fn encode(
5904 self,
5905 encoder_: &mut ___E,
5906 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec4F>,
5907 _: (),
5908 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5909 ::fidl_next::munge! {
5910 let crate::wire::Vec4F {
5911 x,
5912 y,
5913 z,
5914 w,
5915
5916 } = out_;
5917 }
5918
5919 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
5920
5921 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
5922
5923 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
5924
5925 ::fidl_next::Encode::encode(self.w, encoder_, w, ())?;
5926
5927 Ok(())
5928 }
5929 }
5930
5931 pub struct RRectF<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> {
5933 pub x: T0,
5934
5935 pub y: T1,
5936
5937 pub width: T2,
5938
5939 pub height: T3,
5940
5941 pub top_left_radius_x: T4,
5942
5943 pub top_left_radius_y: T5,
5944
5945 pub top_right_radius_x: T6,
5946
5947 pub top_right_radius_y: T7,
5948
5949 pub bottom_left_radius_x: T8,
5950
5951 pub bottom_left_radius_y: T9,
5952
5953 pub bottom_right_radius_x: T10,
5954
5955 pub bottom_right_radius_y: T11,
5956 }
5957
5958 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
5959 ::fidl_next::Encode<crate::wire::RRectF, ___E>
5960 for RRectF<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
5961 where
5962 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5963 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5964 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5965 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5966 T3: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5967 T4: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5968 T5: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5969 T6: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5970 T7: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5971 T8: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5972 T9: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5973 T10: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5974 T11: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
5975 {
5976 #[inline]
5977 fn encode(
5978 self,
5979 encoder_: &mut ___E,
5980 out_: &mut ::core::mem::MaybeUninit<crate::wire::RRectF>,
5981 _: (),
5982 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5983 ::fidl_next::munge! {
5984 let crate::wire::RRectF {
5985 x,
5986 y,
5987 width,
5988 height,
5989 top_left_radius_x,
5990 top_left_radius_y,
5991 top_right_radius_x,
5992 top_right_radius_y,
5993 bottom_left_radius_x,
5994 bottom_left_radius_y,
5995 bottom_right_radius_x,
5996 bottom_right_radius_y,
5997
5998 } = out_;
5999 }
6000
6001 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6002
6003 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6004
6005 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6006
6007 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6008
6009 ::fidl_next::Encode::encode(self.top_left_radius_x, encoder_, top_left_radius_x, ())?;
6010
6011 ::fidl_next::Encode::encode(self.top_left_radius_y, encoder_, top_left_radius_y, ())?;
6012
6013 ::fidl_next::Encode::encode(self.top_right_radius_x, encoder_, top_right_radius_x, ())?;
6014
6015 ::fidl_next::Encode::encode(self.top_right_radius_y, encoder_, top_right_radius_y, ())?;
6016
6017 ::fidl_next::Encode::encode(
6018 self.bottom_left_radius_x,
6019 encoder_,
6020 bottom_left_radius_x,
6021 (),
6022 )?;
6023
6024 ::fidl_next::Encode::encode(
6025 self.bottom_left_radius_y,
6026 encoder_,
6027 bottom_left_radius_y,
6028 (),
6029 )?;
6030
6031 ::fidl_next::Encode::encode(
6032 self.bottom_right_radius_x,
6033 encoder_,
6034 bottom_right_radius_x,
6035 (),
6036 )?;
6037
6038 ::fidl_next::Encode::encode(
6039 self.bottom_right_radius_y,
6040 encoder_,
6041 bottom_right_radius_y,
6042 (),
6043 )?;
6044
6045 Ok(())
6046 }
6047 }
6048
6049 pub struct RatioU32<T0, T1> {
6051 pub numerator: T0,
6052
6053 pub denominator: T1,
6054 }
6055
6056 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::RatioU32, ___E> for RatioU32<T0, T1>
6057 where
6058 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6059 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6060 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6061 {
6062 #[inline]
6063 fn encode(
6064 self,
6065 encoder_: &mut ___E,
6066 out_: &mut ::core::mem::MaybeUninit<crate::wire::RatioU32>,
6067 _: (),
6068 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6069 ::fidl_next::munge! {
6070 let crate::wire::RatioU32 {
6071 numerator,
6072 denominator,
6073
6074 } = out_;
6075 }
6076
6077 ::fidl_next::Encode::encode(self.numerator, encoder_, numerator, ())?;
6078
6079 ::fidl_next::Encode::encode(self.denominator, encoder_, denominator, ())?;
6080
6081 Ok(())
6082 }
6083 }
6084
6085 pub struct RatioU64<T0, T1> {
6087 pub numerator: T0,
6088
6089 pub denominator: T1,
6090 }
6091
6092 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::RatioU64, ___E> for RatioU64<T0, T1>
6093 where
6094 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6095 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
6096 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
6097 {
6098 #[inline]
6099 fn encode(
6100 self,
6101 encoder_: &mut ___E,
6102 out_: &mut ::core::mem::MaybeUninit<crate::wire::RatioU64>,
6103 _: (),
6104 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6105 ::fidl_next::munge! {
6106 let crate::wire::RatioU64 {
6107 numerator,
6108 denominator,
6109
6110 } = out_;
6111 }
6112
6113 ::fidl_next::Encode::encode(self.numerator, encoder_, numerator, ())?;
6114
6115 ::fidl_next::Encode::encode(self.denominator, encoder_, denominator, ())?;
6116
6117 Ok(())
6118 }
6119 }
6120
6121 pub struct Rect<T0, T1, T2, T3> {
6123 pub x: T0,
6124
6125 pub y: T1,
6126
6127 pub width: T2,
6128
6129 pub height: T3,
6130 }
6131
6132 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::Rect, ___E>
6133 for Rect<T0, T1, T2, T3>
6134 where
6135 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6136 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6137 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6138 T2: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6139 T3: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6140 {
6141 #[inline]
6142 fn encode(
6143 self,
6144 encoder_: &mut ___E,
6145 out_: &mut ::core::mem::MaybeUninit<crate::wire::Rect>,
6146 _: (),
6147 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6148 ::fidl_next::munge! {
6149 let crate::wire::Rect {
6150 x,
6151 y,
6152 width,
6153 height,
6154
6155 } = out_;
6156 }
6157
6158 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6159
6160 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6161
6162 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6163
6164 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6165
6166 Ok(())
6167 }
6168 }
6169
6170 pub struct RectF<T0, T1, T2, T3> {
6172 pub x: T0,
6173
6174 pub y: T1,
6175
6176 pub width: T2,
6177
6178 pub height: T3,
6179 }
6180
6181 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::RectF, ___E>
6182 for RectF<T0, T1, T2, T3>
6183 where
6184 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6185 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6186 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6187 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6188 T3: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6189 {
6190 #[inline]
6191 fn encode(
6192 self,
6193 encoder_: &mut ___E,
6194 out_: &mut ::core::mem::MaybeUninit<crate::wire::RectF>,
6195 _: (),
6196 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6197 ::fidl_next::munge! {
6198 let crate::wire::RectF {
6199 x,
6200 y,
6201 width,
6202 height,
6203
6204 } = out_;
6205 }
6206
6207 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6208
6209 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6210
6211 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6212
6213 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6214
6215 Ok(())
6216 }
6217 }
6218
6219 pub struct RectU<T0, T1, T2, T3> {
6221 pub x: T0,
6222
6223 pub y: T1,
6224
6225 pub width: T2,
6226
6227 pub height: T3,
6228 }
6229
6230 unsafe impl<___E, T0, T1, T2, T3> ::fidl_next::Encode<crate::wire::RectU, ___E>
6231 for RectU<T0, T1, T2, T3>
6232 where
6233 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6234 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6235 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6236 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6237 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6238 {
6239 #[inline]
6240 fn encode(
6241 self,
6242 encoder_: &mut ___E,
6243 out_: &mut ::core::mem::MaybeUninit<crate::wire::RectU>,
6244 _: (),
6245 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6246 ::fidl_next::munge! {
6247 let crate::wire::RectU {
6248 x,
6249 y,
6250 width,
6251 height,
6252
6253 } = out_;
6254 }
6255
6256 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6257
6258 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6259
6260 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6261
6262 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6263
6264 Ok(())
6265 }
6266 }
6267
6268 pub struct Size<T0, T1> {
6270 pub width: T0,
6271
6272 pub height: T1,
6273 }
6274
6275 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Size, ___E> for Size<T0, T1>
6276 where
6277 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6278 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6279 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6280 {
6281 #[inline]
6282 fn encode(
6283 self,
6284 encoder_: &mut ___E,
6285 out_: &mut ::core::mem::MaybeUninit<crate::wire::Size>,
6286 _: (),
6287 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6288 ::fidl_next::munge! {
6289 let crate::wire::Size {
6290 width,
6291 height,
6292
6293 } = out_;
6294 }
6295
6296 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6297
6298 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6299
6300 Ok(())
6301 }
6302 }
6303
6304 pub struct SizeF<T0, T1> {
6306 pub width: T0,
6307
6308 pub height: T1,
6309 }
6310
6311 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SizeF, ___E> for SizeF<T0, T1>
6312 where
6313 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6314 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6315 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6316 {
6317 #[inline]
6318 fn encode(
6319 self,
6320 encoder_: &mut ___E,
6321 out_: &mut ::core::mem::MaybeUninit<crate::wire::SizeF>,
6322 _: (),
6323 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6324 ::fidl_next::munge! {
6325 let crate::wire::SizeF {
6326 width,
6327 height,
6328
6329 } = out_;
6330 }
6331
6332 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6333
6334 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6335
6336 Ok(())
6337 }
6338 }
6339
6340 pub struct SizeU<T0, T1> {
6342 pub width: T0,
6343
6344 pub height: T1,
6345 }
6346
6347 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SizeU, ___E> for SizeU<T0, T1>
6348 where
6349 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6350 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6351 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
6352 {
6353 #[inline]
6354 fn encode(
6355 self,
6356 encoder_: &mut ___E,
6357 out_: &mut ::core::mem::MaybeUninit<crate::wire::SizeU>,
6358 _: (),
6359 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6360 ::fidl_next::munge! {
6361 let crate::wire::SizeU {
6362 width,
6363 height,
6364
6365 } = out_;
6366 }
6367
6368 ::fidl_next::Encode::encode(self.width, encoder_, width, ())?;
6369
6370 ::fidl_next::Encode::encode(self.height, encoder_, height, ())?;
6371
6372 Ok(())
6373 }
6374 }
6375
6376 pub struct Transform<T0> {
6378 pub matrix: T0,
6379 }
6380
6381 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::Transform, ___E> for Transform<T0>
6382 where
6383 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6384 T0: ::fidl_next::Encode<[::fidl_next::wire::Float32; 16], ___E>,
6385 {
6386 #[inline]
6387 fn encode(
6388 self,
6389 encoder_: &mut ___E,
6390 out_: &mut ::core::mem::MaybeUninit<crate::wire::Transform>,
6391 _: (),
6392 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6393 ::fidl_next::munge! {
6394 let crate::wire::Transform {
6395 matrix,
6396
6397 } = out_;
6398 }
6399
6400 ::fidl_next::Encode::encode(self.matrix, encoder_, matrix, ())?;
6401
6402 Ok(())
6403 }
6404 }
6405
6406 pub struct Vec<T0, T1> {
6408 pub x: T0,
6409
6410 pub y: T1,
6411 }
6412
6413 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Vec, ___E> for Vec<T0, T1>
6414 where
6415 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6416 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6417 T1: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
6418 {
6419 #[inline]
6420 fn encode(
6421 self,
6422 encoder_: &mut ___E,
6423 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec>,
6424 _: (),
6425 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6426 ::fidl_next::munge! {
6427 let crate::wire::Vec {
6428 x,
6429 y,
6430
6431 } = out_;
6432 }
6433
6434 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6435
6436 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6437
6438 Ok(())
6439 }
6440 }
6441
6442 pub struct Vec3F<T0, T1, T2> {
6444 pub x: T0,
6445
6446 pub y: T1,
6447
6448 pub z: T2,
6449 }
6450
6451 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::Vec3F, ___E> for Vec3F<T0, T1, T2>
6452 where
6453 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6454 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6455 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6456 T2: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6457 {
6458 #[inline]
6459 fn encode(
6460 self,
6461 encoder_: &mut ___E,
6462 out_: &mut ::core::mem::MaybeUninit<crate::wire::Vec3F>,
6463 _: (),
6464 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6465 ::fidl_next::munge! {
6466 let crate::wire::Vec3F {
6467 x,
6468 y,
6469 z,
6470
6471 } = out_;
6472 }
6473
6474 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6475
6476 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6477
6478 ::fidl_next::Encode::encode(self.z, encoder_, z, ())?;
6479
6480 Ok(())
6481 }
6482 }
6483
6484 pub struct VecF<T0, T1> {
6486 pub x: T0,
6487
6488 pub y: T1,
6489 }
6490
6491 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::VecF, ___E> for VecF<T0, T1>
6492 where
6493 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6494 T0: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6495 T1: ::fidl_next::Encode<::fidl_next::wire::Float32, ___E>,
6496 {
6497 #[inline]
6498 fn encode(
6499 self,
6500 encoder_: &mut ___E,
6501 out_: &mut ::core::mem::MaybeUninit<crate::wire::VecF>,
6502 _: (),
6503 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6504 ::fidl_next::munge! {
6505 let crate::wire::VecF {
6506 x,
6507 y,
6508
6509 } = out_;
6510 }
6511
6512 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
6513
6514 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
6515
6516 Ok(())
6517 }
6518 }
6519}
6520
6521pub use self::natural::*;