1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[doc = " A point in 2D space.\n"]
8 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9 #[repr(C)]
10 pub struct Point {
11 pub x: i64,
12
13 pub y: i64,
14 }
15
16 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Point, ___E> for Point
17 where
18 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19 {
20 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Point> = unsafe {
21 ::fidl_next::CopyOptimization::enable_if(
22 true
23
24 && <
25 i64 as ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>
26 >::COPY_OPTIMIZATION.is_enabled()
27
28 && <
29 i64 as ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>
30 >::COPY_OPTIMIZATION.is_enabled()
31
32 )
33 };
34
35 #[inline]
36 fn encode(
37 self,
38 encoder_: &mut ___E,
39 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
40 _: (),
41 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
42 ::fidl_next::munge! {
43 let crate::wire::Point {
44 x,
45 y,
46
47 } = out_;
48 }
49
50 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
51
52 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
53
54 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
55
56 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
57
58 Ok(())
59 }
60 }
61
62 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Point, ___E> for &'a Point
63 where
64 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
65 {
66 #[inline]
67 fn encode(
68 self,
69 encoder_: &mut ___E,
70 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
71 _: (),
72 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
73 ::fidl_next::munge! {
74 let crate::wire::Point {
75 x,
76 y,
77
78 } = out_;
79 }
80
81 ::fidl_next::Encode::encode(&self.x, encoder_, x, ())?;
82
83 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(x.as_mut_ptr()) };
84
85 ::fidl_next::Encode::encode(&self.y, encoder_, y, ())?;
86
87 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(y.as_mut_ptr()) };
88
89 Ok(())
90 }
91 }
92
93 unsafe impl<___E>
94 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Point>, ___E>
95 for Point
96 where
97 ___E: ::fidl_next::Encoder + ?Sized,
98 Point: ::fidl_next::Encode<crate::wire::Point, ___E>,
99 {
100 #[inline]
101 fn encode_option(
102 this: ::core::option::Option<Self>,
103 encoder: &mut ___E,
104 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Point>>,
105 _: (),
106 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
107 if let Some(inner) = this {
108 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
109 ::fidl_next::wire::Box::encode_present(out);
110 } else {
111 ::fidl_next::wire::Box::encode_absent(out);
112 }
113
114 Ok(())
115 }
116 }
117
118 unsafe impl<'a, ___E>
119 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Point>, ___E>
120 for &'a Point
121 where
122 ___E: ::fidl_next::Encoder + ?Sized,
123 &'a Point: ::fidl_next::Encode<crate::wire::Point, ___E>,
124 {
125 #[inline]
126 fn encode_option(
127 this: ::core::option::Option<Self>,
128 encoder: &mut ___E,
129 out: &mut ::core::mem::MaybeUninit<::fidl_next::wire::Box<'static, crate::wire::Point>>,
130 _: (),
131 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
132 if let Some(inner) = this {
133 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
134 ::fidl_next::wire::Box::encode_present(out);
135 } else {
136 ::fidl_next::wire::Box::encode_absent(out);
137 }
138
139 Ok(())
140 }
141 }
142
143 impl ::fidl_next::FromWire<crate::wire::Point> for Point {
144 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Point, Self> = unsafe {
145 ::fidl_next::CopyOptimization::enable_if(
146 true && <i64 as ::fidl_next::FromWire<::fidl_next::wire::Int64>>::COPY_OPTIMIZATION
147 .is_enabled()
148 && <i64 as ::fidl_next::FromWire<::fidl_next::wire::Int64>>::COPY_OPTIMIZATION
149 .is_enabled(),
150 )
151 };
152
153 #[inline]
154 fn from_wire(wire: crate::wire::Point) -> Self {
155 Self {
156 x: ::fidl_next::FromWire::from_wire(wire.x),
157
158 y: ::fidl_next::FromWire::from_wire(wire.y),
159 }
160 }
161 }
162
163 impl ::fidl_next::FromWireRef<crate::wire::Point> for Point {
164 #[inline]
165 fn from_wire_ref(wire: &crate::wire::Point) -> Self {
166 Self {
167 x: ::fidl_next::FromWireRef::from_wire_ref(&wire.x),
168
169 y: ::fidl_next::FromWireRef::from_wire_ref(&wire.y),
170 }
171 }
172 }
173
174 #[doc = " A bounding box in 2D space. This is the result of \"drawing\" operations on our canvas, and what\n the server reports back to the client. These bounds are sufficient to contain all of the\n lines (inclusive) on a canvas at a given time.\n"]
175 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
176 #[repr(C)]
177 pub struct BoundingBox {
178 pub top_left: crate::natural::Point,
179
180 pub bottom_right: crate::natural::Point,
181 }
182
183 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BoundingBox, ___E> for BoundingBox
184 where
185 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
186 {
187 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::BoundingBox> = unsafe {
188 ::fidl_next::CopyOptimization::enable_if(
189 true
190
191 && <
192 crate::natural::Point as ::fidl_next::Encode<crate::wire::Point, ___E>
193 >::COPY_OPTIMIZATION.is_enabled()
194
195 && <
196 crate::natural::Point as ::fidl_next::Encode<crate::wire::Point, ___E>
197 >::COPY_OPTIMIZATION.is_enabled()
198
199 )
200 };
201
202 #[inline]
203 fn encode(
204 self,
205 encoder_: &mut ___E,
206 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoundingBox>,
207 _: (),
208 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
209 ::fidl_next::munge! {
210 let crate::wire::BoundingBox {
211 top_left,
212 bottom_right,
213
214 } = out_;
215 }
216
217 ::fidl_next::Encode::encode(self.top_left, encoder_, top_left, ())?;
218
219 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(top_left.as_mut_ptr()) };
220
221 ::fidl_next::Encode::encode(self.bottom_right, encoder_, bottom_right, ())?;
222
223 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bottom_right.as_mut_ptr()) };
224
225 Ok(())
226 }
227 }
228
229 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BoundingBox, ___E> for &'a BoundingBox
230 where
231 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
232 {
233 #[inline]
234 fn encode(
235 self,
236 encoder_: &mut ___E,
237 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoundingBox>,
238 _: (),
239 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
240 ::fidl_next::munge! {
241 let crate::wire::BoundingBox {
242 top_left,
243 bottom_right,
244
245 } = out_;
246 }
247
248 ::fidl_next::Encode::encode(&self.top_left, encoder_, top_left, ())?;
249
250 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(top_left.as_mut_ptr()) };
251
252 ::fidl_next::Encode::encode(&self.bottom_right, encoder_, bottom_right, ())?;
253
254 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bottom_right.as_mut_ptr()) };
255
256 Ok(())
257 }
258 }
259
260 unsafe impl<___E>
261 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::BoundingBox>, ___E>
262 for BoundingBox
263 where
264 ___E: ::fidl_next::Encoder + ?Sized,
265 BoundingBox: ::fidl_next::Encode<crate::wire::BoundingBox, ___E>,
266 {
267 #[inline]
268 fn encode_option(
269 this: ::core::option::Option<Self>,
270 encoder: &mut ___E,
271 out: &mut ::core::mem::MaybeUninit<
272 ::fidl_next::wire::Box<'static, crate::wire::BoundingBox>,
273 >,
274 _: (),
275 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
276 if let Some(inner) = this {
277 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
278 ::fidl_next::wire::Box::encode_present(out);
279 } else {
280 ::fidl_next::wire::Box::encode_absent(out);
281 }
282
283 Ok(())
284 }
285 }
286
287 unsafe impl<'a, ___E>
288 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::BoundingBox>, ___E>
289 for &'a BoundingBox
290 where
291 ___E: ::fidl_next::Encoder + ?Sized,
292 &'a BoundingBox: ::fidl_next::Encode<crate::wire::BoundingBox, ___E>,
293 {
294 #[inline]
295 fn encode_option(
296 this: ::core::option::Option<Self>,
297 encoder: &mut ___E,
298 out: &mut ::core::mem::MaybeUninit<
299 ::fidl_next::wire::Box<'static, crate::wire::BoundingBox>,
300 >,
301 _: (),
302 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
303 if let Some(inner) = this {
304 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
305 ::fidl_next::wire::Box::encode_present(out);
306 } else {
307 ::fidl_next::wire::Box::encode_absent(out);
308 }
309
310 Ok(())
311 }
312 }
313
314 impl ::fidl_next::FromWire<crate::wire::BoundingBox> for BoundingBox {
315 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::BoundingBox, Self> = unsafe {
316 ::fidl_next::CopyOptimization::enable_if(
317 true
318
319 && <
320 crate::natural::Point as ::fidl_next::FromWire<crate::wire::Point>
321 >::COPY_OPTIMIZATION.is_enabled()
322
323 && <
324 crate::natural::Point as ::fidl_next::FromWire<crate::wire::Point>
325 >::COPY_OPTIMIZATION.is_enabled()
326
327 )
328 };
329
330 #[inline]
331 fn from_wire(wire: crate::wire::BoundingBox) -> Self {
332 Self {
333 top_left: ::fidl_next::FromWire::from_wire(wire.top_left),
334
335 bottom_right: ::fidl_next::FromWire::from_wire(wire.bottom_right),
336 }
337 }
338 }
339
340 impl ::fidl_next::FromWireRef<crate::wire::BoundingBox> for BoundingBox {
341 #[inline]
342 fn from_wire_ref(wire: &crate::wire::BoundingBox) -> Self {
343 Self {
344 top_left: ::fidl_next::FromWireRef::from_wire_ref(&wire.top_left),
345
346 bottom_right: ::fidl_next::FromWireRef::from_wire_ref(&wire.bottom_right),
347 }
348 }
349 }
350
351 #[doc = " A line in 2D space.\n"]
352 pub type Line = [crate::natural::Point; 2];
353
354 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
355 #[repr(C)]
356 pub struct InstanceAddLineRequest {
357 pub line: [crate::natural::Point; 2],
358 }
359
360 unsafe impl<___E> ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>
361 for InstanceAddLineRequest
362 where
363 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
364 {
365 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
366 Self,
367 crate::wire::InstanceAddLineRequest,
368 > = unsafe {
369 ::fidl_next::CopyOptimization::enable_if(
370 true && <[crate::natural::Point; 2] as ::fidl_next::Encode<
371 [crate::wire::Point; 2],
372 ___E,
373 >>::COPY_OPTIMIZATION
374 .is_enabled(),
375 )
376 };
377
378 #[inline]
379 fn encode(
380 self,
381 encoder_: &mut ___E,
382 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceAddLineRequest>,
383 _: (),
384 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
385 ::fidl_next::munge! {
386 let crate::wire::InstanceAddLineRequest {
387 line,
388
389 } = out_;
390 }
391
392 ::fidl_next::Encode::encode(self.line, encoder_, line, ())?;
393
394 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(line.as_mut_ptr()) };
395
396 Ok(())
397 }
398 }
399
400 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>
401 for &'a InstanceAddLineRequest
402 where
403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
404 {
405 #[inline]
406 fn encode(
407 self,
408 encoder_: &mut ___E,
409 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceAddLineRequest>,
410 _: (),
411 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
412 ::fidl_next::munge! {
413 let crate::wire::InstanceAddLineRequest {
414 line,
415
416 } = out_;
417 }
418
419 ::fidl_next::Encode::encode(&self.line, encoder_, line, ())?;
420
421 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(line.as_mut_ptr()) };
422
423 Ok(())
424 }
425 }
426
427 unsafe impl<___E>
428 ::fidl_next::EncodeOption<
429 ::fidl_next::wire::Box<'static, crate::wire::InstanceAddLineRequest>,
430 ___E,
431 > for InstanceAddLineRequest
432 where
433 ___E: ::fidl_next::Encoder + ?Sized,
434 InstanceAddLineRequest: ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>,
435 {
436 #[inline]
437 fn encode_option(
438 this: ::core::option::Option<Self>,
439 encoder: &mut ___E,
440 out: &mut ::core::mem::MaybeUninit<
441 ::fidl_next::wire::Box<'static, crate::wire::InstanceAddLineRequest>,
442 >,
443 _: (),
444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
445 if let Some(inner) = this {
446 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
447 ::fidl_next::wire::Box::encode_present(out);
448 } else {
449 ::fidl_next::wire::Box::encode_absent(out);
450 }
451
452 Ok(())
453 }
454 }
455
456 unsafe impl<'a, ___E>
457 ::fidl_next::EncodeOption<
458 ::fidl_next::wire::Box<'static, crate::wire::InstanceAddLineRequest>,
459 ___E,
460 > for &'a InstanceAddLineRequest
461 where
462 ___E: ::fidl_next::Encoder + ?Sized,
463 &'a InstanceAddLineRequest: ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>,
464 {
465 #[inline]
466 fn encode_option(
467 this: ::core::option::Option<Self>,
468 encoder: &mut ___E,
469 out: &mut ::core::mem::MaybeUninit<
470 ::fidl_next::wire::Box<'static, crate::wire::InstanceAddLineRequest>,
471 >,
472 _: (),
473 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
474 if let Some(inner) = this {
475 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
476 ::fidl_next::wire::Box::encode_present(out);
477 } else {
478 ::fidl_next::wire::Box::encode_absent(out);
479 }
480
481 Ok(())
482 }
483 }
484
485 impl ::fidl_next::FromWire<crate::wire::InstanceAddLineRequest> for InstanceAddLineRequest {
486 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
487 crate::wire::InstanceAddLineRequest,
488 Self,
489 > = unsafe {
490 ::fidl_next::CopyOptimization::enable_if(
491 true && <[crate::natural::Point; 2] as ::fidl_next::FromWire<
492 [crate::wire::Point; 2],
493 >>::COPY_OPTIMIZATION
494 .is_enabled(),
495 )
496 };
497
498 #[inline]
499 fn from_wire(wire: crate::wire::InstanceAddLineRequest) -> Self {
500 Self { line: ::fidl_next::FromWire::from_wire(wire.line) }
501 }
502 }
503
504 impl ::fidl_next::FromWireRef<crate::wire::InstanceAddLineRequest> for InstanceAddLineRequest {
505 #[inline]
506 fn from_wire_ref(wire: &crate::wire::InstanceAddLineRequest) -> Self {
507 Self { line: ::fidl_next::FromWireRef::from_wire_ref(&wire.line) }
508 }
509 }
510
511 pub type InstanceAddLineResponse = ();
512}
513
514pub mod wire {
515
516 #[derive(Clone, Debug)]
518 #[repr(C)]
519 pub struct Point {
520 pub x: ::fidl_next::wire::Int64,
521
522 pub y: ::fidl_next::wire::Int64,
523 }
524
525 static_assertions::const_assert_eq!(std::mem::size_of::<Point>(), 16);
526 static_assertions::const_assert_eq!(std::mem::align_of::<Point>(), 8);
527
528 static_assertions::const_assert_eq!(std::mem::offset_of!(Point, x), 0);
529
530 static_assertions::const_assert_eq!(std::mem::offset_of!(Point, y), 8);
531
532 impl ::fidl_next::Constrained for Point {
533 type Constraint = ();
534
535 fn validate(
536 _: ::fidl_next::Slot<'_, Self>,
537 _: Self::Constraint,
538 ) -> Result<(), ::fidl_next::ValidationError> {
539 Ok(())
540 }
541 }
542
543 unsafe impl ::fidl_next::Wire for Point {
544 type Narrowed<'de> = Point;
545
546 #[inline]
547 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
548 ::fidl_next::munge! {
549 let Self {
550 x,
551 y,
552
553 } = &mut *out_;
554 }
555
556 ::fidl_next::Wire::zero_padding(x);
557
558 ::fidl_next::Wire::zero_padding(y);
559 }
560 }
561
562 unsafe impl<___D> ::fidl_next::Decode<___D> for Point
563 where
564 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
565 {
566 fn decode(
567 slot_: ::fidl_next::Slot<'_, Self>,
568 decoder_: &mut ___D,
569 _: (),
570 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
571 ::fidl_next::munge! {
572 let Self {
573 mut x,
574 mut y,
575
576 } = slot_;
577 }
578
579 let _field = x.as_mut();
580
581 ::fidl_next::Decode::decode(x.as_mut(), decoder_, ())?;
582
583 let _field = y.as_mut();
584
585 ::fidl_next::Decode::decode(y.as_mut(), decoder_, ())?;
586
587 Ok(())
588 }
589 }
590
591 impl ::fidl_next::IntoNatural for Point {
592 type Natural = crate::natural::Point;
593 }
594
595 #[derive(Clone, Debug)]
597 #[repr(C)]
598 pub struct BoundingBox {
599 pub top_left: crate::wire::Point,
600
601 pub bottom_right: crate::wire::Point,
602 }
603
604 static_assertions::const_assert_eq!(std::mem::size_of::<BoundingBox>(), 32);
605 static_assertions::const_assert_eq!(std::mem::align_of::<BoundingBox>(), 8);
606
607 static_assertions::const_assert_eq!(std::mem::offset_of!(BoundingBox, top_left), 0);
608
609 static_assertions::const_assert_eq!(std::mem::offset_of!(BoundingBox, bottom_right), 16);
610
611 impl ::fidl_next::Constrained for BoundingBox {
612 type Constraint = ();
613
614 fn validate(
615 _: ::fidl_next::Slot<'_, Self>,
616 _: Self::Constraint,
617 ) -> Result<(), ::fidl_next::ValidationError> {
618 Ok(())
619 }
620 }
621
622 unsafe impl ::fidl_next::Wire for BoundingBox {
623 type Narrowed<'de> = BoundingBox;
624
625 #[inline]
626 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
627 ::fidl_next::munge! {
628 let Self {
629 top_left,
630 bottom_right,
631
632 } = &mut *out_;
633 }
634
635 ::fidl_next::Wire::zero_padding(top_left);
636
637 ::fidl_next::Wire::zero_padding(bottom_right);
638 }
639 }
640
641 unsafe impl<___D> ::fidl_next::Decode<___D> for BoundingBox
642 where
643 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
644 {
645 fn decode(
646 slot_: ::fidl_next::Slot<'_, Self>,
647 decoder_: &mut ___D,
648 _: (),
649 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
650 ::fidl_next::munge! {
651 let Self {
652 mut top_left,
653 mut bottom_right,
654
655 } = slot_;
656 }
657
658 let _field = top_left.as_mut();
659
660 ::fidl_next::Decode::decode(top_left.as_mut(), decoder_, ())?;
661
662 let _field = bottom_right.as_mut();
663
664 ::fidl_next::Decode::decode(bottom_right.as_mut(), decoder_, ())?;
665
666 Ok(())
667 }
668 }
669
670 impl ::fidl_next::IntoNatural for BoundingBox {
671 type Natural = crate::natural::BoundingBox;
672 }
673
674 pub type Line = [crate::wire::Point; 2];
676
677 #[derive(Clone, Debug)]
679 #[repr(C)]
680 pub struct InstanceAddLineRequest {
681 pub line: [crate::wire::Point; 2],
682 }
683
684 static_assertions::const_assert_eq!(std::mem::size_of::<InstanceAddLineRequest>(), 32);
685 static_assertions::const_assert_eq!(std::mem::align_of::<InstanceAddLineRequest>(), 8);
686
687 static_assertions::const_assert_eq!(std::mem::offset_of!(InstanceAddLineRequest, line), 0);
688
689 impl ::fidl_next::Constrained for InstanceAddLineRequest {
690 type Constraint = ();
691
692 fn validate(
693 _: ::fidl_next::Slot<'_, Self>,
694 _: Self::Constraint,
695 ) -> Result<(), ::fidl_next::ValidationError> {
696 Ok(())
697 }
698 }
699
700 unsafe impl ::fidl_next::Wire for InstanceAddLineRequest {
701 type Narrowed<'de> = InstanceAddLineRequest;
702
703 #[inline]
704 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
705 ::fidl_next::munge! {
706 let Self {
707 line,
708
709 } = &mut *out_;
710 }
711
712 ::fidl_next::Wire::zero_padding(line);
713 }
714 }
715
716 unsafe impl<___D> ::fidl_next::Decode<___D> for InstanceAddLineRequest
717 where
718 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
719 {
720 fn decode(
721 slot_: ::fidl_next::Slot<'_, Self>,
722 decoder_: &mut ___D,
723 _: (),
724 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
725 ::fidl_next::munge! {
726 let Self {
727 mut line,
728
729 } = slot_;
730 }
731
732 let _field = line.as_mut();
733
734 ::fidl_next::Decode::decode(line.as_mut(), decoder_, ())?;
735
736 Ok(())
737 }
738 }
739
740 impl ::fidl_next::IntoNatural for InstanceAddLineRequest {
741 type Natural = crate::natural::InstanceAddLineRequest;
742 }
743
744 pub type InstanceAddLineResponse = ::fidl_next::wire::Unit;
746}
747
748pub mod wire_optional {}
749
750pub mod generic {
751
752 pub struct Point<T0, T1> {
754 pub x: T0,
755
756 pub y: T1,
757 }
758
759 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Point, ___E> for Point<T0, T1>
760 where
761 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
762 T0: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
763 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
764 {
765 #[inline]
766 fn encode(
767 self,
768 encoder_: &mut ___E,
769 out_: &mut ::core::mem::MaybeUninit<crate::wire::Point>,
770 _: (),
771 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
772 ::fidl_next::munge! {
773 let crate::wire::Point {
774 x,
775 y,
776
777 } = out_;
778 }
779
780 ::fidl_next::Encode::encode(self.x, encoder_, x, ())?;
781
782 ::fidl_next::Encode::encode(self.y, encoder_, y, ())?;
783
784 Ok(())
785 }
786 }
787
788 pub struct BoundingBox<T0, T1> {
790 pub top_left: T0,
791
792 pub bottom_right: T1,
793 }
794
795 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::BoundingBox, ___E>
796 for BoundingBox<T0, T1>
797 where
798 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
799 T0: ::fidl_next::Encode<crate::wire::Point, ___E>,
800 T1: ::fidl_next::Encode<crate::wire::Point, ___E>,
801 {
802 #[inline]
803 fn encode(
804 self,
805 encoder_: &mut ___E,
806 out_: &mut ::core::mem::MaybeUninit<crate::wire::BoundingBox>,
807 _: (),
808 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
809 ::fidl_next::munge! {
810 let crate::wire::BoundingBox {
811 top_left,
812 bottom_right,
813
814 } = out_;
815 }
816
817 ::fidl_next::Encode::encode(self.top_left, encoder_, top_left, ())?;
818
819 ::fidl_next::Encode::encode(self.bottom_right, encoder_, bottom_right, ())?;
820
821 Ok(())
822 }
823 }
824
825 pub struct InstanceAddLineRequest<T0> {
827 pub line: T0,
828 }
829
830 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::InstanceAddLineRequest, ___E>
831 for InstanceAddLineRequest<T0>
832 where
833 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
834 T0: ::fidl_next::Encode<[crate::wire::Point; 2], ___E>,
835 {
836 #[inline]
837 fn encode(
838 self,
839 encoder_: &mut ___E,
840 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceAddLineRequest>,
841 _: (),
842 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
843 ::fidl_next::munge! {
844 let crate::wire::InstanceAddLineRequest {
845 line,
846
847 } = out_;
848 }
849
850 ::fidl_next::Encode::encode(self.line, encoder_, line, ())?;
851
852 Ok(())
853 }
854 }
855
856 pub type InstanceAddLineResponse = ();
858}
859
860pub use self::natural::*;
861
862#[doc = " Manages a single instance of a canvas. Each session of this protocol is responsible for a new\n canvas.\n"]
864#[derive(PartialEq, Debug)]
865pub struct Instance;
866
867impl ::fidl_next::Discoverable for Instance {
868 const PROTOCOL_NAME: &'static str = "examples.canvas.addlinemetered.Instance";
869}
870
871#[cfg(target_os = "fuchsia")]
872impl ::fidl_next::HasTransport for Instance {
873 type Transport = ::fidl_next::fuchsia::zx::Channel;
874}
875
876pub mod instance {
877 pub mod prelude {
878 pub use crate::{
879 Instance, InstanceClientHandler, InstanceLocalClientHandler,
880 InstanceLocalServerHandler, InstanceServerHandler, instance,
881 };
882
883 pub use crate::natural::BoundingBox;
884
885 pub use crate::natural::InstanceAddLineRequest;
886
887 pub use crate::natural::InstanceAddLineResponse;
888 }
889
890 pub struct AddLine;
891
892 impl ::fidl_next::Method for AddLine {
893 const ORDINAL: u64 = 5692389758001463633;
894 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
895 ::fidl_next::protocol::Flexibility::Flexible;
896
897 type Protocol = crate::Instance;
898
899 type Request = crate::wire::InstanceAddLineRequest;
900 }
901
902 impl ::fidl_next::TwoWayMethod for AddLine {
903 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::InstanceAddLineResponse>;
904 }
905
906 impl<___R> ::fidl_next::Respond<___R> for AddLine {
907 type Output = ::fidl_next::Flexible<___R>;
908
909 fn respond(response: ___R) -> Self::Output {
910 ::fidl_next::Flexible::Ok(response)
911 }
912 }
913
914 pub struct OnDrawn;
915
916 impl ::fidl_next::Method for OnDrawn {
917 const ORDINAL: u64 = 3431237471904686519;
918 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
919 ::fidl_next::protocol::Flexibility::Flexible;
920
921 type Protocol = crate::Instance;
922
923 type Request = crate::wire::BoundingBox;
924 }
925
926 mod ___detail {
927 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Instance
928 where
929 ___T: ::fidl_next::Transport,
930 {
931 type Client = InstanceClient<___T>;
932 type Server = InstanceServer<___T>;
933 }
934
935 #[repr(transparent)]
937 pub struct InstanceClient<___T: ::fidl_next::Transport> {
938 #[allow(dead_code)]
939 client: ::fidl_next::protocol::Client<___T>,
940 }
941
942 impl<___T> InstanceClient<___T>
943 where
944 ___T: ::fidl_next::Transport,
945 {
946 #[doc = " Add a line to the canvas.\n\n This method can be considered an improvement over the one-way case from a flow control\n perspective, as it is now much more difficult for a well-behaved client to \"get ahead\" of\n the server and overwhelm. This is because the client now waits for each request to be acked\n by the server before proceeding. This change represents a trade-off: we get much greater\n synchronization of message flow between the client and the server, at the cost of worse\n performance at the limit due to the extra wait imposed by each ack.\n"]
947 pub fn add_line(
948 &self,
949
950 line: impl ::fidl_next::Encode<
951 [crate::wire::Point; 2],
952 <___T as ::fidl_next::Transport>::SendBuffer,
953 >,
954 ) -> ::fidl_next::TwoWayFuture<'_, super::AddLine, ___T>
955 where
956 <___T as ::fidl_next::Transport>::SendBuffer:
957 ::fidl_next::encoder::InternalHandleEncoder,
958 {
959 self.add_line_with(crate::generic::InstanceAddLineRequest { line })
960 }
961
962 #[doc = " Add a line to the canvas.\n\n This method can be considered an improvement over the one-way case from a flow control\n perspective, as it is now much more difficult for a well-behaved client to \"get ahead\" of\n the server and overwhelm. This is because the client now waits for each request to be acked\n by the server before proceeding. This change represents a trade-off: we get much greater\n synchronization of message flow between the client and the server, at the cost of worse\n performance at the limit due to the extra wait imposed by each ack.\n"]
963 pub fn add_line_with<___R>(
964 &self,
965 request: ___R,
966 ) -> ::fidl_next::TwoWayFuture<'_, super::AddLine, ___T>
967 where
968 ___R: ::fidl_next::Encode<
969 crate::wire::InstanceAddLineRequest,
970 <___T as ::fidl_next::Transport>::SendBuffer,
971 >,
972 {
973 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
974 5692389758001463633,
975 <super::AddLine as ::fidl_next::Method>::FLEXIBILITY,
976 request,
977 ))
978 }
979 }
980
981 #[repr(transparent)]
983 pub struct InstanceServer<___T: ::fidl_next::Transport> {
984 server: ::fidl_next::protocol::Server<___T>,
985 }
986
987 impl<___T> InstanceServer<___T>
988 where
989 ___T: ::fidl_next::Transport,
990 {
991 #[doc = " Update the client with the latest drawing state. The server makes no guarantees about how\n often this event occurs - it could occur multiple times per board state, for example.\n"]
992 pub fn on_drawn(
993 &self,
994
995 top_left: impl ::fidl_next::Encode<
996 crate::wire::Point,
997 <___T as ::fidl_next::Transport>::SendBuffer,
998 >,
999
1000 bottom_right: impl ::fidl_next::Encode<
1001 crate::wire::Point,
1002 <___T as ::fidl_next::Transport>::SendBuffer,
1003 >,
1004 ) -> ::fidl_next::SendFuture<'_, ___T>
1005 where
1006 <___T as ::fidl_next::Transport>::SendBuffer:
1007 ::fidl_next::encoder::InternalHandleEncoder,
1008 {
1009 self.on_drawn_with(crate::generic::BoundingBox { top_left, bottom_right })
1010 }
1011
1012 #[doc = " Update the client with the latest drawing state. The server makes no guarantees about how\n often this event occurs - it could occur multiple times per board state, for example.\n"]
1013
1014 pub fn on_drawn_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
1015 where
1016 ___R: ::fidl_next::Encode<
1017 <super::OnDrawn as ::fidl_next::Method>::Request,
1018 <___T as ::fidl_next::Transport>::SendBuffer,
1019 >,
1020 {
1021 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
1022 3431237471904686519,
1023 <super::OnDrawn as ::fidl_next::Method>::FLEXIBILITY,
1024 request,
1025 ))
1026 }
1027 }
1028 }
1029}
1030
1031#[diagnostic::on_unimplemented(
1032 note = "If {Self} implements the non-local InstanceClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1033)]
1034
1035pub trait InstanceLocalClientHandler<
1039 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1040 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1041>
1042{
1043 #[doc = " Update the client with the latest drawing state. The server makes no guarantees about how\n often this event occurs - it could occur multiple times per board state, for example.\n"]
1044 fn on_drawn(
1045 &mut self,
1046
1047 request: ::fidl_next::Request<instance::OnDrawn, ___T>,
1048 ) -> impl ::core::future::Future<Output = ()>;
1049
1050 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1051 ::core::future::ready(())
1052 }
1053}
1054
1055impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Instance
1056where
1057 ___H: InstanceLocalClientHandler<___T>,
1058 ___T: ::fidl_next::Transport,
1059 for<'de> crate::wire::BoundingBox: ::fidl_next::Decode<
1060 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1061 Constraint = (),
1062 >,
1063{
1064 async fn on_event(
1065 handler: &mut ___H,
1066 ordinal: u64,
1067 flexibility: ::fidl_next::protocol::Flexibility,
1068 body: ::fidl_next::Body<___T>,
1069 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1070 match ordinal {
1071 3431237471904686519 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
1072 Ok(decoded) => {
1073 handler.on_drawn(::fidl_next::Request::from_decoded(decoded)).await;
1074 Ok(())
1075 }
1076 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1077 ordinal: 3431237471904686519,
1078 error,
1079 }),
1080 },
1081
1082 ordinal => {
1083 handler.on_unknown_interaction(ordinal).await;
1084 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1085 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1086 } else {
1087 Ok(())
1088 }
1089 }
1090 }
1091 }
1092}
1093
1094#[diagnostic::on_unimplemented(
1095 note = "If {Self} implements the non-local InstanceServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1096)]
1097
1098pub trait InstanceLocalServerHandler<
1102 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1103 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1104>
1105{
1106 #[doc = " Add a line to the canvas.\n\n This method can be considered an improvement over the one-way case from a flow control\n perspective, as it is now much more difficult for a well-behaved client to \"get ahead\" of\n the server and overwhelm. This is because the client now waits for each request to be acked\n by the server before proceeding. This change represents a trade-off: we get much greater\n synchronization of message flow between the client and the server, at the cost of worse\n performance at the limit due to the extra wait imposed by each ack.\n"]
1107 fn add_line(
1108 &mut self,
1109
1110 request: ::fidl_next::Request<instance::AddLine, ___T>,
1111
1112 responder: ::fidl_next::Responder<instance::AddLine, ___T>,
1113 ) -> impl ::core::future::Future<Output = ()>;
1114
1115 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1116 ::core::future::ready(())
1117 }
1118}
1119
1120impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Instance
1121where
1122 ___H: InstanceLocalServerHandler<___T>,
1123 ___T: ::fidl_next::Transport,
1124 for<'de> crate::wire::InstanceAddLineRequest: ::fidl_next::Decode<
1125 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1126 Constraint = (),
1127 >,
1128{
1129 async fn on_one_way(
1130 handler: &mut ___H,
1131 ordinal: u64,
1132 flexibility: ::fidl_next::protocol::Flexibility,
1133 body: ::fidl_next::Body<___T>,
1134 ) -> ::core::result::Result<
1135 (),
1136 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1137 > {
1138 match ordinal {
1139 ordinal => {
1140 handler.on_unknown_interaction(ordinal).await;
1141 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1142 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1143 } else {
1144 Ok(())
1145 }
1146 }
1147 }
1148 }
1149
1150 async fn on_two_way(
1151 handler: &mut ___H,
1152 ordinal: u64,
1153 flexibility: ::fidl_next::protocol::Flexibility,
1154 body: ::fidl_next::Body<___T>,
1155 responder: ::fidl_next::protocol::Responder<___T>,
1156 ) -> ::core::result::Result<
1157 (),
1158 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1159 > {
1160 match ordinal {
1161 5692389758001463633 => {
1162 let responder = ::fidl_next::Responder::from_untyped(responder);
1163
1164 match ::fidl_next::AsDecoderExt::into_decoded(body) {
1165 Ok(decoded) => {
1166 handler
1167 .add_line(::fidl_next::Request::from_decoded(decoded), responder)
1168 .await;
1169 Ok(())
1170 }
1171 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1172 ordinal: 5692389758001463633,
1173 error,
1174 }),
1175 }
1176 }
1177
1178 ordinal => {
1179 handler.on_unknown_interaction(ordinal).await;
1180 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1181 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1182 } else {
1183 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
1184 ordinal,
1185 flexibility,
1186 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
1187 )
1188 .expect("encoding a framework error should never fail")
1189 .await?;
1190 Ok(())
1191 }
1192 }
1193 }
1194 }
1195}
1196
1197pub trait InstanceClientHandler<
1201 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1202 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1203>
1204{
1205 #[doc = " Update the client with the latest drawing state. The server makes no guarantees about how\n often this event occurs - it could occur multiple times per board state, for example.\n"]
1206 fn on_drawn(
1207 &mut self,
1208
1209 request: ::fidl_next::Request<instance::OnDrawn, ___T>,
1210 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1211
1212 fn on_unknown_interaction(
1213 &mut self,
1214 ordinal: u64,
1215 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1216 ::core::future::ready(())
1217 }
1218}
1219
1220impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Instance
1221where
1222 ___H: InstanceClientHandler<___T> + ::core::marker::Send,
1223 ___T: ::fidl_next::Transport,
1224 for<'de> crate::wire::BoundingBox: ::fidl_next::Decode<
1225 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1226 Constraint = (),
1227 >,
1228{
1229 async fn on_event(
1230 handler: &mut ___H,
1231 ordinal: u64,
1232 flexibility: ::fidl_next::protocol::Flexibility,
1233 body: ::fidl_next::Body<___T>,
1234 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1235 match ordinal {
1236 3431237471904686519 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
1237 Ok(decoded) => {
1238 handler.on_drawn(::fidl_next::Request::from_decoded(decoded)).await;
1239 Ok(())
1240 }
1241 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1242 ordinal: 3431237471904686519,
1243 error,
1244 }),
1245 },
1246
1247 ordinal => {
1248 handler.on_unknown_interaction(ordinal).await;
1249 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1250 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1251 } else {
1252 Ok(())
1253 }
1254 }
1255 }
1256 }
1257}
1258
1259pub trait InstanceServerHandler<
1263 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1264 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1265>
1266{
1267 #[doc = " Add a line to the canvas.\n\n This method can be considered an improvement over the one-way case from a flow control\n perspective, as it is now much more difficult for a well-behaved client to \"get ahead\" of\n the server and overwhelm. This is because the client now waits for each request to be acked\n by the server before proceeding. This change represents a trade-off: we get much greater\n synchronization of message flow between the client and the server, at the cost of worse\n performance at the limit due to the extra wait imposed by each ack.\n"]
1268 fn add_line(
1269 &mut self,
1270
1271 request: ::fidl_next::Request<instance::AddLine, ___T>,
1272
1273 responder: ::fidl_next::Responder<instance::AddLine, ___T>,
1274 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1275
1276 fn on_unknown_interaction(
1277 &mut self,
1278 ordinal: u64,
1279 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1280 ::core::future::ready(())
1281 }
1282}
1283
1284impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Instance
1285where
1286 ___H: InstanceServerHandler<___T> + ::core::marker::Send,
1287 ___T: ::fidl_next::Transport,
1288 for<'de> crate::wire::InstanceAddLineRequest: ::fidl_next::Decode<
1289 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1290 Constraint = (),
1291 >,
1292{
1293 async fn on_one_way(
1294 handler: &mut ___H,
1295 ordinal: u64,
1296 flexibility: ::fidl_next::protocol::Flexibility,
1297 body: ::fidl_next::Body<___T>,
1298 ) -> ::core::result::Result<
1299 (),
1300 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1301 > {
1302 match ordinal {
1303 ordinal => {
1304 handler.on_unknown_interaction(ordinal).await;
1305 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1306 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1307 } else {
1308 Ok(())
1309 }
1310 }
1311 }
1312 }
1313
1314 async fn on_two_way(
1315 handler: &mut ___H,
1316 ordinal: u64,
1317 flexibility: ::fidl_next::protocol::Flexibility,
1318 body: ::fidl_next::Body<___T>,
1319 responder: ::fidl_next::protocol::Responder<___T>,
1320 ) -> ::core::result::Result<
1321 (),
1322 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1323 > {
1324 match ordinal {
1325 5692389758001463633 => {
1326 let responder = ::fidl_next::Responder::from_untyped(responder);
1327
1328 match ::fidl_next::AsDecoderExt::into_decoded(body) {
1329 Ok(decoded) => {
1330 handler
1331 .add_line(::fidl_next::Request::from_decoded(decoded), responder)
1332 .await;
1333 Ok(())
1334 }
1335 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1336 ordinal: 5692389758001463633,
1337 error,
1338 }),
1339 }
1340 }
1341
1342 ordinal => {
1343 handler.on_unknown_interaction(ordinal).await;
1344 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1345 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1346 } else {
1347 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
1348 ordinal,
1349 flexibility,
1350 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
1351 )
1352 .expect("encoding a framework error should never fail")
1353 .await?;
1354 Ok(())
1355 }
1356 }
1357 }
1358 }
1359}
1360
1361impl<___T> InstanceClientHandler<___T> for ::fidl_next::IgnoreEvents
1362where
1363 ___T: ::fidl_next::Transport,
1364{
1365 async fn on_drawn(&mut self, _: ::fidl_next::Request<instance::OnDrawn, ___T>) {}
1366
1367 async fn on_unknown_interaction(&mut self, _: u64) {}
1368}
1369
1370impl<___H, ___T> InstanceLocalClientHandler<___T> for ::fidl_next::Local<___H>
1371where
1372 ___H: InstanceClientHandler<___T>,
1373 ___T: ::fidl_next::Transport,
1374{
1375 async fn on_drawn(&mut self, request: ::fidl_next::Request<instance::OnDrawn, ___T>) {
1376 ___H::on_drawn(&mut self.0, request).await
1377 }
1378
1379 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1380 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1381 }
1382}
1383
1384impl<___H, ___T> InstanceLocalServerHandler<___T> for ::fidl_next::Local<___H>
1385where
1386 ___H: InstanceServerHandler<___T>,
1387 ___T: ::fidl_next::Transport,
1388{
1389 async fn add_line(
1390 &mut self,
1391
1392 request: ::fidl_next::Request<instance::AddLine, ___T>,
1393
1394 responder: ::fidl_next::Responder<instance::AddLine, ___T>,
1395 ) {
1396 ___H::add_line(&mut self.0, request, responder).await
1397 }
1398
1399 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1400 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1401 }
1402}