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
1409pub mod wire {
1410
1411 #[derive(Debug)]
1413 #[repr(C)]
1414 pub struct DeviceTransmitVectorRequest<'de> {
1415 pub data: ::fidl_next::wire::Vector<'de, u8>,
1416 }
1417
1418 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceTransmitVectorRequest<'_>>(), 16);
1419 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceTransmitVectorRequest<'_>>(), 8);
1420
1421 static_assertions::const_assert_eq!(
1422 std::mem::offset_of!(DeviceTransmitVectorRequest<'_>, data),
1423 0
1424 );
1425
1426 impl ::fidl_next::Constrained for DeviceTransmitVectorRequest<'_> {
1427 type Constraint = ();
1428
1429 fn validate(
1430 _: ::fidl_next::Slot<'_, Self>,
1431 _: Self::Constraint,
1432 ) -> Result<(), ::fidl_next::ValidationError> {
1433 Ok(())
1434 }
1435 }
1436
1437 unsafe impl ::fidl_next::Wire for DeviceTransmitVectorRequest<'static> {
1438 type Narrowed<'de> = DeviceTransmitVectorRequest<'de>;
1439
1440 #[inline]
1441 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1442 ::fidl_next::munge! {
1443 let Self {
1444 data,
1445
1446 } = &mut *out_;
1447 }
1448
1449 ::fidl_next::Wire::zero_padding(data);
1450 }
1451 }
1452
1453 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceTransmitVectorRequest<'de>
1454 where
1455 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1456 ___D: ::fidl_next::Decoder<'de>,
1457 {
1458 fn decode(
1459 slot_: ::fidl_next::Slot<'_, Self>,
1460 decoder_: &mut ___D,
1461 _: (),
1462 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1463 ::fidl_next::munge! {
1464 let Self {
1465 mut data,
1466
1467 } = slot_;
1468 }
1469
1470 let _field = data.as_mut();
1471 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
1472 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8196, ()))?;
1473
1474 let data = unsafe { data.deref_unchecked() };
1475
1476 if data.len() > 8196 {
1477 return Err(::fidl_next::DecodeError::VectorTooLong {
1478 size: data.len() as u64,
1479 limit: 8196,
1480 });
1481 }
1482
1483 Ok(())
1484 }
1485 }
1486
1487 impl<'de> ::fidl_next::IntoNatural for DeviceTransmitVectorRequest<'de> {
1488 type Natural = crate::natural::DeviceTransmitVectorRequest;
1489 }
1490
1491 #[derive(Clone, Debug)]
1493 #[repr(C)]
1494 pub struct DeviceTransmitVectorResponse {
1495 pub status: ::fidl_next::wire::fuchsia::Status,
1496 }
1497
1498 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceTransmitVectorResponse>(), 4);
1499 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceTransmitVectorResponse>(), 4);
1500
1501 static_assertions::const_assert_eq!(
1502 std::mem::offset_of!(DeviceTransmitVectorResponse, status),
1503 0
1504 );
1505
1506 impl ::fidl_next::Constrained for DeviceTransmitVectorResponse {
1507 type Constraint = ();
1508
1509 fn validate(
1510 _: ::fidl_next::Slot<'_, Self>,
1511 _: Self::Constraint,
1512 ) -> Result<(), ::fidl_next::ValidationError> {
1513 Ok(())
1514 }
1515 }
1516
1517 unsafe impl ::fidl_next::Wire for DeviceTransmitVectorResponse {
1518 type Narrowed<'de> = DeviceTransmitVectorResponse;
1519
1520 #[inline]
1521 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1522 ::fidl_next::munge! {
1523 let Self {
1524 status,
1525
1526 } = &mut *out_;
1527 }
1528
1529 ::fidl_next::Wire::zero_padding(status);
1530 }
1531 }
1532
1533 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceTransmitVectorResponse
1534 where
1535 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1536 {
1537 fn decode(
1538 slot_: ::fidl_next::Slot<'_, Self>,
1539 decoder_: &mut ___D,
1540 _: (),
1541 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1542 ::fidl_next::munge! {
1543 let Self {
1544 mut status,
1545
1546 } = slot_;
1547 }
1548
1549 let _field = status.as_mut();
1550
1551 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
1552
1553 Ok(())
1554 }
1555 }
1556
1557 impl ::fidl_next::IntoNatural for DeviceTransmitVectorResponse {
1558 type Natural = crate::natural::DeviceTransmitVectorResponse;
1559 }
1560
1561 #[derive(Clone, Debug)]
1563 #[repr(C)]
1564 pub struct DeviceReceiveVectorRequest {
1565 pub size: ::fidl_next::wire::Uint32,
1566 }
1567
1568 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceReceiveVectorRequest>(), 4);
1569 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceReceiveVectorRequest>(), 4);
1570
1571 static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceReceiveVectorRequest, size), 0);
1572
1573 impl ::fidl_next::Constrained for DeviceReceiveVectorRequest {
1574 type Constraint = ();
1575
1576 fn validate(
1577 _: ::fidl_next::Slot<'_, Self>,
1578 _: Self::Constraint,
1579 ) -> Result<(), ::fidl_next::ValidationError> {
1580 Ok(())
1581 }
1582 }
1583
1584 unsafe impl ::fidl_next::Wire for DeviceReceiveVectorRequest {
1585 type Narrowed<'de> = DeviceReceiveVectorRequest;
1586
1587 #[inline]
1588 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1589 ::fidl_next::munge! {
1590 let Self {
1591 size,
1592
1593 } = &mut *out_;
1594 }
1595
1596 ::fidl_next::Wire::zero_padding(size);
1597 }
1598 }
1599
1600 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceReceiveVectorRequest
1601 where
1602 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1603 {
1604 fn decode(
1605 slot_: ::fidl_next::Slot<'_, Self>,
1606 decoder_: &mut ___D,
1607 _: (),
1608 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1609 ::fidl_next::munge! {
1610 let Self {
1611 mut size,
1612
1613 } = slot_;
1614 }
1615
1616 let _field = size.as_mut();
1617
1618 ::fidl_next::Decode::decode(size.as_mut(), decoder_, ())?;
1619
1620 Ok(())
1621 }
1622 }
1623
1624 impl ::fidl_next::IntoNatural for DeviceReceiveVectorRequest {
1625 type Natural = crate::natural::DeviceReceiveVectorRequest;
1626 }
1627
1628 #[derive(Debug)]
1630 #[repr(C)]
1631 pub struct DeviceReceiveVectorResponse<'de> {
1632 pub status: ::fidl_next::wire::fuchsia::Status,
1633
1634 pub data: ::fidl_next::wire::Vector<'de, u8>,
1635 }
1636
1637 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceReceiveVectorResponse<'_>>(), 24);
1638 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceReceiveVectorResponse<'_>>(), 8);
1639
1640 static_assertions::const_assert_eq!(
1641 std::mem::offset_of!(DeviceReceiveVectorResponse<'_>, status),
1642 0
1643 );
1644
1645 static_assertions::const_assert_eq!(
1646 std::mem::offset_of!(DeviceReceiveVectorResponse<'_>, data),
1647 8
1648 );
1649
1650 impl ::fidl_next::Constrained for DeviceReceiveVectorResponse<'_> {
1651 type Constraint = ();
1652
1653 fn validate(
1654 _: ::fidl_next::Slot<'_, Self>,
1655 _: Self::Constraint,
1656 ) -> Result<(), ::fidl_next::ValidationError> {
1657 Ok(())
1658 }
1659 }
1660
1661 unsafe impl ::fidl_next::Wire for DeviceReceiveVectorResponse<'static> {
1662 type Narrowed<'de> = DeviceReceiveVectorResponse<'de>;
1663
1664 #[inline]
1665 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1666 ::fidl_next::munge! {
1667 let Self {
1668 status,
1669 data,
1670
1671 } = &mut *out_;
1672 }
1673
1674 ::fidl_next::Wire::zero_padding(status);
1675
1676 ::fidl_next::Wire::zero_padding(data);
1677
1678 unsafe {
1679 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1680 }
1681 }
1682 }
1683
1684 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceReceiveVectorResponse<'de>
1685 where
1686 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1687 ___D: ::fidl_next::Decoder<'de>,
1688 {
1689 fn decode(
1690 slot_: ::fidl_next::Slot<'_, Self>,
1691 decoder_: &mut ___D,
1692 _: (),
1693 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1694 if slot_.as_bytes()[4..8] != [0u8; 4] {
1695 return Err(::fidl_next::DecodeError::InvalidPadding);
1696 }
1697
1698 ::fidl_next::munge! {
1699 let Self {
1700 mut status,
1701 mut data,
1702
1703 } = slot_;
1704 }
1705
1706 let _field = status.as_mut();
1707
1708 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
1709
1710 let _field = data.as_mut();
1711 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
1712 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8196, ()))?;
1713
1714 let data = unsafe { data.deref_unchecked() };
1715
1716 if data.len() > 8196 {
1717 return Err(::fidl_next::DecodeError::VectorTooLong {
1718 size: data.len() as u64,
1719 limit: 8196,
1720 });
1721 }
1722
1723 Ok(())
1724 }
1725 }
1726
1727 impl<'de> ::fidl_next::IntoNatural for DeviceReceiveVectorResponse<'de> {
1728 type Natural = crate::natural::DeviceReceiveVectorResponse;
1729 }
1730
1731 #[derive(Debug)]
1733 #[repr(C)]
1734 pub struct DeviceExchangeVectorRequest<'de> {
1735 pub txdata: ::fidl_next::wire::Vector<'de, u8>,
1736 }
1737
1738 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceExchangeVectorRequest<'_>>(), 16);
1739 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceExchangeVectorRequest<'_>>(), 8);
1740
1741 static_assertions::const_assert_eq!(
1742 std::mem::offset_of!(DeviceExchangeVectorRequest<'_>, txdata),
1743 0
1744 );
1745
1746 impl ::fidl_next::Constrained for DeviceExchangeVectorRequest<'_> {
1747 type Constraint = ();
1748
1749 fn validate(
1750 _: ::fidl_next::Slot<'_, Self>,
1751 _: Self::Constraint,
1752 ) -> Result<(), ::fidl_next::ValidationError> {
1753 Ok(())
1754 }
1755 }
1756
1757 unsafe impl ::fidl_next::Wire for DeviceExchangeVectorRequest<'static> {
1758 type Narrowed<'de> = DeviceExchangeVectorRequest<'de>;
1759
1760 #[inline]
1761 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1762 ::fidl_next::munge! {
1763 let Self {
1764 txdata,
1765
1766 } = &mut *out_;
1767 }
1768
1769 ::fidl_next::Wire::zero_padding(txdata);
1770 }
1771 }
1772
1773 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceExchangeVectorRequest<'de>
1774 where
1775 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1776 ___D: ::fidl_next::Decoder<'de>,
1777 {
1778 fn decode(
1779 slot_: ::fidl_next::Slot<'_, Self>,
1780 decoder_: &mut ___D,
1781 _: (),
1782 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1783 ::fidl_next::munge! {
1784 let Self {
1785 mut txdata,
1786
1787 } = slot_;
1788 }
1789
1790 let _field = txdata.as_mut();
1791 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
1792 ::fidl_next::Decode::decode(txdata.as_mut(), decoder_, (8196, ()))?;
1793
1794 let txdata = unsafe { txdata.deref_unchecked() };
1795
1796 if txdata.len() > 8196 {
1797 return Err(::fidl_next::DecodeError::VectorTooLong {
1798 size: txdata.len() as u64,
1799 limit: 8196,
1800 });
1801 }
1802
1803 Ok(())
1804 }
1805 }
1806
1807 impl<'de> ::fidl_next::IntoNatural for DeviceExchangeVectorRequest<'de> {
1808 type Natural = crate::natural::DeviceExchangeVectorRequest;
1809 }
1810
1811 #[derive(Debug)]
1813 #[repr(C)]
1814 pub struct DeviceExchangeVectorResponse<'de> {
1815 pub status: ::fidl_next::wire::fuchsia::Status,
1816
1817 pub rxdata: ::fidl_next::wire::Vector<'de, u8>,
1818 }
1819
1820 static_assertions::const_assert_eq!(
1821 std::mem::size_of::<DeviceExchangeVectorResponse<'_>>(),
1822 24
1823 );
1824 static_assertions::const_assert_eq!(
1825 std::mem::align_of::<DeviceExchangeVectorResponse<'_>>(),
1826 8
1827 );
1828
1829 static_assertions::const_assert_eq!(
1830 std::mem::offset_of!(DeviceExchangeVectorResponse<'_>, status),
1831 0
1832 );
1833
1834 static_assertions::const_assert_eq!(
1835 std::mem::offset_of!(DeviceExchangeVectorResponse<'_>, rxdata),
1836 8
1837 );
1838
1839 impl ::fidl_next::Constrained for DeviceExchangeVectorResponse<'_> {
1840 type Constraint = ();
1841
1842 fn validate(
1843 _: ::fidl_next::Slot<'_, Self>,
1844 _: Self::Constraint,
1845 ) -> Result<(), ::fidl_next::ValidationError> {
1846 Ok(())
1847 }
1848 }
1849
1850 unsafe impl ::fidl_next::Wire for DeviceExchangeVectorResponse<'static> {
1851 type Narrowed<'de> = DeviceExchangeVectorResponse<'de>;
1852
1853 #[inline]
1854 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1855 ::fidl_next::munge! {
1856 let Self {
1857 status,
1858 rxdata,
1859
1860 } = &mut *out_;
1861 }
1862
1863 ::fidl_next::Wire::zero_padding(status);
1864
1865 ::fidl_next::Wire::zero_padding(rxdata);
1866
1867 unsafe {
1868 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1869 }
1870 }
1871 }
1872
1873 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceExchangeVectorResponse<'de>
1874 where
1875 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1876 ___D: ::fidl_next::Decoder<'de>,
1877 {
1878 fn decode(
1879 slot_: ::fidl_next::Slot<'_, Self>,
1880 decoder_: &mut ___D,
1881 _: (),
1882 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1883 if slot_.as_bytes()[4..8] != [0u8; 4] {
1884 return Err(::fidl_next::DecodeError::InvalidPadding);
1885 }
1886
1887 ::fidl_next::munge! {
1888 let Self {
1889 mut status,
1890 mut rxdata,
1891
1892 } = slot_;
1893 }
1894
1895 let _field = status.as_mut();
1896
1897 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
1898
1899 let _field = rxdata.as_mut();
1900 ::fidl_next::Constrained::validate(_field, (8196, ()))?;
1901 ::fidl_next::Decode::decode(rxdata.as_mut(), decoder_, (8196, ()))?;
1902
1903 let rxdata = unsafe { rxdata.deref_unchecked() };
1904
1905 if rxdata.len() > 8196 {
1906 return Err(::fidl_next::DecodeError::VectorTooLong {
1907 size: rxdata.len() as u64,
1908 limit: 8196,
1909 });
1910 }
1911
1912 Ok(())
1913 }
1914 }
1915
1916 impl<'de> ::fidl_next::IntoNatural for DeviceExchangeVectorResponse<'de> {
1917 type Natural = crate::natural::DeviceExchangeVectorResponse;
1918 }
1919
1920 #[derive(Clone, Debug)]
1922 #[repr(C)]
1923 pub struct DeviceCanAssertCsResponse {
1924 pub can: bool,
1925 }
1926
1927 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceCanAssertCsResponse>(), 1);
1928 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceCanAssertCsResponse>(), 1);
1929
1930 static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceCanAssertCsResponse, can), 0);
1931
1932 impl ::fidl_next::Constrained for DeviceCanAssertCsResponse {
1933 type Constraint = ();
1934
1935 fn validate(
1936 _: ::fidl_next::Slot<'_, Self>,
1937 _: Self::Constraint,
1938 ) -> Result<(), ::fidl_next::ValidationError> {
1939 Ok(())
1940 }
1941 }
1942
1943 unsafe impl ::fidl_next::Wire for DeviceCanAssertCsResponse {
1944 type Narrowed<'de> = DeviceCanAssertCsResponse;
1945
1946 #[inline]
1947 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1948 ::fidl_next::munge! {
1949 let Self {
1950 can,
1951
1952 } = &mut *out_;
1953 }
1954
1955 ::fidl_next::Wire::zero_padding(can);
1956 }
1957 }
1958
1959 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceCanAssertCsResponse
1960 where
1961 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1962 {
1963 fn decode(
1964 slot_: ::fidl_next::Slot<'_, Self>,
1965 decoder_: &mut ___D,
1966 _: (),
1967 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1968 ::fidl_next::munge! {
1969 let Self {
1970 mut can,
1971
1972 } = slot_;
1973 }
1974
1975 let _field = can.as_mut();
1976
1977 ::fidl_next::Decode::decode(can.as_mut(), decoder_, ())?;
1978
1979 Ok(())
1980 }
1981 }
1982
1983 impl ::fidl_next::IntoNatural for DeviceCanAssertCsResponse {
1984 type Natural = crate::natural::DeviceCanAssertCsResponse;
1985 }
1986
1987 #[derive(Clone, Debug)]
1989 #[repr(C)]
1990 pub struct DeviceAssertCsResponse {
1991 pub status: ::fidl_next::wire::fuchsia::Status,
1992 }
1993
1994 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceAssertCsResponse>(), 4);
1995 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceAssertCsResponse>(), 4);
1996
1997 static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceAssertCsResponse, status), 0);
1998
1999 impl ::fidl_next::Constrained for DeviceAssertCsResponse {
2000 type Constraint = ();
2001
2002 fn validate(
2003 _: ::fidl_next::Slot<'_, Self>,
2004 _: Self::Constraint,
2005 ) -> Result<(), ::fidl_next::ValidationError> {
2006 Ok(())
2007 }
2008 }
2009
2010 unsafe impl ::fidl_next::Wire for DeviceAssertCsResponse {
2011 type Narrowed<'de> = DeviceAssertCsResponse;
2012
2013 #[inline]
2014 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2015 ::fidl_next::munge! {
2016 let Self {
2017 status,
2018
2019 } = &mut *out_;
2020 }
2021
2022 ::fidl_next::Wire::zero_padding(status);
2023 }
2024 }
2025
2026 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceAssertCsResponse
2027 where
2028 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2029 {
2030 fn decode(
2031 slot_: ::fidl_next::Slot<'_, Self>,
2032 decoder_: &mut ___D,
2033 _: (),
2034 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2035 ::fidl_next::munge! {
2036 let Self {
2037 mut status,
2038
2039 } = slot_;
2040 }
2041
2042 let _field = status.as_mut();
2043
2044 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
2045
2046 Ok(())
2047 }
2048 }
2049
2050 impl ::fidl_next::IntoNatural for DeviceAssertCsResponse {
2051 type Natural = crate::natural::DeviceAssertCsResponse;
2052 }
2053
2054 #[derive(Clone, Debug)]
2056 #[repr(C)]
2057 pub struct DeviceDeassertCsResponse {
2058 pub status: ::fidl_next::wire::fuchsia::Status,
2059 }
2060
2061 static_assertions::const_assert_eq!(std::mem::size_of::<DeviceDeassertCsResponse>(), 4);
2062 static_assertions::const_assert_eq!(std::mem::align_of::<DeviceDeassertCsResponse>(), 4);
2063
2064 static_assertions::const_assert_eq!(std::mem::offset_of!(DeviceDeassertCsResponse, status), 0);
2065
2066 impl ::fidl_next::Constrained for DeviceDeassertCsResponse {
2067 type Constraint = ();
2068
2069 fn validate(
2070 _: ::fidl_next::Slot<'_, Self>,
2071 _: Self::Constraint,
2072 ) -> Result<(), ::fidl_next::ValidationError> {
2073 Ok(())
2074 }
2075 }
2076
2077 unsafe impl ::fidl_next::Wire for DeviceDeassertCsResponse {
2078 type Narrowed<'de> = DeviceDeassertCsResponse;
2079
2080 #[inline]
2081 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2082 ::fidl_next::munge! {
2083 let Self {
2084 status,
2085
2086 } = &mut *out_;
2087 }
2088
2089 ::fidl_next::Wire::zero_padding(status);
2090 }
2091 }
2092
2093 unsafe impl<___D> ::fidl_next::Decode<___D> for DeviceDeassertCsResponse
2094 where
2095 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2096 {
2097 fn decode(
2098 slot_: ::fidl_next::Slot<'_, Self>,
2099 decoder_: &mut ___D,
2100 _: (),
2101 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2102 ::fidl_next::munge! {
2103 let Self {
2104 mut status,
2105
2106 } = slot_;
2107 }
2108
2109 let _field = status.as_mut();
2110
2111 ::fidl_next::Decode::decode(status.as_mut(), decoder_, ())?;
2112
2113 Ok(())
2114 }
2115 }
2116
2117 impl ::fidl_next::IntoNatural for DeviceDeassertCsResponse {
2118 type Natural = crate::natural::DeviceDeassertCsResponse;
2119 }
2120}
2121
2122pub mod wire_optional {}
2123
2124pub mod generic {
2125
2126 pub struct DeviceTransmitVectorRequest<T0> {
2128 pub data: T0,
2129 }
2130
2131 unsafe impl<___E, T0>
2132 ::fidl_next::Encode<crate::wire::DeviceTransmitVectorRequest<'static>, ___E>
2133 for DeviceTransmitVectorRequest<T0>
2134 where
2135 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2136 ___E: ::fidl_next::Encoder,
2137 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
2138 {
2139 #[inline]
2140 fn encode(
2141 self,
2142 encoder_: &mut ___E,
2143 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceTransmitVectorRequest<'static>>,
2144 _: (),
2145 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2146 ::fidl_next::munge! {
2147 let crate::wire::DeviceTransmitVectorRequest {
2148 data,
2149
2150 } = out_;
2151 }
2152
2153 ::fidl_next::Encode::encode(self.data, encoder_, data, (8196, ()))?;
2154
2155 Ok(())
2156 }
2157 }
2158
2159 pub struct DeviceTransmitVectorResponse<T0> {
2161 pub status: T0,
2162 }
2163
2164 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceTransmitVectorResponse, ___E>
2165 for DeviceTransmitVectorResponse<T0>
2166 where
2167 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2168 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
2169 {
2170 #[inline]
2171 fn encode(
2172 self,
2173 encoder_: &mut ___E,
2174 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceTransmitVectorResponse>,
2175 _: (),
2176 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2177 ::fidl_next::munge! {
2178 let crate::wire::DeviceTransmitVectorResponse {
2179 status,
2180
2181 } = out_;
2182 }
2183
2184 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2185
2186 Ok(())
2187 }
2188 }
2189
2190 pub struct DeviceReceiveVectorRequest<T0> {
2192 pub size: T0,
2193 }
2194
2195 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceReceiveVectorRequest, ___E>
2196 for DeviceReceiveVectorRequest<T0>
2197 where
2198 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2199 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2200 {
2201 #[inline]
2202 fn encode(
2203 self,
2204 encoder_: &mut ___E,
2205 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceReceiveVectorRequest>,
2206 _: (),
2207 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2208 ::fidl_next::munge! {
2209 let crate::wire::DeviceReceiveVectorRequest {
2210 size,
2211
2212 } = out_;
2213 }
2214
2215 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
2216
2217 Ok(())
2218 }
2219 }
2220
2221 pub struct DeviceReceiveVectorResponse<T0, T1> {
2223 pub status: T0,
2224
2225 pub data: T1,
2226 }
2227
2228 unsafe impl<___E, T0, T1>
2229 ::fidl_next::Encode<crate::wire::DeviceReceiveVectorResponse<'static>, ___E>
2230 for DeviceReceiveVectorResponse<T0, T1>
2231 where
2232 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2233 ___E: ::fidl_next::Encoder,
2234 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
2235 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
2236 {
2237 #[inline]
2238 fn encode(
2239 self,
2240 encoder_: &mut ___E,
2241 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceReceiveVectorResponse<'static>>,
2242 _: (),
2243 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2244 ::fidl_next::munge! {
2245 let crate::wire::DeviceReceiveVectorResponse {
2246 status,
2247 data,
2248
2249 } = out_;
2250 }
2251
2252 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2253
2254 ::fidl_next::Encode::encode(self.data, encoder_, data, (8196, ()))?;
2255
2256 Ok(())
2257 }
2258 }
2259
2260 pub struct DeviceExchangeVectorRequest<T0> {
2262 pub txdata: T0,
2263 }
2264
2265 unsafe impl<___E, T0>
2266 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorRequest<'static>, ___E>
2267 for DeviceExchangeVectorRequest<T0>
2268 where
2269 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2270 ___E: ::fidl_next::Encoder,
2271 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
2272 {
2273 #[inline]
2274 fn encode(
2275 self,
2276 encoder_: &mut ___E,
2277 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExchangeVectorRequest<'static>>,
2278 _: (),
2279 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2280 ::fidl_next::munge! {
2281 let crate::wire::DeviceExchangeVectorRequest {
2282 txdata,
2283
2284 } = out_;
2285 }
2286
2287 ::fidl_next::Encode::encode(self.txdata, encoder_, txdata, (8196, ()))?;
2288
2289 Ok(())
2290 }
2291 }
2292
2293 pub struct DeviceExchangeVectorResponse<T0, T1> {
2295 pub status: T0,
2296
2297 pub rxdata: T1,
2298 }
2299
2300 unsafe impl<___E, T0, T1>
2301 ::fidl_next::Encode<crate::wire::DeviceExchangeVectorResponse<'static>, ___E>
2302 for DeviceExchangeVectorResponse<T0, T1>
2303 where
2304 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2305 ___E: ::fidl_next::Encoder,
2306 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
2307 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
2308 {
2309 #[inline]
2310 fn encode(
2311 self,
2312 encoder_: &mut ___E,
2313 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExchangeVectorResponse<'static>>,
2314 _: (),
2315 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2316 ::fidl_next::munge! {
2317 let crate::wire::DeviceExchangeVectorResponse {
2318 status,
2319 rxdata,
2320
2321 } = out_;
2322 }
2323
2324 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2325
2326 ::fidl_next::Encode::encode(self.rxdata, encoder_, rxdata, (8196, ()))?;
2327
2328 Ok(())
2329 }
2330 }
2331
2332 pub struct DeviceCanAssertCsResponse<T0> {
2334 pub can: T0,
2335 }
2336
2337 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceCanAssertCsResponse, ___E>
2338 for DeviceCanAssertCsResponse<T0>
2339 where
2340 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2341 T0: ::fidl_next::Encode<bool, ___E>,
2342 {
2343 #[inline]
2344 fn encode(
2345 self,
2346 encoder_: &mut ___E,
2347 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceCanAssertCsResponse>,
2348 _: (),
2349 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2350 ::fidl_next::munge! {
2351 let crate::wire::DeviceCanAssertCsResponse {
2352 can,
2353
2354 } = out_;
2355 }
2356
2357 ::fidl_next::Encode::encode(self.can, encoder_, can, ())?;
2358
2359 Ok(())
2360 }
2361 }
2362
2363 pub struct DeviceAssertCsResponse<T0> {
2365 pub status: T0,
2366 }
2367
2368 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceAssertCsResponse, ___E>
2369 for DeviceAssertCsResponse<T0>
2370 where
2371 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2372 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
2373 {
2374 #[inline]
2375 fn encode(
2376 self,
2377 encoder_: &mut ___E,
2378 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceAssertCsResponse>,
2379 _: (),
2380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2381 ::fidl_next::munge! {
2382 let crate::wire::DeviceAssertCsResponse {
2383 status,
2384
2385 } = out_;
2386 }
2387
2388 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2389
2390 Ok(())
2391 }
2392 }
2393
2394 pub struct DeviceDeassertCsResponse<T0> {
2396 pub status: T0,
2397 }
2398
2399 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DeviceDeassertCsResponse, ___E>
2400 for DeviceDeassertCsResponse<T0>
2401 where
2402 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2403 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
2404 {
2405 #[inline]
2406 fn encode(
2407 self,
2408 encoder_: &mut ___E,
2409 out_: &mut ::core::mem::MaybeUninit<crate::wire::DeviceDeassertCsResponse>,
2410 _: (),
2411 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2412 ::fidl_next::munge! {
2413 let crate::wire::DeviceDeassertCsResponse {
2414 status,
2415
2416 } = out_;
2417 }
2418
2419 ::fidl_next::Encode::encode(self.status, encoder_, status, ())?;
2420
2421 Ok(())
2422 }
2423 }
2424}
2425
2426pub use self::natural::*;
2427
2428pub const MAX_TRANSFER_SIZE: u32 = 8196 as u32;