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