1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8 pub struct DeviceTransmitVectorRequest {
9 pub data: ::std::vec::Vec<u8>,
10 }
11
12 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceTransmitVectorRequest<'static>, ___E>
13 for DeviceTransmitVectorRequest
14 where
15 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16 ___E: ::fidl_next::Encoder,
17 {
18 #[inline]
19 fn encode(
20 self,
21 encoder_: &mut ___E,
22 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceTransmitVectorRequest<'static>>,
23 _: (),
24 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
25 ::fidl_next::munge! {
26 let crate::wire::DeviceTransmitVectorRequest {
27 data,
28
29 } = out_;
30 }
31
32 ::fidl_next::Encode::encode(self.data, encoder_, data, (8196, ()))?;
33
34 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
35 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
36
37 Ok(())
38 }
39 }
40
41 unsafe impl<'a, ___E>
42 ::fidl_next::Encode<crate::wire::DeviceTransmitVectorRequest<'static>, ___E>
43 for &'a DeviceTransmitVectorRequest
44 where
45 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
46 ___E: ::fidl_next::Encoder,
47 {
48 #[inline]
49 fn encode(
50 self,
51 encoder_: &mut ___E,
52 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceTransmitVectorRequest<'static>>,
53 _: (),
54 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
55 ::fidl_next::munge! {
56 let crate::wire::DeviceTransmitVectorRequest {
57 data,
58
59 } = out_;
60 }
61
62 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8196, ()))?;
63
64 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
65 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
66
67 Ok(())
68 }
69 }
70
71 unsafe impl<___E>
72 ::fidl_next::EncodeOption<
73 ::fidl_next::wire::Box<'static, crate::wire::DeviceTransmitVectorRequest<'static>>,
74 ___E,
75 > for DeviceTransmitVectorRequest
76 where
77 ___E: ::fidl_next::Encoder + ?Sized,
78 DeviceTransmitVectorRequest:
79 ::fidl_next::Encode<crate::wire::DeviceTransmitVectorRequest<'static>, ___E>,
80 {
81 #[inline]
82 fn encode_option(
83 this: ::core::option::Option<Self>,
84 encoder: &mut ___E,
85 out: &mut ::core::mem::MaybeUninit<
86 ::fidl_next::wire::Box<'static, crate::wire::DeviceTransmitVectorRequest<'static>>,
87 >,
88 _: (),
89 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
90 if let Some(inner) = this {
91 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
92 ::fidl_next::wire::Box::encode_present(out);
93 } else {
94 ::fidl_next::wire::Box::encode_absent(out);
95 }
96
97 Ok(())
98 }
99 }
100
101 unsafe impl<'a, ___E>
102 ::fidl_next::EncodeOption<
103 ::fidl_next::wire::Box<'static, crate::wire::DeviceTransmitVectorRequest<'static>>,
104 ___E,
105 > for &'a DeviceTransmitVectorRequest
106 where
107 ___E: ::fidl_next::Encoder + ?Sized,
108 &'a DeviceTransmitVectorRequest:
109 ::fidl_next::Encode<crate::wire::DeviceTransmitVectorRequest<'static>, ___E>,
110 {
111 #[inline]
112 fn encode_option(
113 this: ::core::option::Option<Self>,
114 encoder: &mut ___E,
115 out: &mut ::core::mem::MaybeUninit<
116 ::fidl_next::wire::Box<'static, crate::wire::DeviceTransmitVectorRequest<'static>>,
117 >,
118 _: (),
119 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
120 if let Some(inner) = this {
121 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
122 ::fidl_next::wire::Box::encode_present(out);
123 } else {
124 ::fidl_next::wire::Box::encode_absent(out);
125 }
126
127 Ok(())
128 }
129 }
130
131 impl<'de> ::fidl_next::FromWire<crate::wire::DeviceTransmitVectorRequest<'de>>
132 for DeviceTransmitVectorRequest
133 {
134 #[inline]
135 fn from_wire(wire: crate::wire::DeviceTransmitVectorRequest<'de>) -> Self {
136 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
137 }
138 }
139
140 impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceTransmitVectorRequest<'de>>
141 for DeviceTransmitVectorRequest
142 {
143 #[inline]
144 fn from_wire_ref(wire: &crate::wire::DeviceTransmitVectorRequest<'de>) -> Self {
145 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
146 }
147 }
148
149 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
150 #[repr(C)]
151 pub struct DeviceTransmitVectorResponse {
152 pub status: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
153 }
154
155 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceTransmitVectorResponse, ___E>
156 for DeviceTransmitVectorResponse
157 where
158 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
159 {
160 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
161 Self,
162 crate::wire::DeviceTransmitVectorResponse,
163 > = unsafe {
164 ::fidl_next::CopyOptimization::enable_if(
165 true
166
167 && <
168 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
169 >::COPY_OPTIMIZATION.is_enabled()
170
171 )
172 };
173
174 #[inline]
175 fn encode(
176 self,
177 encoder_: &mut ___E,
178 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceTransmitVectorResponse>,
179 _: (),
180 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
181 ::fidl_next::munge! {
182 let crate::wire::DeviceTransmitVectorResponse {
183 status,
184
185 } = out_;
186 }
187
188 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
189
190 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
191
192 Ok(())
193 }
194 }
195
196 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceTransmitVectorResponse, ___E>
197 for &'a DeviceTransmitVectorResponse
198 where
199 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
200 {
201 #[inline]
202 fn encode(
203 self,
204 encoder_: &mut ___E,
205 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceTransmitVectorResponse>,
206 _: (),
207 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
208 ::fidl_next::munge! {
209 let crate::wire::DeviceTransmitVectorResponse {
210 status,
211
212 } = out_;
213 }
214
215 ::fidl_next::Encode::encode(&self.status, encoder_, status, ())?;
216
217 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
218
219 Ok(())
220 }
221 }
222
223 unsafe impl<___E>
224 ::fidl_next::EncodeOption<
225 ::fidl_next::wire::Box<'static, crate::wire::DeviceTransmitVectorResponse>,
226 ___E,
227 > for DeviceTransmitVectorResponse
228 where
229 ___E: ::fidl_next::Encoder + ?Sized,
230 DeviceTransmitVectorResponse:
231 ::fidl_next::Encode<crate::wire::DeviceTransmitVectorResponse, ___E>,
232 {
233 #[inline]
234 fn encode_option(
235 this: ::core::option::Option<Self>,
236 encoder: &mut ___E,
237 out: &mut ::core::mem::MaybeUninit<
238 ::fidl_next::wire::Box<'static, crate::wire::DeviceTransmitVectorResponse>,
239 >,
240 _: (),
241 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
242 if let Some(inner) = this {
243 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
244 ::fidl_next::wire::Box::encode_present(out);
245 } else {
246 ::fidl_next::wire::Box::encode_absent(out);
247 }
248
249 Ok(())
250 }
251 }
252
253 unsafe impl<'a, ___E>
254 ::fidl_next::EncodeOption<
255 ::fidl_next::wire::Box<'static, crate::wire::DeviceTransmitVectorResponse>,
256 ___E,
257 > for &'a DeviceTransmitVectorResponse
258 where
259 ___E: ::fidl_next::Encoder + ?Sized,
260 &'a DeviceTransmitVectorResponse:
261 ::fidl_next::Encode<crate::wire::DeviceTransmitVectorResponse, ___E>,
262 {
263 #[inline]
264 fn encode_option(
265 this: ::core::option::Option<Self>,
266 encoder: &mut ___E,
267 out: &mut ::core::mem::MaybeUninit<
268 ::fidl_next::wire::Box<'static, crate::wire::DeviceTransmitVectorResponse>,
269 >,
270 _: (),
271 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
272 if let Some(inner) = this {
273 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
274 ::fidl_next::wire::Box::encode_present(out);
275 } else {
276 ::fidl_next::wire::Box::encode_absent(out);
277 }
278
279 Ok(())
280 }
281 }
282
283 impl ::fidl_next::FromWire<crate::wire::DeviceTransmitVectorResponse>
284 for DeviceTransmitVectorResponse
285 {
286 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
287 crate::wire::DeviceTransmitVectorResponse,
288 Self,
289 > = unsafe {
290 ::fidl_next::CopyOptimization::enable_if(
291 true
292
293 && <
294 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
295 >::COPY_OPTIMIZATION.is_enabled()
296
297 )
298 };
299
300 #[inline]
301 fn from_wire(wire: crate::wire::DeviceTransmitVectorResponse) -> Self {
302 Self { status: ::fidl_next::FromWire::from_wire(wire.status) }
303 }
304 }
305
306 impl ::fidl_next::FromWireRef<crate::wire::DeviceTransmitVectorResponse>
307 for DeviceTransmitVectorResponse
308 {
309 #[inline]
310 fn from_wire_ref(wire: &crate::wire::DeviceTransmitVectorResponse) -> Self {
311 Self { status: ::fidl_next::FromWireRef::from_wire_ref(&wire.status) }
312 }
313 }
314
315 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
316 #[repr(C)]
317 pub struct DeviceReceiveVectorRequest {
318 pub size: u32,
319 }
320
321 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceReceiveVectorRequest, ___E>
322 for DeviceReceiveVectorRequest
323 where
324 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
325 {
326 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
327 Self,
328 crate::wire::DeviceReceiveVectorRequest,
329 > = unsafe {
330 ::fidl_next::CopyOptimization::enable_if(
331 true
332
333 && <
334 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
335 >::COPY_OPTIMIZATION.is_enabled()
336
337 )
338 };
339
340 #[inline]
341 fn encode(
342 self,
343 encoder_: &mut ___E,
344 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceReceiveVectorRequest>,
345 _: (),
346 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
347 ::fidl_next::munge! {
348 let crate::wire::DeviceReceiveVectorRequest {
349 size,
350
351 } = out_;
352 }
353
354 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
355
356 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(size.as_mut_ptr()) };
357
358 Ok(())
359 }
360 }
361
362 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceReceiveVectorRequest, ___E>
363 for &'a DeviceReceiveVectorRequest
364 where
365 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
366 {
367 #[inline]
368 fn encode(
369 self,
370 encoder_: &mut ___E,
371 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceReceiveVectorRequest>,
372 _: (),
373 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
374 ::fidl_next::munge! {
375 let crate::wire::DeviceReceiveVectorRequest {
376 size,
377
378 } = out_;
379 }
380
381 ::fidl_next::Encode::encode(&self.size, encoder_, size, ())?;
382
383 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(size.as_mut_ptr()) };
384
385 Ok(())
386 }
387 }
388
389 unsafe impl<___E>
390 ::fidl_next::EncodeOption<
391 ::fidl_next::wire::Box<'static, crate::wire::DeviceReceiveVectorRequest>,
392 ___E,
393 > for DeviceReceiveVectorRequest
394 where
395 ___E: ::fidl_next::Encoder + ?Sized,
396 DeviceReceiveVectorRequest:
397 ::fidl_next::Encode<crate::wire::DeviceReceiveVectorRequest, ___E>,
398 {
399 #[inline]
400 fn encode_option(
401 this: ::core::option::Option<Self>,
402 encoder: &mut ___E,
403 out: &mut ::core::mem::MaybeUninit<
404 ::fidl_next::wire::Box<'static, crate::wire::DeviceReceiveVectorRequest>,
405 >,
406 _: (),
407 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
408 if let Some(inner) = this {
409 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
410 ::fidl_next::wire::Box::encode_present(out);
411 } else {
412 ::fidl_next::wire::Box::encode_absent(out);
413 }
414
415 Ok(())
416 }
417 }
418
419 unsafe impl<'a, ___E>
420 ::fidl_next::EncodeOption<
421 ::fidl_next::wire::Box<'static, crate::wire::DeviceReceiveVectorRequest>,
422 ___E,
423 > for &'a DeviceReceiveVectorRequest
424 where
425 ___E: ::fidl_next::Encoder + ?Sized,
426 &'a DeviceReceiveVectorRequest:
427 ::fidl_next::Encode<crate::wire::DeviceReceiveVectorRequest, ___E>,
428 {
429 #[inline]
430 fn encode_option(
431 this: ::core::option::Option<Self>,
432 encoder: &mut ___E,
433 out: &mut ::core::mem::MaybeUninit<
434 ::fidl_next::wire::Box<'static, crate::wire::DeviceReceiveVectorRequest>,
435 >,
436 _: (),
437 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
438 if let Some(inner) = this {
439 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
440 ::fidl_next::wire::Box::encode_present(out);
441 } else {
442 ::fidl_next::wire::Box::encode_absent(out);
443 }
444
445 Ok(())
446 }
447 }
448
449 impl ::fidl_next::FromWire<crate::wire::DeviceReceiveVectorRequest> for DeviceReceiveVectorRequest {
450 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
451 crate::wire::DeviceReceiveVectorRequest,
452 Self,
453 > = unsafe {
454 ::fidl_next::CopyOptimization::enable_if(
455 true
456 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
457 .is_enabled(),
458 )
459 };
460
461 #[inline]
462 fn from_wire(wire: crate::wire::DeviceReceiveVectorRequest) -> Self {
463 Self { size: ::fidl_next::FromWire::from_wire(wire.size) }
464 }
465 }
466
467 impl ::fidl_next::FromWireRef<crate::wire::DeviceReceiveVectorRequest>
468 for DeviceReceiveVectorRequest
469 {
470 #[inline]
471 fn from_wire_ref(wire: &crate::wire::DeviceReceiveVectorRequest) -> Self {
472 Self { size: ::fidl_next::FromWireRef::from_wire_ref(&wire.size) }
473 }
474 }
475
476 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
477 pub struct DeviceReceiveVectorResponse {
478 pub status: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
479
480 pub data: ::std::vec::Vec<u8>,
481 }
482
483 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceReceiveVectorResponse<'static>, ___E>
484 for DeviceReceiveVectorResponse
485 where
486 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
487 ___E: ::fidl_next::Encoder,
488 {
489 #[inline]
490 fn encode(
491 self,
492 encoder_: &mut ___E,
493 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceReceiveVectorResponse<'static>>,
494 _: (),
495 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
496 ::fidl_next::munge! {
497 let crate::wire::DeviceReceiveVectorResponse {
498 status,
499 data,
500
501 } = out_;
502 }
503
504 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
505
506 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
507
508 ::fidl_next::Encode::encode(self.data, encoder_, data, (8196, ()))?;
509
510 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
511 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
512
513 Ok(())
514 }
515 }
516
517 unsafe impl<'a, ___E>
518 ::fidl_next::Encode<crate::wire::DeviceReceiveVectorResponse<'static>, ___E>
519 for &'a DeviceReceiveVectorResponse
520 where
521 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
522 ___E: ::fidl_next::Encoder,
523 {
524 #[inline]
525 fn encode(
526 self,
527 encoder_: &mut ___E,
528 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceReceiveVectorResponse<'static>>,
529 _: (),
530 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
531 ::fidl_next::munge! {
532 let crate::wire::DeviceReceiveVectorResponse {
533 status,
534 data,
535
536 } = out_;
537 }
538
539 ::fidl_next::Encode::encode(&self.status, encoder_, status, ())?;
540
541 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
542
543 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8196, ()))?;
544
545 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
546 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
547
548 Ok(())
549 }
550 }
551
552 unsafe impl<___E>
553 ::fidl_next::EncodeOption<
554 ::fidl_next::wire::Box<'static, crate::wire::DeviceReceiveVectorResponse<'static>>,
555 ___E,
556 > for DeviceReceiveVectorResponse
557 where
558 ___E: ::fidl_next::Encoder + ?Sized,
559 DeviceReceiveVectorResponse:
560 ::fidl_next::Encode<crate::wire::DeviceReceiveVectorResponse<'static>, ___E>,
561 {
562 #[inline]
563 fn encode_option(
564 this: ::core::option::Option<Self>,
565 encoder: &mut ___E,
566 out: &mut ::core::mem::MaybeUninit<
567 ::fidl_next::wire::Box<'static, crate::wire::DeviceReceiveVectorResponse<'static>>,
568 >,
569 _: (),
570 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
571 if let Some(inner) = this {
572 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
573 ::fidl_next::wire::Box::encode_present(out);
574 } else {
575 ::fidl_next::wire::Box::encode_absent(out);
576 }
577
578 Ok(())
579 }
580 }
581
582 unsafe impl<'a, ___E>
583 ::fidl_next::EncodeOption<
584 ::fidl_next::wire::Box<'static, crate::wire::DeviceReceiveVectorResponse<'static>>,
585 ___E,
586 > for &'a DeviceReceiveVectorResponse
587 where
588 ___E: ::fidl_next::Encoder + ?Sized,
589 &'a DeviceReceiveVectorResponse:
590 ::fidl_next::Encode<crate::wire::DeviceReceiveVectorResponse<'static>, ___E>,
591 {
592 #[inline]
593 fn encode_option(
594 this: ::core::option::Option<Self>,
595 encoder: &mut ___E,
596 out: &mut ::core::mem::MaybeUninit<
597 ::fidl_next::wire::Box<'static, crate::wire::DeviceReceiveVectorResponse<'static>>,
598 >,
599 _: (),
600 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
601 if let Some(inner) = this {
602 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
603 ::fidl_next::wire::Box::encode_present(out);
604 } else {
605 ::fidl_next::wire::Box::encode_absent(out);
606 }
607
608 Ok(())
609 }
610 }
611
612 impl<'de> ::fidl_next::FromWire<crate::wire::DeviceReceiveVectorResponse<'de>>
613 for DeviceReceiveVectorResponse
614 {
615 #[inline]
616 fn from_wire(wire: crate::wire::DeviceReceiveVectorResponse<'de>) -> Self {
617 Self {
618 status: ::fidl_next::FromWire::from_wire(wire.status),
619
620 data: ::fidl_next::FromWire::from_wire(wire.data),
621 }
622 }
623 }
624
625 impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceReceiveVectorResponse<'de>>
626 for DeviceReceiveVectorResponse
627 {
628 #[inline]
629 fn from_wire_ref(wire: &crate::wire::DeviceReceiveVectorResponse<'de>) -> Self {
630 Self {
631 status: ::fidl_next::FromWireRef::from_wire_ref(&wire.status),
632
633 data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data),
634 }
635 }
636 }
637
638 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
639 pub struct DeviceExchangeVectorRequest {
640 pub txdata: ::std::vec::Vec<u8>,
641 }
642
643 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceExchangeVectorRequest<'static>, ___E>
644 for DeviceExchangeVectorRequest
645 where
646 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
647 ___E: ::fidl_next::Encoder,
648 {
649 #[inline]
650 fn encode(
651 self,
652 encoder_: &mut ___E,
653 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExchangeVectorRequest<'static>>,
654 _: (),
655 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
656 ::fidl_next::munge! {
657 let crate::wire::DeviceExchangeVectorRequest {
658 txdata,
659
660 } = out_;
661 }
662
663 ::fidl_next::Encode::encode(self.txdata, encoder_, txdata, (8196, ()))?;
664
665 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txdata.as_mut_ptr()) };
666 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
667
668 Ok(())
669 }
670 }
671
672 unsafe impl<'a, ___E>
673 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorRequest<'static>, ___E>
674 for &'a DeviceExchangeVectorRequest
675 where
676 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
677 ___E: ::fidl_next::Encoder,
678 {
679 #[inline]
680 fn encode(
681 self,
682 encoder_: &mut ___E,
683 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExchangeVectorRequest<'static>>,
684 _: (),
685 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
686 ::fidl_next::munge! {
687 let crate::wire::DeviceExchangeVectorRequest {
688 txdata,
689
690 } = out_;
691 }
692
693 ::fidl_next::Encode::encode(&self.txdata, encoder_, txdata, (8196, ()))?;
694
695 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txdata.as_mut_ptr()) };
696 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
697
698 Ok(())
699 }
700 }
701
702 unsafe impl<___E>
703 ::fidl_next::EncodeOption<
704 ::fidl_next::wire::Box<'static, crate::wire::DeviceExchangeVectorRequest<'static>>,
705 ___E,
706 > for DeviceExchangeVectorRequest
707 where
708 ___E: ::fidl_next::Encoder + ?Sized,
709 DeviceExchangeVectorRequest:
710 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorRequest<'static>, ___E>,
711 {
712 #[inline]
713 fn encode_option(
714 this: ::core::option::Option<Self>,
715 encoder: &mut ___E,
716 out: &mut ::core::mem::MaybeUninit<
717 ::fidl_next::wire::Box<'static, crate::wire::DeviceExchangeVectorRequest<'static>>,
718 >,
719 _: (),
720 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
721 if let Some(inner) = this {
722 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
723 ::fidl_next::wire::Box::encode_present(out);
724 } else {
725 ::fidl_next::wire::Box::encode_absent(out);
726 }
727
728 Ok(())
729 }
730 }
731
732 unsafe impl<'a, ___E>
733 ::fidl_next::EncodeOption<
734 ::fidl_next::wire::Box<'static, crate::wire::DeviceExchangeVectorRequest<'static>>,
735 ___E,
736 > for &'a DeviceExchangeVectorRequest
737 where
738 ___E: ::fidl_next::Encoder + ?Sized,
739 &'a DeviceExchangeVectorRequest:
740 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorRequest<'static>, ___E>,
741 {
742 #[inline]
743 fn encode_option(
744 this: ::core::option::Option<Self>,
745 encoder: &mut ___E,
746 out: &mut ::core::mem::MaybeUninit<
747 ::fidl_next::wire::Box<'static, crate::wire::DeviceExchangeVectorRequest<'static>>,
748 >,
749 _: (),
750 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
751 if let Some(inner) = this {
752 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
753 ::fidl_next::wire::Box::encode_present(out);
754 } else {
755 ::fidl_next::wire::Box::encode_absent(out);
756 }
757
758 Ok(())
759 }
760 }
761
762 impl<'de> ::fidl_next::FromWire<crate::wire::DeviceExchangeVectorRequest<'de>>
763 for DeviceExchangeVectorRequest
764 {
765 #[inline]
766 fn from_wire(wire: crate::wire::DeviceExchangeVectorRequest<'de>) -> Self {
767 Self { txdata: ::fidl_next::FromWire::from_wire(wire.txdata) }
768 }
769 }
770
771 impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceExchangeVectorRequest<'de>>
772 for DeviceExchangeVectorRequest
773 {
774 #[inline]
775 fn from_wire_ref(wire: &crate::wire::DeviceExchangeVectorRequest<'de>) -> Self {
776 Self { txdata: ::fidl_next::FromWireRef::from_wire_ref(&wire.txdata) }
777 }
778 }
779
780 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
781 pub struct DeviceExchangeVectorResponse {
782 pub status: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
783
784 pub rxdata: ::std::vec::Vec<u8>,
785 }
786
787 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceExchangeVectorResponse<'static>, ___E>
788 for DeviceExchangeVectorResponse
789 where
790 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
791 ___E: ::fidl_next::Encoder,
792 {
793 #[inline]
794 fn encode(
795 self,
796 encoder_: &mut ___E,
797 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExchangeVectorResponse<'static>>,
798 _: (),
799 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
800 ::fidl_next::munge! {
801 let crate::wire::DeviceExchangeVectorResponse {
802 status,
803 rxdata,
804
805 } = out_;
806 }
807
808 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
809
810 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
811
812 ::fidl_next::Encode::encode(self.rxdata, encoder_, rxdata, (8196, ()))?;
813
814 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rxdata.as_mut_ptr()) };
815 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
816
817 Ok(())
818 }
819 }
820
821 unsafe impl<'a, ___E>
822 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorResponse<'static>, ___E>
823 for &'a DeviceExchangeVectorResponse
824 where
825 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
826 ___E: ::fidl_next::Encoder,
827 {
828 #[inline]
829 fn encode(
830 self,
831 encoder_: &mut ___E,
832 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExchangeVectorResponse<'static>>,
833 _: (),
834 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
835 ::fidl_next::munge! {
836 let crate::wire::DeviceExchangeVectorResponse {
837 status,
838 rxdata,
839
840 } = out_;
841 }
842
843 ::fidl_next::Encode::encode(&self.status, encoder_, status, ())?;
844
845 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
846
847 ::fidl_next::Encode::encode(&self.rxdata, encoder_, rxdata, (8196, ()))?;
848
849 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rxdata.as_mut_ptr()) };
850 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
851
852 Ok(())
853 }
854 }
855
856 unsafe impl<___E>
857 ::fidl_next::EncodeOption<
858 ::fidl_next::wire::Box<'static, crate::wire::DeviceExchangeVectorResponse<'static>>,
859 ___E,
860 > for DeviceExchangeVectorResponse
861 where
862 ___E: ::fidl_next::Encoder + ?Sized,
863 DeviceExchangeVectorResponse:
864 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorResponse<'static>, ___E>,
865 {
866 #[inline]
867 fn encode_option(
868 this: ::core::option::Option<Self>,
869 encoder: &mut ___E,
870 out: &mut ::core::mem::MaybeUninit<
871 ::fidl_next::wire::Box<'static, crate::wire::DeviceExchangeVectorResponse<'static>>,
872 >,
873 _: (),
874 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
875 if let Some(inner) = this {
876 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
877 ::fidl_next::wire::Box::encode_present(out);
878 } else {
879 ::fidl_next::wire::Box::encode_absent(out);
880 }
881
882 Ok(())
883 }
884 }
885
886 unsafe impl<'a, ___E>
887 ::fidl_next::EncodeOption<
888 ::fidl_next::wire::Box<'static, crate::wire::DeviceExchangeVectorResponse<'static>>,
889 ___E,
890 > for &'a DeviceExchangeVectorResponse
891 where
892 ___E: ::fidl_next::Encoder + ?Sized,
893 &'a DeviceExchangeVectorResponse:
894 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorResponse<'static>, ___E>,
895 {
896 #[inline]
897 fn encode_option(
898 this: ::core::option::Option<Self>,
899 encoder: &mut ___E,
900 out: &mut ::core::mem::MaybeUninit<
901 ::fidl_next::wire::Box<'static, crate::wire::DeviceExchangeVectorResponse<'static>>,
902 >,
903 _: (),
904 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
905 if let Some(inner) = this {
906 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
907 ::fidl_next::wire::Box::encode_present(out);
908 } else {
909 ::fidl_next::wire::Box::encode_absent(out);
910 }
911
912 Ok(())
913 }
914 }
915
916 impl<'de> ::fidl_next::FromWire<crate::wire::DeviceExchangeVectorResponse<'de>>
917 for DeviceExchangeVectorResponse
918 {
919 #[inline]
920 fn from_wire(wire: crate::wire::DeviceExchangeVectorResponse<'de>) -> Self {
921 Self {
922 status: ::fidl_next::FromWire::from_wire(wire.status),
923
924 rxdata: ::fidl_next::FromWire::from_wire(wire.rxdata),
925 }
926 }
927 }
928
929 impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceExchangeVectorResponse<'de>>
930 for DeviceExchangeVectorResponse
931 {
932 #[inline]
933 fn from_wire_ref(wire: &crate::wire::DeviceExchangeVectorResponse<'de>) -> Self {
934 Self {
935 status: ::fidl_next::FromWireRef::from_wire_ref(&wire.status),
936
937 rxdata: ::fidl_next::FromWireRef::from_wire_ref(&wire.rxdata),
938 }
939 }
940 }
941
942 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
943 #[repr(C)]
944 pub struct DeviceCanAssertCsResponse {
945 pub can: bool,
946 }
947
948 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceCanAssertCsResponse, ___E>
949 for DeviceCanAssertCsResponse
950 where
951 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
952 {
953 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
954 Self,
955 crate::wire::DeviceCanAssertCsResponse,
956 > = unsafe {
957 ::fidl_next::CopyOptimization::enable_if(
958 true && <bool as ::fidl_next::Encode<bool, ___E>>::COPY_OPTIMIZATION.is_enabled(),
959 )
960 };
961
962 #[inline]
963 fn encode(
964 self,
965 encoder_: &mut ___E,
966 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceCanAssertCsResponse>,
967 _: (),
968 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
969 ::fidl_next::munge! {
970 let crate::wire::DeviceCanAssertCsResponse {
971 can,
972
973 } = out_;
974 }
975
976 ::fidl_next::Encode::encode(self.can, encoder_, can, ())?;
977
978 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(can.as_mut_ptr()) };
979
980 Ok(())
981 }
982 }
983
984 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceCanAssertCsResponse, ___E>
985 for &'a DeviceCanAssertCsResponse
986 where
987 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
988 {
989 #[inline]
990 fn encode(
991 self,
992 encoder_: &mut ___E,
993 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceCanAssertCsResponse>,
994 _: (),
995 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
996 ::fidl_next::munge! {
997 let crate::wire::DeviceCanAssertCsResponse {
998 can,
999
1000 } = out_;
1001 }
1002
1003 ::fidl_next::Encode::encode(&self.can, encoder_, can, ())?;
1004
1005 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(can.as_mut_ptr()) };
1006
1007 Ok(())
1008 }
1009 }
1010
1011 unsafe impl<___E>
1012 ::fidl_next::EncodeOption<
1013 ::fidl_next::wire::Box<'static, crate::wire::DeviceCanAssertCsResponse>,
1014 ___E,
1015 > for DeviceCanAssertCsResponse
1016 where
1017 ___E: ::fidl_next::Encoder + ?Sized,
1018 DeviceCanAssertCsResponse:
1019 ::fidl_next::Encode<crate::wire::DeviceCanAssertCsResponse, ___E>,
1020 {
1021 #[inline]
1022 fn encode_option(
1023 this: ::core::option::Option<Self>,
1024 encoder: &mut ___E,
1025 out: &mut ::core::mem::MaybeUninit<
1026 ::fidl_next::wire::Box<'static, crate::wire::DeviceCanAssertCsResponse>,
1027 >,
1028 _: (),
1029 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1030 if let Some(inner) = this {
1031 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1032 ::fidl_next::wire::Box::encode_present(out);
1033 } else {
1034 ::fidl_next::wire::Box::encode_absent(out);
1035 }
1036
1037 Ok(())
1038 }
1039 }
1040
1041 unsafe impl<'a, ___E>
1042 ::fidl_next::EncodeOption<
1043 ::fidl_next::wire::Box<'static, crate::wire::DeviceCanAssertCsResponse>,
1044 ___E,
1045 > for &'a DeviceCanAssertCsResponse
1046 where
1047 ___E: ::fidl_next::Encoder + ?Sized,
1048 &'a DeviceCanAssertCsResponse:
1049 ::fidl_next::Encode<crate::wire::DeviceCanAssertCsResponse, ___E>,
1050 {
1051 #[inline]
1052 fn encode_option(
1053 this: ::core::option::Option<Self>,
1054 encoder: &mut ___E,
1055 out: &mut ::core::mem::MaybeUninit<
1056 ::fidl_next::wire::Box<'static, crate::wire::DeviceCanAssertCsResponse>,
1057 >,
1058 _: (),
1059 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1060 if let Some(inner) = this {
1061 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1062 ::fidl_next::wire::Box::encode_present(out);
1063 } else {
1064 ::fidl_next::wire::Box::encode_absent(out);
1065 }
1066
1067 Ok(())
1068 }
1069 }
1070
1071 impl ::fidl_next::FromWire<crate::wire::DeviceCanAssertCsResponse> for DeviceCanAssertCsResponse {
1072 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1073 crate::wire::DeviceCanAssertCsResponse,
1074 Self,
1075 > = unsafe {
1076 ::fidl_next::CopyOptimization::enable_if(
1077 true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
1078 )
1079 };
1080
1081 #[inline]
1082 fn from_wire(wire: crate::wire::DeviceCanAssertCsResponse) -> Self {
1083 Self { can: ::fidl_next::FromWire::from_wire(wire.can) }
1084 }
1085 }
1086
1087 impl ::fidl_next::FromWireRef<crate::wire::DeviceCanAssertCsResponse>
1088 for DeviceCanAssertCsResponse
1089 {
1090 #[inline]
1091 fn from_wire_ref(wire: &crate::wire::DeviceCanAssertCsResponse) -> Self {
1092 Self { can: ::fidl_next::FromWireRef::from_wire_ref(&wire.can) }
1093 }
1094 }
1095
1096 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1097 #[repr(C)]
1098 pub struct DeviceAssertCsResponse {
1099 pub status: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
1100 }
1101
1102 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceAssertCsResponse, ___E>
1103 for DeviceAssertCsResponse
1104 where
1105 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1106 {
1107 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1108 Self,
1109 crate::wire::DeviceAssertCsResponse,
1110 > = unsafe {
1111 ::fidl_next::CopyOptimization::enable_if(
1112 true
1113
1114 && <
1115 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
1116 >::COPY_OPTIMIZATION.is_enabled()
1117
1118 )
1119 };
1120
1121 #[inline]
1122 fn encode(
1123 self,
1124 encoder_: &mut ___E,
1125 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceAssertCsResponse>,
1126 _: (),
1127 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1128 ::fidl_next::munge! {
1129 let crate::wire::DeviceAssertCsResponse {
1130 status,
1131
1132 } = out_;
1133 }
1134
1135 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
1136
1137 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
1138
1139 Ok(())
1140 }
1141 }
1142
1143 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceAssertCsResponse, ___E>
1144 for &'a DeviceAssertCsResponse
1145 where
1146 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1147 {
1148 #[inline]
1149 fn encode(
1150 self,
1151 encoder_: &mut ___E,
1152 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceAssertCsResponse>,
1153 _: (),
1154 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1155 ::fidl_next::munge! {
1156 let crate::wire::DeviceAssertCsResponse {
1157 status,
1158
1159 } = out_;
1160 }
1161
1162 ::fidl_next::Encode::encode(&self.status, encoder_, status, ())?;
1163
1164 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
1165
1166 Ok(())
1167 }
1168 }
1169
1170 unsafe impl<___E>
1171 ::fidl_next::EncodeOption<
1172 ::fidl_next::wire::Box<'static, crate::wire::DeviceAssertCsResponse>,
1173 ___E,
1174 > for DeviceAssertCsResponse
1175 where
1176 ___E: ::fidl_next::Encoder + ?Sized,
1177 DeviceAssertCsResponse: ::fidl_next::Encode<crate::wire::DeviceAssertCsResponse, ___E>,
1178 {
1179 #[inline]
1180 fn encode_option(
1181 this: ::core::option::Option<Self>,
1182 encoder: &mut ___E,
1183 out: &mut ::core::mem::MaybeUninit<
1184 ::fidl_next::wire::Box<'static, crate::wire::DeviceAssertCsResponse>,
1185 >,
1186 _: (),
1187 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1188 if let Some(inner) = this {
1189 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1190 ::fidl_next::wire::Box::encode_present(out);
1191 } else {
1192 ::fidl_next::wire::Box::encode_absent(out);
1193 }
1194
1195 Ok(())
1196 }
1197 }
1198
1199 unsafe impl<'a, ___E>
1200 ::fidl_next::EncodeOption<
1201 ::fidl_next::wire::Box<'static, crate::wire::DeviceAssertCsResponse>,
1202 ___E,
1203 > for &'a DeviceAssertCsResponse
1204 where
1205 ___E: ::fidl_next::Encoder + ?Sized,
1206 &'a DeviceAssertCsResponse: ::fidl_next::Encode<crate::wire::DeviceAssertCsResponse, ___E>,
1207 {
1208 #[inline]
1209 fn encode_option(
1210 this: ::core::option::Option<Self>,
1211 encoder: &mut ___E,
1212 out: &mut ::core::mem::MaybeUninit<
1213 ::fidl_next::wire::Box<'static, crate::wire::DeviceAssertCsResponse>,
1214 >,
1215 _: (),
1216 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1217 if let Some(inner) = this {
1218 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1219 ::fidl_next::wire::Box::encode_present(out);
1220 } else {
1221 ::fidl_next::wire::Box::encode_absent(out);
1222 }
1223
1224 Ok(())
1225 }
1226 }
1227
1228 impl ::fidl_next::FromWire<crate::wire::DeviceAssertCsResponse> for DeviceAssertCsResponse {
1229 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1230 crate::wire::DeviceAssertCsResponse,
1231 Self,
1232 > = unsafe {
1233 ::fidl_next::CopyOptimization::enable_if(
1234 true
1235
1236 && <
1237 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
1238 >::COPY_OPTIMIZATION.is_enabled()
1239
1240 )
1241 };
1242
1243 #[inline]
1244 fn from_wire(wire: crate::wire::DeviceAssertCsResponse) -> Self {
1245 Self { status: ::fidl_next::FromWire::from_wire(wire.status) }
1246 }
1247 }
1248
1249 impl ::fidl_next::FromWireRef<crate::wire::DeviceAssertCsResponse> for DeviceAssertCsResponse {
1250 #[inline]
1251 fn from_wire_ref(wire: &crate::wire::DeviceAssertCsResponse) -> Self {
1252 Self { status: ::fidl_next::FromWireRef::from_wire_ref(&wire.status) }
1253 }
1254 }
1255
1256 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1257 #[repr(C)]
1258 pub struct DeviceDeassertCsResponse {
1259 pub status: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
1260 }
1261
1262 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceDeassertCsResponse, ___E>
1263 for DeviceDeassertCsResponse
1264 where
1265 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1266 {
1267 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1268 Self,
1269 crate::wire::DeviceDeassertCsResponse,
1270 > = unsafe {
1271 ::fidl_next::CopyOptimization::enable_if(
1272 true
1273
1274 && <
1275 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
1276 >::COPY_OPTIMIZATION.is_enabled()
1277
1278 )
1279 };
1280
1281 #[inline]
1282 fn encode(
1283 self,
1284 encoder_: &mut ___E,
1285 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceDeassertCsResponse>,
1286 _: (),
1287 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1288 ::fidl_next::munge! {
1289 let crate::wire::DeviceDeassertCsResponse {
1290 status,
1291
1292 } = out_;
1293 }
1294
1295 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
1296
1297 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
1298
1299 Ok(())
1300 }
1301 }
1302
1303 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceDeassertCsResponse, ___E>
1304 for &'a DeviceDeassertCsResponse
1305 where
1306 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1307 {
1308 #[inline]
1309 fn encode(
1310 self,
1311 encoder_: &mut ___E,
1312 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceDeassertCsResponse>,
1313 _: (),
1314 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1315 ::fidl_next::munge! {
1316 let crate::wire::DeviceDeassertCsResponse {
1317 status,
1318
1319 } = out_;
1320 }
1321
1322 ::fidl_next::Encode::encode(&self.status, encoder_, status, ())?;
1323
1324 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(status.as_mut_ptr()) };
1325
1326 Ok(())
1327 }
1328 }
1329
1330 unsafe impl<___E>
1331 ::fidl_next::EncodeOption<
1332 ::fidl_next::wire::Box<'static, crate::wire::DeviceDeassertCsResponse>,
1333 ___E,
1334 > for DeviceDeassertCsResponse
1335 where
1336 ___E: ::fidl_next::Encoder + ?Sized,
1337 DeviceDeassertCsResponse: ::fidl_next::Encode<crate::wire::DeviceDeassertCsResponse, ___E>,
1338 {
1339 #[inline]
1340 fn encode_option(
1341 this: ::core::option::Option<Self>,
1342 encoder: &mut ___E,
1343 out: &mut ::core::mem::MaybeUninit<
1344 ::fidl_next::wire::Box<'static, crate::wire::DeviceDeassertCsResponse>,
1345 >,
1346 _: (),
1347 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1348 if let Some(inner) = this {
1349 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1350 ::fidl_next::wire::Box::encode_present(out);
1351 } else {
1352 ::fidl_next::wire::Box::encode_absent(out);
1353 }
1354
1355 Ok(())
1356 }
1357 }
1358
1359 unsafe impl<'a, ___E>
1360 ::fidl_next::EncodeOption<
1361 ::fidl_next::wire::Box<'static, crate::wire::DeviceDeassertCsResponse>,
1362 ___E,
1363 > for &'a DeviceDeassertCsResponse
1364 where
1365 ___E: ::fidl_next::Encoder + ?Sized,
1366 &'a DeviceDeassertCsResponse:
1367 ::fidl_next::Encode<crate::wire::DeviceDeassertCsResponse, ___E>,
1368 {
1369 #[inline]
1370 fn encode_option(
1371 this: ::core::option::Option<Self>,
1372 encoder: &mut ___E,
1373 out: &mut ::core::mem::MaybeUninit<
1374 ::fidl_next::wire::Box<'static, crate::wire::DeviceDeassertCsResponse>,
1375 >,
1376 _: (),
1377 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1378 if let Some(inner) = this {
1379 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1380 ::fidl_next::wire::Box::encode_present(out);
1381 } else {
1382 ::fidl_next::wire::Box::encode_absent(out);
1383 }
1384
1385 Ok(())
1386 }
1387 }
1388
1389 impl ::fidl_next::FromWire<crate::wire::DeviceDeassertCsResponse> for DeviceDeassertCsResponse {
1390 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1391 crate::wire::DeviceDeassertCsResponse,
1392 Self,
1393 > = unsafe {
1394 ::fidl_next::CopyOptimization::enable_if(
1395 true
1396
1397 && <
1398 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
1399 >::COPY_OPTIMIZATION.is_enabled()
1400
1401 )
1402 };
1403
1404 #[inline]
1405 fn from_wire(wire: crate::wire::DeviceDeassertCsResponse) -> Self {
1406 Self { status: ::fidl_next::FromWire::from_wire(wire.status) }
1407 }
1408 }
1409
1410 impl ::fidl_next::FromWireRef<crate::wire::DeviceDeassertCsResponse> for DeviceDeassertCsResponse {
1411 #[inline]
1412 fn from_wire_ref(wire: &crate::wire::DeviceDeassertCsResponse) -> Self {
1413 Self { status: ::fidl_next::FromWireRef::from_wire_ref(&wire.status) }
1414 }
1415 }
1416
1417 pub type TestConnectSpiLoopbackResponse = ();
1418}
1419
1420pub mod wire {
1421
1422 #[derive(Debug)]
1424 #[repr(C)]
1425 pub struct DeviceTransmitVectorRequest<'de> {
1426 pub data: ::fidl_next::wire::Vector<'de, u8>,
1427 }
1428
1429 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceTransmitVectorRequest<'_>>(), 16);
1430 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceTransmitVectorRequest<'_>>(), 8);
1431
1432 static_assertions::const_assert_eq!(
1433 std::mem::offset_of!(DeviceTransmitVectorRequest<'_>, data),
1434 0
1435 );
1436
1437 impl ::fidl_next::Constrained for DeviceTransmitVectorRequest<'_> {
1438 type Constraint = ();
1439
1440 fn validate(
1441 _: ::fidl_next::Slot<'_, Self>,
1442 _: Self::Constraint,
1443 ) -> Result<(), ::fidl_next::ValidationError> {
1444 Ok(())
1445 }
1446 }
1447
1448 unsafe impl ::fidl_next::Wire for DeviceTransmitVectorRequest<'static> {
1449 type Narrowed<'de> = DeviceTransmitVectorRequest<'de>;
1450
1451 #[inline]
1452 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1453 ::fidl_next::munge! {
1454 let Self {
1455 data,
1456
1457 } = &mut *out_;
1458 }
1459
1460 ::fidl_next::Wire::zero_padding(data);
1461 }
1462 }
1463
1464 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceTransmitVectorRequest<'de>
1465 where
1466 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1467 ___D: ::fidl_next::Decoder<'de>,
1468 {
1469 fn decode(
1470 slot_: ::fidl_next::Slot<'_, Self>,
1471 decoder_: &mut ___D,
1472 _: (),
1473 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1474 ::fidl_next::munge! {
1475 let Self {
1476 mut data,
1477
1478 } = slot_;
1479 }
1480
1481 let _field = data.as_mut();
1482 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
1483 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8196, ()))?;
1484
1485 let data = unsafe { data.deref_unchecked() };
1486
1487 if data.len() > 8196 {
1488 return Err(::fidl_next::DecodeError::VectorTooLong {
1489 size: data.len() as u64,
1490 limit: 8196,
1491 });
1492 }
1493
1494 Ok(())
1495 }
1496 }
1497
1498 impl<'de> ::fidl_next::IntoNatural for DeviceTransmitVectorRequest<'de> {
1499 type Natural = crate::natural::DeviceTransmitVectorRequest;
1500 }
1501
1502 #[derive(Clone, Debug)]
1504 #[repr(C)]
1505 pub struct DeviceTransmitVectorResponse {
1506 pub status: ::fidl_next::wire::fuchsia::StatusResult,
1507 }
1508
1509 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceTransmitVectorResponse>(), 4);
1510 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceTransmitVectorResponse>(), 4);
1511
1512 static_assertions::const_assert_eq!(
1513 std::mem::offset_of!(DeviceTransmitVectorResponse, status),
1514 0
1515 );
1516
1517 impl ::fidl_next::Constrained for DeviceTransmitVectorResponse {
1518 type Constraint = ();
1519
1520 fn validate(
1521 _: ::fidl_next::Slot<'_, Self>,
1522 _: Self::Constraint,
1523 ) -> Result<(), ::fidl_next::ValidationError> {
1524 Ok(())
1525 }
1526 }
1527
1528 unsafe impl ::fidl_next::Wire for DeviceTransmitVectorResponse {
1529 type Narrowed<'de> = DeviceTransmitVectorResponse;
1530
1531 #[inline]
1532 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1533 ::fidl_next::munge! {
1534 let Self {
1535 status,
1536
1537 } = &mut *out_;
1538 }
1539
1540 ::fidl_next::Wire::zero_padding(status);
1541 }
1542 }
1543
1544 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceTransmitVectorResponse
1545 where
1546 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1547 {
1548 fn decode(
1549 slot_: ::fidl_next::Slot<'_, Self>,
1550 decoder_: &mut ___D,
1551 _: (),
1552 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1553 ::fidl_next::munge! {
1554 let Self {
1555 mut status,
1556
1557 } = slot_;
1558 }
1559
1560 let _field = status.as_mut();
1561
1562 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
1563
1564 Ok(())
1565 }
1566 }
1567
1568 impl ::fidl_next::IntoNatural for DeviceTransmitVectorResponse {
1569 type Natural = crate::natural::DeviceTransmitVectorResponse;
1570 }
1571
1572 #[derive(Clone, Debug)]
1574 #[repr(C)]
1575 pub struct DeviceReceiveVectorRequest {
1576 pub size: ::fidl_next::wire::Uint32,
1577 }
1578
1579 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceReceiveVectorRequest>(), 4);
1580 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceReceiveVectorRequest>(), 4);
1581
1582 static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceReceiveVectorRequest, size), 0);
1583
1584 impl ::fidl_next::Constrained for DeviceReceiveVectorRequest {
1585 type Constraint = ();
1586
1587 fn validate(
1588 _: ::fidl_next::Slot<'_, Self>,
1589 _: Self::Constraint,
1590 ) -> Result<(), ::fidl_next::ValidationError> {
1591 Ok(())
1592 }
1593 }
1594
1595 unsafe impl ::fidl_next::Wire for DeviceReceiveVectorRequest {
1596 type Narrowed<'de> = DeviceReceiveVectorRequest;
1597
1598 #[inline]
1599 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1600 ::fidl_next::munge! {
1601 let Self {
1602 size,
1603
1604 } = &mut *out_;
1605 }
1606
1607 ::fidl_next::Wire::zero_padding(size);
1608 }
1609 }
1610
1611 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceReceiveVectorRequest
1612 where
1613 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1614 {
1615 fn decode(
1616 slot_: ::fidl_next::Slot<'_, Self>,
1617 decoder_: &mut ___D,
1618 _: (),
1619 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1620 ::fidl_next::munge! {
1621 let Self {
1622 mut size,
1623
1624 } = slot_;
1625 }
1626
1627 let _field = size.as_mut();
1628
1629 ::fidl_next::Decode::decode(size.as_mut(), decoder_, ())?;
1630
1631 Ok(())
1632 }
1633 }
1634
1635 impl ::fidl_next::IntoNatural for DeviceReceiveVectorRequest {
1636 type Natural = crate::natural::DeviceReceiveVectorRequest;
1637 }
1638
1639 #[derive(Debug)]
1641 #[repr(C)]
1642 pub struct DeviceReceiveVectorResponse<'de> {
1643 pub status: ::fidl_next::wire::fuchsia::StatusResult,
1644
1645 pub data: ::fidl_next::wire::Vector<'de, u8>,
1646 }
1647
1648 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceReceiveVectorResponse<'_>>(), 24);
1649 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceReceiveVectorResponse<'_>>(), 8);
1650
1651 static_assertions::const_assert_eq!(
1652 std::mem::offset_of!(DeviceReceiveVectorResponse<'_>, status),
1653 0
1654 );
1655
1656 static_assertions::const_assert_eq!(
1657 std::mem::offset_of!(DeviceReceiveVectorResponse<'_>, data),
1658 8
1659 );
1660
1661 impl ::fidl_next::Constrained for DeviceReceiveVectorResponse<'_> {
1662 type Constraint = ();
1663
1664 fn validate(
1665 _: ::fidl_next::Slot<'_, Self>,
1666 _: Self::Constraint,
1667 ) -> Result<(), ::fidl_next::ValidationError> {
1668 Ok(())
1669 }
1670 }
1671
1672 unsafe impl ::fidl_next::Wire for DeviceReceiveVectorResponse<'static> {
1673 type Narrowed<'de> = DeviceReceiveVectorResponse<'de>;
1674
1675 #[inline]
1676 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1677 ::fidl_next::munge! {
1678 let Self {
1679 status,
1680 data,
1681
1682 } = &mut *out_;
1683 }
1684
1685 ::fidl_next::Wire::zero_padding(status);
1686
1687 ::fidl_next::Wire::zero_padding(data);
1688
1689 unsafe {
1690 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1691 }
1692 }
1693 }
1694
1695 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceReceiveVectorResponse<'de>
1696 where
1697 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1698 ___D: ::fidl_next::Decoder<'de>,
1699 {
1700 fn decode(
1701 slot_: ::fidl_next::Slot<'_, Self>,
1702 decoder_: &mut ___D,
1703 _: (),
1704 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1705 if slot_.as_bytes()[4..8] != [0u8; 4] {
1706 return Err(::fidl_next::DecodeError::InvalidPadding);
1707 }
1708
1709 ::fidl_next::munge! {
1710 let Self {
1711 mut status,
1712 mut data,
1713
1714 } = slot_;
1715 }
1716
1717 let _field = status.as_mut();
1718
1719 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
1720
1721 let _field = data.as_mut();
1722 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
1723 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8196, ()))?;
1724
1725 let data = unsafe { data.deref_unchecked() };
1726
1727 if data.len() > 8196 {
1728 return Err(::fidl_next::DecodeError::VectorTooLong {
1729 size: data.len() as u64,
1730 limit: 8196,
1731 });
1732 }
1733
1734 Ok(())
1735 }
1736 }
1737
1738 impl<'de> ::fidl_next::IntoNatural for DeviceReceiveVectorResponse<'de> {
1739 type Natural = crate::natural::DeviceReceiveVectorResponse;
1740 }
1741
1742 #[derive(Debug)]
1744 #[repr(C)]
1745 pub struct DeviceExchangeVectorRequest<'de> {
1746 pub txdata: ::fidl_next::wire::Vector<'de, u8>,
1747 }
1748
1749 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceExchangeVectorRequest<'_>>(), 16);
1750 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceExchangeVectorRequest<'_>>(), 8);
1751
1752 static_assertions::const_assert_eq!(
1753 std::mem::offset_of!(DeviceExchangeVectorRequest<'_>, txdata),
1754 0
1755 );
1756
1757 impl ::fidl_next::Constrained for DeviceExchangeVectorRequest<'_> {
1758 type Constraint = ();
1759
1760 fn validate(
1761 _: ::fidl_next::Slot<'_, Self>,
1762 _: Self::Constraint,
1763 ) -> Result<(), ::fidl_next::ValidationError> {
1764 Ok(())
1765 }
1766 }
1767
1768 unsafe impl ::fidl_next::Wire for DeviceExchangeVectorRequest<'static> {
1769 type Narrowed<'de> = DeviceExchangeVectorRequest<'de>;
1770
1771 #[inline]
1772 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1773 ::fidl_next::munge! {
1774 let Self {
1775 txdata,
1776
1777 } = &mut *out_;
1778 }
1779
1780 ::fidl_next::Wire::zero_padding(txdata);
1781 }
1782 }
1783
1784 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceExchangeVectorRequest<'de>
1785 where
1786 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1787 ___D: ::fidl_next::Decoder<'de>,
1788 {
1789 fn decode(
1790 slot_: ::fidl_next::Slot<'_, Self>,
1791 decoder_: &mut ___D,
1792 _: (),
1793 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1794 ::fidl_next::munge! {
1795 let Self {
1796 mut txdata,
1797
1798 } = slot_;
1799 }
1800
1801 let _field = txdata.as_mut();
1802 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
1803 ::fidl_next::Decode::decode(txdata.as_mut(), decoder_, (8196, ()))?;
1804
1805 let txdata = unsafe { txdata.deref_unchecked() };
1806
1807 if txdata.len() > 8196 {
1808 return Err(::fidl_next::DecodeError::VectorTooLong {
1809 size: txdata.len() as u64,
1810 limit: 8196,
1811 });
1812 }
1813
1814 Ok(())
1815 }
1816 }
1817
1818 impl<'de> ::fidl_next::IntoNatural for DeviceExchangeVectorRequest<'de> {
1819 type Natural = crate::natural::DeviceExchangeVectorRequest;
1820 }
1821
1822 #[derive(Debug)]
1824 #[repr(C)]
1825 pub struct DeviceExchangeVectorResponse<'de> {
1826 pub status: ::fidl_next::wire::fuchsia::StatusResult,
1827
1828 pub rxdata: ::fidl_next::wire::Vector<'de, u8>,
1829 }
1830
1831 static_assertions::const_assert_eq!(
1832 std::mem::size_of::<DeviceExchangeVectorResponse<'_>>(),
1833 24
1834 );
1835 static_assertions::const_assert_eq!(
1836 std::mem::align_of::<DeviceExchangeVectorResponse<'_>>(),
1837 8
1838 );
1839
1840 static_assertions::const_assert_eq!(
1841 std::mem::offset_of!(DeviceExchangeVectorResponse<'_>, status),
1842 0
1843 );
1844
1845 static_assertions::const_assert_eq!(
1846 std::mem::offset_of!(DeviceExchangeVectorResponse<'_>, rxdata),
1847 8
1848 );
1849
1850 impl ::fidl_next::Constrained for DeviceExchangeVectorResponse<'_> {
1851 type Constraint = ();
1852
1853 fn validate(
1854 _: ::fidl_next::Slot<'_, Self>,
1855 _: Self::Constraint,
1856 ) -> Result<(), ::fidl_next::ValidationError> {
1857 Ok(())
1858 }
1859 }
1860
1861 unsafe impl ::fidl_next::Wire for DeviceExchangeVectorResponse<'static> {
1862 type Narrowed<'de> = DeviceExchangeVectorResponse<'de>;
1863
1864 #[inline]
1865 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1866 ::fidl_next::munge! {
1867 let Self {
1868 status,
1869 rxdata,
1870
1871 } = &mut *out_;
1872 }
1873
1874 ::fidl_next::Wire::zero_padding(status);
1875
1876 ::fidl_next::Wire::zero_padding(rxdata);
1877
1878 unsafe {
1879 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1880 }
1881 }
1882 }
1883
1884 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceExchangeVectorResponse<'de>
1885 where
1886 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1887 ___D: ::fidl_next::Decoder<'de>,
1888 {
1889 fn decode(
1890 slot_: ::fidl_next::Slot<'_, Self>,
1891 decoder_: &mut ___D,
1892 _: (),
1893 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1894 if slot_.as_bytes()[4..8] != [0u8; 4] {
1895 return Err(::fidl_next::DecodeError::InvalidPadding);
1896 }
1897
1898 ::fidl_next::munge! {
1899 let Self {
1900 mut status,
1901 mut rxdata,
1902
1903 } = slot_;
1904 }
1905
1906 let _field = status.as_mut();
1907
1908 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
1909
1910 let _field = rxdata.as_mut();
1911 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
1912 ::fidl_next::Decode::decode(rxdata.as_mut(), decoder_, (8196, ()))?;
1913
1914 let rxdata = unsafe { rxdata.deref_unchecked() };
1915
1916 if rxdata.len() > 8196 {
1917 return Err(::fidl_next::DecodeError::VectorTooLong {
1918 size: rxdata.len() as u64,
1919 limit: 8196,
1920 });
1921 }
1922
1923 Ok(())
1924 }
1925 }
1926
1927 impl<'de> ::fidl_next::IntoNatural for DeviceExchangeVectorResponse<'de> {
1928 type Natural = crate::natural::DeviceExchangeVectorResponse;
1929 }
1930
1931 #[derive(Clone, Debug)]
1933 #[repr(C)]
1934 pub struct DeviceCanAssertCsResponse {
1935 pub can: bool,
1936 }
1937
1938 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceCanAssertCsResponse>(), 1);
1939 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceCanAssertCsResponse>(), 1);
1940
1941 static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceCanAssertCsResponse, can), 0);
1942
1943 impl ::fidl_next::Constrained for DeviceCanAssertCsResponse {
1944 type Constraint = ();
1945
1946 fn validate(
1947 _: ::fidl_next::Slot<'_, Self>,
1948 _: Self::Constraint,
1949 ) -> Result<(), ::fidl_next::ValidationError> {
1950 Ok(())
1951 }
1952 }
1953
1954 unsafe impl ::fidl_next::Wire for DeviceCanAssertCsResponse {
1955 type Narrowed<'de> = DeviceCanAssertCsResponse;
1956
1957 #[inline]
1958 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1959 ::fidl_next::munge! {
1960 let Self {
1961 can,
1962
1963 } = &mut *out_;
1964 }
1965
1966 ::fidl_next::Wire::zero_padding(can);
1967 }
1968 }
1969
1970 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceCanAssertCsResponse
1971 where
1972 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1973 {
1974 fn decode(
1975 slot_: ::fidl_next::Slot<'_, Self>,
1976 decoder_: &mut ___D,
1977 _: (),
1978 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1979 ::fidl_next::munge! {
1980 let Self {
1981 mut can,
1982
1983 } = slot_;
1984 }
1985
1986 let _field = can.as_mut();
1987
1988 ::fidl_next::Decode::decode(can.as_mut(), decoder_, ())?;
1989
1990 Ok(())
1991 }
1992 }
1993
1994 impl ::fidl_next::IntoNatural for DeviceCanAssertCsResponse {
1995 type Natural = crate::natural::DeviceCanAssertCsResponse;
1996 }
1997
1998 #[derive(Clone, Debug)]
2000 #[repr(C)]
2001 pub struct DeviceAssertCsResponse {
2002 pub status: ::fidl_next::wire::fuchsia::StatusResult,
2003 }
2004
2005 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceAssertCsResponse>(), 4);
2006 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceAssertCsResponse>(), 4);
2007
2008 static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceAssertCsResponse, status), 0);
2009
2010 impl ::fidl_next::Constrained for DeviceAssertCsResponse {
2011 type Constraint = ();
2012
2013 fn validate(
2014 _: ::fidl_next::Slot<'_, Self>,
2015 _: Self::Constraint,
2016 ) -> Result<(), ::fidl_next::ValidationError> {
2017 Ok(())
2018 }
2019 }
2020
2021 unsafe impl ::fidl_next::Wire for DeviceAssertCsResponse {
2022 type Narrowed<'de> = DeviceAssertCsResponse;
2023
2024 #[inline]
2025 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2026 ::fidl_next::munge! {
2027 let Self {
2028 status,
2029
2030 } = &mut *out_;
2031 }
2032
2033 ::fidl_next::Wire::zero_padding(status);
2034 }
2035 }
2036
2037 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceAssertCsResponse
2038 where
2039 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2040 {
2041 fn decode(
2042 slot_: ::fidl_next::Slot<'_, Self>,
2043 decoder_: &mut ___D,
2044 _: (),
2045 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2046 ::fidl_next::munge! {
2047 let Self {
2048 mut status,
2049
2050 } = slot_;
2051 }
2052
2053 let _field = status.as_mut();
2054
2055 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
2056
2057 Ok(())
2058 }
2059 }
2060
2061 impl ::fidl_next::IntoNatural for DeviceAssertCsResponse {
2062 type Natural = crate::natural::DeviceAssertCsResponse;
2063 }
2064
2065 #[derive(Clone, Debug)]
2067 #[repr(C)]
2068 pub struct DeviceDeassertCsResponse {
2069 pub status: ::fidl_next::wire::fuchsia::StatusResult,
2070 }
2071
2072 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceDeassertCsResponse>(), 4);
2073 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceDeassertCsResponse>(), 4);
2074
2075 static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceDeassertCsResponse, status), 0);
2076
2077 impl ::fidl_next::Constrained for DeviceDeassertCsResponse {
2078 type Constraint = ();
2079
2080 fn validate(
2081 _: ::fidl_next::Slot<'_, Self>,
2082 _: Self::Constraint,
2083 ) -> Result<(), ::fidl_next::ValidationError> {
2084 Ok(())
2085 }
2086 }
2087
2088 unsafe impl ::fidl_next::Wire for DeviceDeassertCsResponse {
2089 type Narrowed<'de> = DeviceDeassertCsResponse;
2090
2091 #[inline]
2092 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2093 ::fidl_next::munge! {
2094 let Self {
2095 status,
2096
2097 } = &mut *out_;
2098 }
2099
2100 ::fidl_next::Wire::zero_padding(status);
2101 }
2102 }
2103
2104 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceDeassertCsResponse
2105 where
2106 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2107 {
2108 fn decode(
2109 slot_: ::fidl_next::Slot<'_, Self>,
2110 decoder_: &mut ___D,
2111 _: (),
2112 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2113 ::fidl_next::munge! {
2114 let Self {
2115 mut status,
2116
2117 } = slot_;
2118 }
2119
2120 let _field = status.as_mut();
2121
2122 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
2123
2124 Ok(())
2125 }
2126 }
2127
2128 impl ::fidl_next::IntoNatural for DeviceDeassertCsResponse {
2129 type Natural = crate::natural::DeviceDeassertCsResponse;
2130 }
2131
2132 pub type TestConnectSpiLoopbackResponse = ::fidl_next::wire::Unit;
2134}
2135
2136pub mod wire_optional {}
2137
2138pub mod generic {
2139
2140 pub struct DeviceTransmitVectorRequest<T0> {
2142 pub data: T0,
2143 }
2144
2145 unsafe impl<___E, T0>
2146 ::fidl_next::Encode<crate::wire::DeviceTransmitVectorRequest<'static>, ___E>
2147 for DeviceTransmitVectorRequest<T0>
2148 where
2149 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2150 ___E: ::fidl_next::Encoder,
2151 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
2152 {
2153 #[inline]
2154 fn encode(
2155 self,
2156 encoder_: &mut ___E,
2157 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceTransmitVectorRequest<'static>>,
2158 _: (),
2159 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2160 ::fidl_next::munge! {
2161 let crate::wire::DeviceTransmitVectorRequest {
2162 data,
2163
2164 } = out_;
2165 }
2166
2167 ::fidl_next::Encode::encode(self.data, encoder_, data, (8196, ()))?;
2168
2169 Ok(())
2170 }
2171 }
2172
2173 pub struct DeviceTransmitVectorResponse<T0> {
2175 pub status: T0,
2176 }
2177
2178 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceTransmitVectorResponse, ___E>
2179 for DeviceTransmitVectorResponse<T0>
2180 where
2181 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2182 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
2183 {
2184 #[inline]
2185 fn encode(
2186 self,
2187 encoder_: &mut ___E,
2188 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceTransmitVectorResponse>,
2189 _: (),
2190 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2191 ::fidl_next::munge! {
2192 let crate::wire::DeviceTransmitVectorResponse {
2193 status,
2194
2195 } = out_;
2196 }
2197
2198 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2199
2200 Ok(())
2201 }
2202 }
2203
2204 pub struct DeviceReceiveVectorRequest<T0> {
2206 pub size: T0,
2207 }
2208
2209 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceReceiveVectorRequest, ___E>
2210 for DeviceReceiveVectorRequest<T0>
2211 where
2212 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2213 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2214 {
2215 #[inline]
2216 fn encode(
2217 self,
2218 encoder_: &mut ___E,
2219 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceReceiveVectorRequest>,
2220 _: (),
2221 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2222 ::fidl_next::munge! {
2223 let crate::wire::DeviceReceiveVectorRequest {
2224 size,
2225
2226 } = out_;
2227 }
2228
2229 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
2230
2231 Ok(())
2232 }
2233 }
2234
2235 pub struct DeviceReceiveVectorResponse<T0, T1> {
2237 pub status: T0,
2238
2239 pub data: T1,
2240 }
2241
2242 unsafe impl<___E, T0, T1>
2243 ::fidl_next::Encode<crate::wire::DeviceReceiveVectorResponse<'static>, ___E>
2244 for DeviceReceiveVectorResponse<T0, T1>
2245 where
2246 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2247 ___E: ::fidl_next::Encoder,
2248 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
2249 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
2250 {
2251 #[inline]
2252 fn encode(
2253 self,
2254 encoder_: &mut ___E,
2255 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceReceiveVectorResponse<'static>>,
2256 _: (),
2257 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2258 ::fidl_next::munge! {
2259 let crate::wire::DeviceReceiveVectorResponse {
2260 status,
2261 data,
2262
2263 } = out_;
2264 }
2265
2266 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2267
2268 ::fidl_next::Encode::encode(self.data, encoder_, data, (8196, ()))?;
2269
2270 Ok(())
2271 }
2272 }
2273
2274 pub struct DeviceExchangeVectorRequest<T0> {
2276 pub txdata: T0,
2277 }
2278
2279 unsafe impl<___E, T0>
2280 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorRequest<'static>, ___E>
2281 for DeviceExchangeVectorRequest<T0>
2282 where
2283 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2284 ___E: ::fidl_next::Encoder,
2285 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
2286 {
2287 #[inline]
2288 fn encode(
2289 self,
2290 encoder_: &mut ___E,
2291 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExchangeVectorRequest<'static>>,
2292 _: (),
2293 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2294 ::fidl_next::munge! {
2295 let crate::wire::DeviceExchangeVectorRequest {
2296 txdata,
2297
2298 } = out_;
2299 }
2300
2301 ::fidl_next::Encode::encode(self.txdata, encoder_, txdata, (8196, ()))?;
2302
2303 Ok(())
2304 }
2305 }
2306
2307 pub struct DeviceExchangeVectorResponse<T0, T1> {
2309 pub status: T0,
2310
2311 pub rxdata: T1,
2312 }
2313
2314 unsafe impl<___E, T0, T1>
2315 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorResponse<'static>, ___E>
2316 for DeviceExchangeVectorResponse<T0, T1>
2317 where
2318 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2319 ___E: ::fidl_next::Encoder,
2320 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
2321 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
2322 {
2323 #[inline]
2324 fn encode(
2325 self,
2326 encoder_: &mut ___E,
2327 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExchangeVectorResponse<'static>>,
2328 _: (),
2329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2330 ::fidl_next::munge! {
2331 let crate::wire::DeviceExchangeVectorResponse {
2332 status,
2333 rxdata,
2334
2335 } = out_;
2336 }
2337
2338 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2339
2340 ::fidl_next::Encode::encode(self.rxdata, encoder_, rxdata, (8196, ()))?;
2341
2342 Ok(())
2343 }
2344 }
2345
2346 pub struct DeviceCanAssertCsResponse<T0> {
2348 pub can: T0,
2349 }
2350
2351 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceCanAssertCsResponse, ___E>
2352 for DeviceCanAssertCsResponse<T0>
2353 where
2354 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2355 T0: ::fidl_next::Encode<bool, ___E>,
2356 {
2357 #[inline]
2358 fn encode(
2359 self,
2360 encoder_: &mut ___E,
2361 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceCanAssertCsResponse>,
2362 _: (),
2363 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2364 ::fidl_next::munge! {
2365 let crate::wire::DeviceCanAssertCsResponse {
2366 can,
2367
2368 } = out_;
2369 }
2370
2371 ::fidl_next::Encode::encode(self.can, encoder_, can, ())?;
2372
2373 Ok(())
2374 }
2375 }
2376
2377 pub struct DeviceAssertCsResponse<T0> {
2379 pub status: T0,
2380 }
2381
2382 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceAssertCsResponse, ___E>
2383 for DeviceAssertCsResponse<T0>
2384 where
2385 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2386 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
2387 {
2388 #[inline]
2389 fn encode(
2390 self,
2391 encoder_: &mut ___E,
2392 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceAssertCsResponse>,
2393 _: (),
2394 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2395 ::fidl_next::munge! {
2396 let crate::wire::DeviceAssertCsResponse {
2397 status,
2398
2399 } = out_;
2400 }
2401
2402 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2403
2404 Ok(())
2405 }
2406 }
2407
2408 pub struct DeviceDeassertCsResponse<T0> {
2410 pub status: T0,
2411 }
2412
2413 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceDeassertCsResponse, ___E>
2414 for DeviceDeassertCsResponse<T0>
2415 where
2416 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2417 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
2418 {
2419 #[inline]
2420 fn encode(
2421 self,
2422 encoder_: &mut ___E,
2423 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceDeassertCsResponse>,
2424 _: (),
2425 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2426 ::fidl_next::munge! {
2427 let crate::wire::DeviceDeassertCsResponse {
2428 status,
2429
2430 } = out_;
2431 }
2432
2433 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2434
2435 Ok(())
2436 }
2437 }
2438
2439 pub type TestConnectSpiLoopbackResponse = ();
2441}
2442
2443pub use self::natural::*;
2444
2445pub const MAX_TRANSFER_SIZE: u32 = 8196 as u32;