1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8 #[repr(C)]
9 pub struct SpiImplGetChipSelectCountResponse {
10 pub count: u32,
11 }
12
13 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplGetChipSelectCountResponse, ___E>
14 for SpiImplGetChipSelectCountResponse
15 where
16 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17 {
18 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
19 Self,
20 crate::wire::SpiImplGetChipSelectCountResponse,
21 > = unsafe {
22 ::fidl_next::CopyOptimization::enable_if(
23 true
24
25 && <
26 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
27 >::COPY_OPTIMIZATION.is_enabled()
28
29 )
30 };
31
32 #[inline]
33 fn encode(
34 self,
35 encoder_: &mut ___E,
36 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplGetChipSelectCountResponse>,
37 _: (),
38 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
39 ::fidl_next::munge! {
40 let crate::wire::SpiImplGetChipSelectCountResponse {
41 count,
42
43 } = out_;
44 }
45
46 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
47
48 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
49
50 Ok(())
51 }
52 }
53
54 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpiImplGetChipSelectCountResponse, ___E>
55 for &'a SpiImplGetChipSelectCountResponse
56 where
57 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
58 {
59 #[inline]
60 fn encode(
61 self,
62 encoder_: &mut ___E,
63 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplGetChipSelectCountResponse>,
64 _: (),
65 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
66 ::fidl_next::munge! {
67 let crate::wire::SpiImplGetChipSelectCountResponse {
68 count,
69
70 } = out_;
71 }
72
73 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
74
75 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
76
77 Ok(())
78 }
79 }
80
81 unsafe impl<___E>
82 ::fidl_next::EncodeOption<
83 ::fidl_next::wire::Box<'static, crate::wire::SpiImplGetChipSelectCountResponse>,
84 ___E,
85 > for SpiImplGetChipSelectCountResponse
86 where
87 ___E: ::fidl_next::Encoder + ?Sized,
88 SpiImplGetChipSelectCountResponse:
89 ::fidl_next::Encode<crate::wire::SpiImplGetChipSelectCountResponse, ___E>,
90 {
91 #[inline]
92 fn encode_option(
93 this: ::core::option::Option<Self>,
94 encoder: &mut ___E,
95 out: &mut ::core::mem::MaybeUninit<
96 ::fidl_next::wire::Box<'static, crate::wire::SpiImplGetChipSelectCountResponse>,
97 >,
98 _: (),
99 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
100 if let Some(inner) = this {
101 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
102 ::fidl_next::wire::Box::encode_present(out);
103 } else {
104 ::fidl_next::wire::Box::encode_absent(out);
105 }
106
107 Ok(())
108 }
109 }
110
111 unsafe impl<'a, ___E>
112 ::fidl_next::EncodeOption<
113 ::fidl_next::wire::Box<'static, crate::wire::SpiImplGetChipSelectCountResponse>,
114 ___E,
115 > for &'a SpiImplGetChipSelectCountResponse
116 where
117 ___E: ::fidl_next::Encoder + ?Sized,
118 &'a SpiImplGetChipSelectCountResponse:
119 ::fidl_next::Encode<crate::wire::SpiImplGetChipSelectCountResponse, ___E>,
120 {
121 #[inline]
122 fn encode_option(
123 this: ::core::option::Option<Self>,
124 encoder: &mut ___E,
125 out: &mut ::core::mem::MaybeUninit<
126 ::fidl_next::wire::Box<'static, crate::wire::SpiImplGetChipSelectCountResponse>,
127 >,
128 _: (),
129 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
130 if let Some(inner) = this {
131 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
132 ::fidl_next::wire::Box::encode_present(out);
133 } else {
134 ::fidl_next::wire::Box::encode_absent(out);
135 }
136
137 Ok(())
138 }
139 }
140
141 impl ::fidl_next::FromWire<crate::wire::SpiImplGetChipSelectCountResponse>
142 for SpiImplGetChipSelectCountResponse
143 {
144 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
145 crate::wire::SpiImplGetChipSelectCountResponse,
146 Self,
147 > = unsafe {
148 ::fidl_next::CopyOptimization::enable_if(
149 true
150 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
151 .is_enabled(),
152 )
153 };
154
155 #[inline]
156 fn from_wire(wire: crate::wire::SpiImplGetChipSelectCountResponse) -> Self {
157 Self { count: ::fidl_next::FromWire::from_wire(wire.count) }
158 }
159 }
160
161 impl ::fidl_next::FromWireRef<crate::wire::SpiImplGetChipSelectCountResponse>
162 for SpiImplGetChipSelectCountResponse
163 {
164 #[inline]
165 fn from_wire_ref(wire: &crate::wire::SpiImplGetChipSelectCountResponse) -> Self {
166 Self { count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count) }
167 }
168 }
169
170 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
171 pub struct SpiImplTransmitVectorRequest {
172 pub chip_select: u32,
173
174 pub data: ::std::vec::Vec<u8>,
175 }
176
177 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplTransmitVectorRequest<'static>, ___E>
178 for SpiImplTransmitVectorRequest
179 where
180 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
181 ___E: ::fidl_next::Encoder,
182 {
183 #[inline]
184 fn encode(
185 self,
186 encoder_: &mut ___E,
187 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplTransmitVectorRequest<'static>>,
188 _: (),
189 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
190 ::fidl_next::munge! {
191 let crate::wire::SpiImplTransmitVectorRequest {
192 chip_select,
193 data,
194
195 } = out_;
196 }
197
198 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
199
200 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
201
202 ::fidl_next::Encode::encode(self.data, encoder_, data, (4294967295, ()))?;
203
204 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
205 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
206
207 Ok(())
208 }
209 }
210
211 unsafe impl<'a, ___E>
212 ::fidl_next::Encode<crate::wire::SpiImplTransmitVectorRequest<'static>, ___E>
213 for &'a SpiImplTransmitVectorRequest
214 where
215 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
216 ___E: ::fidl_next::Encoder,
217 {
218 #[inline]
219 fn encode(
220 self,
221 encoder_: &mut ___E,
222 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplTransmitVectorRequest<'static>>,
223 _: (),
224 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
225 ::fidl_next::munge! {
226 let crate::wire::SpiImplTransmitVectorRequest {
227 chip_select,
228 data,
229
230 } = out_;
231 }
232
233 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
234
235 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
236
237 ::fidl_next::Encode::encode(&self.data, encoder_, data, (4294967295, ()))?;
238
239 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
240 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
241
242 Ok(())
243 }
244 }
245
246 unsafe impl<___E>
247 ::fidl_next::EncodeOption<
248 ::fidl_next::wire::Box<'static, crate::wire::SpiImplTransmitVectorRequest<'static>>,
249 ___E,
250 > for SpiImplTransmitVectorRequest
251 where
252 ___E: ::fidl_next::Encoder + ?Sized,
253 SpiImplTransmitVectorRequest:
254 ::fidl_next::Encode<crate::wire::SpiImplTransmitVectorRequest<'static>, ___E>,
255 {
256 #[inline]
257 fn encode_option(
258 this: ::core::option::Option<Self>,
259 encoder: &mut ___E,
260 out: &mut ::core::mem::MaybeUninit<
261 ::fidl_next::wire::Box<'static, crate::wire::SpiImplTransmitVectorRequest<'static>>,
262 >,
263 _: (),
264 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
265 if let Some(inner) = this {
266 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
267 ::fidl_next::wire::Box::encode_present(out);
268 } else {
269 ::fidl_next::wire::Box::encode_absent(out);
270 }
271
272 Ok(())
273 }
274 }
275
276 unsafe impl<'a, ___E>
277 ::fidl_next::EncodeOption<
278 ::fidl_next::wire::Box<'static, crate::wire::SpiImplTransmitVectorRequest<'static>>,
279 ___E,
280 > for &'a SpiImplTransmitVectorRequest
281 where
282 ___E: ::fidl_next::Encoder + ?Sized,
283 &'a SpiImplTransmitVectorRequest:
284 ::fidl_next::Encode<crate::wire::SpiImplTransmitVectorRequest<'static>, ___E>,
285 {
286 #[inline]
287 fn encode_option(
288 this: ::core::option::Option<Self>,
289 encoder: &mut ___E,
290 out: &mut ::core::mem::MaybeUninit<
291 ::fidl_next::wire::Box<'static, crate::wire::SpiImplTransmitVectorRequest<'static>>,
292 >,
293 _: (),
294 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
295 if let Some(inner) = this {
296 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
297 ::fidl_next::wire::Box::encode_present(out);
298 } else {
299 ::fidl_next::wire::Box::encode_absent(out);
300 }
301
302 Ok(())
303 }
304 }
305
306 impl<'de> ::fidl_next::FromWire<crate::wire::SpiImplTransmitVectorRequest<'de>>
307 for SpiImplTransmitVectorRequest
308 {
309 #[inline]
310 fn from_wire(wire: crate::wire::SpiImplTransmitVectorRequest<'de>) -> Self {
311 Self {
312 chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select),
313
314 data: ::fidl_next::FromWire::from_wire(wire.data),
315 }
316 }
317 }
318
319 impl<'de> ::fidl_next::FromWireRef<crate::wire::SpiImplTransmitVectorRequest<'de>>
320 for SpiImplTransmitVectorRequest
321 {
322 #[inline]
323 fn from_wire_ref(wire: &crate::wire::SpiImplTransmitVectorRequest<'de>) -> Self {
324 Self {
325 chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select),
326
327 data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data),
328 }
329 }
330 }
331
332 pub type SpiImplTransmitVectorResponse = ();
333
334 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
335 #[repr(C)]
336 pub struct SpiImplReceiveVectorRequest {
337 pub chip_select: u32,
338
339 pub size: u32,
340 }
341
342 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorRequest, ___E>
343 for SpiImplReceiveVectorRequest
344 where
345 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
346 {
347 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
348 Self,
349 crate::wire::SpiImplReceiveVectorRequest,
350 > = unsafe {
351 ::fidl_next::CopyOptimization::enable_if(
352 true
353
354 && <
355 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
356 >::COPY_OPTIMIZATION.is_enabled()
357
358 && <
359 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
360 >::COPY_OPTIMIZATION.is_enabled()
361
362 )
363 };
364
365 #[inline]
366 fn encode(
367 self,
368 encoder_: &mut ___E,
369 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVectorRequest>,
370 _: (),
371 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
372 ::fidl_next::munge! {
373 let crate::wire::SpiImplReceiveVectorRequest {
374 chip_select,
375 size,
376
377 } = out_;
378 }
379
380 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
381
382 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
383
384 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
385
386 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(size.as_mut_ptr()) };
387
388 Ok(())
389 }
390 }
391
392 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorRequest, ___E>
393 for &'a SpiImplReceiveVectorRequest
394 where
395 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
396 {
397 #[inline]
398 fn encode(
399 self,
400 encoder_: &mut ___E,
401 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVectorRequest>,
402 _: (),
403 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
404 ::fidl_next::munge! {
405 let crate::wire::SpiImplReceiveVectorRequest {
406 chip_select,
407 size,
408
409 } = out_;
410 }
411
412 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
413
414 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
415
416 ::fidl_next::Encode::encode(&self.size, encoder_, size, ())?;
417
418 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(size.as_mut_ptr()) };
419
420 Ok(())
421 }
422 }
423
424 unsafe impl<___E>
425 ::fidl_next::EncodeOption<
426 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVectorRequest>,
427 ___E,
428 > for SpiImplReceiveVectorRequest
429 where
430 ___E: ::fidl_next::Encoder + ?Sized,
431 SpiImplReceiveVectorRequest:
432 ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorRequest, ___E>,
433 {
434 #[inline]
435 fn encode_option(
436 this: ::core::option::Option<Self>,
437 encoder: &mut ___E,
438 out: &mut ::core::mem::MaybeUninit<
439 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVectorRequest>,
440 >,
441 _: (),
442 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
443 if let Some(inner) = this {
444 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
445 ::fidl_next::wire::Box::encode_present(out);
446 } else {
447 ::fidl_next::wire::Box::encode_absent(out);
448 }
449
450 Ok(())
451 }
452 }
453
454 unsafe impl<'a, ___E>
455 ::fidl_next::EncodeOption<
456 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVectorRequest>,
457 ___E,
458 > for &'a SpiImplReceiveVectorRequest
459 where
460 ___E: ::fidl_next::Encoder + ?Sized,
461 &'a SpiImplReceiveVectorRequest:
462 ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorRequest, ___E>,
463 {
464 #[inline]
465 fn encode_option(
466 this: ::core::option::Option<Self>,
467 encoder: &mut ___E,
468 out: &mut ::core::mem::MaybeUninit<
469 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVectorRequest>,
470 >,
471 _: (),
472 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
473 if let Some(inner) = this {
474 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
475 ::fidl_next::wire::Box::encode_present(out);
476 } else {
477 ::fidl_next::wire::Box::encode_absent(out);
478 }
479
480 Ok(())
481 }
482 }
483
484 impl ::fidl_next::FromWire<crate::wire::SpiImplReceiveVectorRequest>
485 for SpiImplReceiveVectorRequest
486 {
487 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
488 crate::wire::SpiImplReceiveVectorRequest,
489 Self,
490 > = unsafe {
491 ::fidl_next::CopyOptimization::enable_if(
492 true
493 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
494 .is_enabled()
495 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
496 .is_enabled(),
497 )
498 };
499
500 #[inline]
501 fn from_wire(wire: crate::wire::SpiImplReceiveVectorRequest) -> Self {
502 Self {
503 chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select),
504
505 size: ::fidl_next::FromWire::from_wire(wire.size),
506 }
507 }
508 }
509
510 impl ::fidl_next::FromWireRef<crate::wire::SpiImplReceiveVectorRequest>
511 for SpiImplReceiveVectorRequest
512 {
513 #[inline]
514 fn from_wire_ref(wire: &crate::wire::SpiImplReceiveVectorRequest) -> Self {
515 Self {
516 chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select),
517
518 size: ::fidl_next::FromWireRef::from_wire_ref(&wire.size),
519 }
520 }
521 }
522
523 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
524 pub struct SpiImplReceiveVectorResponse {
525 pub data: ::std::vec::Vec<u8>,
526 }
527
528 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorResponse<'static>, ___E>
529 for SpiImplReceiveVectorResponse
530 where
531 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
532 ___E: ::fidl_next::Encoder,
533 {
534 #[inline]
535 fn encode(
536 self,
537 encoder_: &mut ___E,
538 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVectorResponse<'static>>,
539 _: (),
540 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
541 ::fidl_next::munge! {
542 let crate::wire::SpiImplReceiveVectorResponse {
543 data,
544
545 } = out_;
546 }
547
548 ::fidl_next::Encode::encode(self.data, encoder_, data, (4294967295, ()))?;
549
550 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
551 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
552
553 Ok(())
554 }
555 }
556
557 unsafe impl<'a, ___E>
558 ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorResponse<'static>, ___E>
559 for &'a SpiImplReceiveVectorResponse
560 where
561 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
562 ___E: ::fidl_next::Encoder,
563 {
564 #[inline]
565 fn encode(
566 self,
567 encoder_: &mut ___E,
568 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVectorResponse<'static>>,
569 _: (),
570 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
571 ::fidl_next::munge! {
572 let crate::wire::SpiImplReceiveVectorResponse {
573 data,
574
575 } = out_;
576 }
577
578 ::fidl_next::Encode::encode(&self.data, encoder_, data, (4294967295, ()))?;
579
580 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
581 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
582
583 Ok(())
584 }
585 }
586
587 unsafe impl<___E>
588 ::fidl_next::EncodeOption<
589 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVectorResponse<'static>>,
590 ___E,
591 > for SpiImplReceiveVectorResponse
592 where
593 ___E: ::fidl_next::Encoder + ?Sized,
594 SpiImplReceiveVectorResponse:
595 ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorResponse<'static>, ___E>,
596 {
597 #[inline]
598 fn encode_option(
599 this: ::core::option::Option<Self>,
600 encoder: &mut ___E,
601 out: &mut ::core::mem::MaybeUninit<
602 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVectorResponse<'static>>,
603 >,
604 _: (),
605 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
606 if let Some(inner) = this {
607 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
608 ::fidl_next::wire::Box::encode_present(out);
609 } else {
610 ::fidl_next::wire::Box::encode_absent(out);
611 }
612
613 Ok(())
614 }
615 }
616
617 unsafe impl<'a, ___E>
618 ::fidl_next::EncodeOption<
619 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVectorResponse<'static>>,
620 ___E,
621 > for &'a SpiImplReceiveVectorResponse
622 where
623 ___E: ::fidl_next::Encoder + ?Sized,
624 &'a SpiImplReceiveVectorResponse:
625 ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorResponse<'static>, ___E>,
626 {
627 #[inline]
628 fn encode_option(
629 this: ::core::option::Option<Self>,
630 encoder: &mut ___E,
631 out: &mut ::core::mem::MaybeUninit<
632 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVectorResponse<'static>>,
633 >,
634 _: (),
635 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
636 if let Some(inner) = this {
637 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
638 ::fidl_next::wire::Box::encode_present(out);
639 } else {
640 ::fidl_next::wire::Box::encode_absent(out);
641 }
642
643 Ok(())
644 }
645 }
646
647 impl<'de> ::fidl_next::FromWire<crate::wire::SpiImplReceiveVectorResponse<'de>>
648 for SpiImplReceiveVectorResponse
649 {
650 #[inline]
651 fn from_wire(wire: crate::wire::SpiImplReceiveVectorResponse<'de>) -> Self {
652 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
653 }
654 }
655
656 impl<'de> ::fidl_next::FromWireRef<crate::wire::SpiImplReceiveVectorResponse<'de>>
657 for SpiImplReceiveVectorResponse
658 {
659 #[inline]
660 fn from_wire_ref(wire: &crate::wire::SpiImplReceiveVectorResponse<'de>) -> Self {
661 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
662 }
663 }
664
665 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
666 pub struct SpiImplExchangeVectorRequest {
667 pub chip_select: u32,
668
669 pub txdata: ::std::vec::Vec<u8>,
670 }
671
672 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorRequest<'static>, ___E>
673 for SpiImplExchangeVectorRequest
674 where
675 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
676 ___E: ::fidl_next::Encoder,
677 {
678 #[inline]
679 fn encode(
680 self,
681 encoder_: &mut ___E,
682 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplExchangeVectorRequest<'static>>,
683 _: (),
684 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
685 ::fidl_next::munge! {
686 let crate::wire::SpiImplExchangeVectorRequest {
687 chip_select,
688 txdata,
689
690 } = out_;
691 }
692
693 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
694
695 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
696
697 ::fidl_next::Encode::encode(self.txdata, encoder_, txdata, (4294967295, ()))?;
698
699 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txdata.as_mut_ptr()) };
700 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
701
702 Ok(())
703 }
704 }
705
706 unsafe impl<'a, ___E>
707 ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorRequest<'static>, ___E>
708 for &'a SpiImplExchangeVectorRequest
709 where
710 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
711 ___E: ::fidl_next::Encoder,
712 {
713 #[inline]
714 fn encode(
715 self,
716 encoder_: &mut ___E,
717 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplExchangeVectorRequest<'static>>,
718 _: (),
719 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
720 ::fidl_next::munge! {
721 let crate::wire::SpiImplExchangeVectorRequest {
722 chip_select,
723 txdata,
724
725 } = out_;
726 }
727
728 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
729
730 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
731
732 ::fidl_next::Encode::encode(&self.txdata, encoder_, txdata, (4294967295, ()))?;
733
734 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txdata.as_mut_ptr()) };
735 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
736
737 Ok(())
738 }
739 }
740
741 unsafe impl<___E>
742 ::fidl_next::EncodeOption<
743 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVectorRequest<'static>>,
744 ___E,
745 > for SpiImplExchangeVectorRequest
746 where
747 ___E: ::fidl_next::Encoder + ?Sized,
748 SpiImplExchangeVectorRequest:
749 ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorRequest<'static>, ___E>,
750 {
751 #[inline]
752 fn encode_option(
753 this: ::core::option::Option<Self>,
754 encoder: &mut ___E,
755 out: &mut ::core::mem::MaybeUninit<
756 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVectorRequest<'static>>,
757 >,
758 _: (),
759 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
760 if let Some(inner) = this {
761 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
762 ::fidl_next::wire::Box::encode_present(out);
763 } else {
764 ::fidl_next::wire::Box::encode_absent(out);
765 }
766
767 Ok(())
768 }
769 }
770
771 unsafe impl<'a, ___E>
772 ::fidl_next::EncodeOption<
773 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVectorRequest<'static>>,
774 ___E,
775 > for &'a SpiImplExchangeVectorRequest
776 where
777 ___E: ::fidl_next::Encoder + ?Sized,
778 &'a SpiImplExchangeVectorRequest:
779 ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorRequest<'static>, ___E>,
780 {
781 #[inline]
782 fn encode_option(
783 this: ::core::option::Option<Self>,
784 encoder: &mut ___E,
785 out: &mut ::core::mem::MaybeUninit<
786 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVectorRequest<'static>>,
787 >,
788 _: (),
789 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
790 if let Some(inner) = this {
791 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
792 ::fidl_next::wire::Box::encode_present(out);
793 } else {
794 ::fidl_next::wire::Box::encode_absent(out);
795 }
796
797 Ok(())
798 }
799 }
800
801 impl<'de> ::fidl_next::FromWire<crate::wire::SpiImplExchangeVectorRequest<'de>>
802 for SpiImplExchangeVectorRequest
803 {
804 #[inline]
805 fn from_wire(wire: crate::wire::SpiImplExchangeVectorRequest<'de>) -> Self {
806 Self {
807 chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select),
808
809 txdata: ::fidl_next::FromWire::from_wire(wire.txdata),
810 }
811 }
812 }
813
814 impl<'de> ::fidl_next::FromWireRef<crate::wire::SpiImplExchangeVectorRequest<'de>>
815 for SpiImplExchangeVectorRequest
816 {
817 #[inline]
818 fn from_wire_ref(wire: &crate::wire::SpiImplExchangeVectorRequest<'de>) -> Self {
819 Self {
820 chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select),
821
822 txdata: ::fidl_next::FromWireRef::from_wire_ref(&wire.txdata),
823 }
824 }
825 }
826
827 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
828 pub struct SpiImplExchangeVectorResponse {
829 pub rxdata: ::std::vec::Vec<u8>,
830 }
831
832 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorResponse<'static>, ___E>
833 for SpiImplExchangeVectorResponse
834 where
835 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
836 ___E: ::fidl_next::Encoder,
837 {
838 #[inline]
839 fn encode(
840 self,
841 encoder_: &mut ___E,
842 out_: &mut ::core::mem::MaybeUninit<
843 crate::wire::SpiImplExchangeVectorResponse<'static>,
844 >,
845 _: (),
846 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
847 ::fidl_next::munge! {
848 let crate::wire::SpiImplExchangeVectorResponse {
849 rxdata,
850
851 } = out_;
852 }
853
854 ::fidl_next::Encode::encode(self.rxdata, encoder_, rxdata, (4294967295, ()))?;
855
856 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rxdata.as_mut_ptr()) };
857 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
858
859 Ok(())
860 }
861 }
862
863 unsafe impl<'a, ___E>
864 ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorResponse<'static>, ___E>
865 for &'a SpiImplExchangeVectorResponse
866 where
867 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
868 ___E: ::fidl_next::Encoder,
869 {
870 #[inline]
871 fn encode(
872 self,
873 encoder_: &mut ___E,
874 out_: &mut ::core::mem::MaybeUninit<
875 crate::wire::SpiImplExchangeVectorResponse<'static>,
876 >,
877 _: (),
878 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
879 ::fidl_next::munge! {
880 let crate::wire::SpiImplExchangeVectorResponse {
881 rxdata,
882
883 } = out_;
884 }
885
886 ::fidl_next::Encode::encode(&self.rxdata, encoder_, rxdata, (4294967295, ()))?;
887
888 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rxdata.as_mut_ptr()) };
889 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
890
891 Ok(())
892 }
893 }
894
895 unsafe impl<___E>
896 ::fidl_next::EncodeOption<
897 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVectorResponse<'static>>,
898 ___E,
899 > for SpiImplExchangeVectorResponse
900 where
901 ___E: ::fidl_next::Encoder + ?Sized,
902 SpiImplExchangeVectorResponse:
903 ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorResponse<'static>, ___E>,
904 {
905 #[inline]
906 fn encode_option(
907 this: ::core::option::Option<Self>,
908 encoder: &mut ___E,
909 out: &mut ::core::mem::MaybeUninit<
910 ::fidl_next::wire::Box<
911 'static,
912 crate::wire::SpiImplExchangeVectorResponse<'static>,
913 >,
914 >,
915 _: (),
916 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
917 if let Some(inner) = this {
918 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
919 ::fidl_next::wire::Box::encode_present(out);
920 } else {
921 ::fidl_next::wire::Box::encode_absent(out);
922 }
923
924 Ok(())
925 }
926 }
927
928 unsafe impl<'a, ___E>
929 ::fidl_next::EncodeOption<
930 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVectorResponse<'static>>,
931 ___E,
932 > for &'a SpiImplExchangeVectorResponse
933 where
934 ___E: ::fidl_next::Encoder + ?Sized,
935 &'a SpiImplExchangeVectorResponse:
936 ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorResponse<'static>, ___E>,
937 {
938 #[inline]
939 fn encode_option(
940 this: ::core::option::Option<Self>,
941 encoder: &mut ___E,
942 out: &mut ::core::mem::MaybeUninit<
943 ::fidl_next::wire::Box<
944 'static,
945 crate::wire::SpiImplExchangeVectorResponse<'static>,
946 >,
947 >,
948 _: (),
949 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
950 if let Some(inner) = this {
951 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
952 ::fidl_next::wire::Box::encode_present(out);
953 } else {
954 ::fidl_next::wire::Box::encode_absent(out);
955 }
956
957 Ok(())
958 }
959 }
960
961 impl<'de> ::fidl_next::FromWire<crate::wire::SpiImplExchangeVectorResponse<'de>>
962 for SpiImplExchangeVectorResponse
963 {
964 #[inline]
965 fn from_wire(wire: crate::wire::SpiImplExchangeVectorResponse<'de>) -> Self {
966 Self { rxdata: ::fidl_next::FromWire::from_wire(wire.rxdata) }
967 }
968 }
969
970 impl<'de> ::fidl_next::FromWireRef<crate::wire::SpiImplExchangeVectorResponse<'de>>
971 for SpiImplExchangeVectorResponse
972 {
973 #[inline]
974 fn from_wire_ref(wire: &crate::wire::SpiImplExchangeVectorResponse<'de>) -> Self {
975 Self { rxdata: ::fidl_next::FromWireRef::from_wire_ref(&wire.rxdata) }
976 }
977 }
978
979 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
980 #[repr(C)]
981 pub struct SpiImplLockBusRequest {
982 pub chip_select: u32,
983 }
984
985 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplLockBusRequest, ___E>
986 for SpiImplLockBusRequest
987 where
988 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
989 {
990 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
991 Self,
992 crate::wire::SpiImplLockBusRequest,
993 > = unsafe {
994 ::fidl_next::CopyOptimization::enable_if(
995 true
996
997 && <
998 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
999 >::COPY_OPTIMIZATION.is_enabled()
1000
1001 )
1002 };
1003
1004 #[inline]
1005 fn encode(
1006 self,
1007 encoder_: &mut ___E,
1008 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplLockBusRequest>,
1009 _: (),
1010 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1011 ::fidl_next::munge! {
1012 let crate::wire::SpiImplLockBusRequest {
1013 chip_select,
1014
1015 } = out_;
1016 }
1017
1018 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
1019
1020 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1021
1022 Ok(())
1023 }
1024 }
1025
1026 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpiImplLockBusRequest, ___E>
1027 for &'a SpiImplLockBusRequest
1028 where
1029 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1030 {
1031 #[inline]
1032 fn encode(
1033 self,
1034 encoder_: &mut ___E,
1035 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplLockBusRequest>,
1036 _: (),
1037 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1038 ::fidl_next::munge! {
1039 let crate::wire::SpiImplLockBusRequest {
1040 chip_select,
1041
1042 } = out_;
1043 }
1044
1045 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
1046
1047 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1048
1049 Ok(())
1050 }
1051 }
1052
1053 unsafe impl<___E>
1054 ::fidl_next::EncodeOption<
1055 ::fidl_next::wire::Box<'static, crate::wire::SpiImplLockBusRequest>,
1056 ___E,
1057 > for SpiImplLockBusRequest
1058 where
1059 ___E: ::fidl_next::Encoder + ?Sized,
1060 SpiImplLockBusRequest: ::fidl_next::Encode<crate::wire::SpiImplLockBusRequest, ___E>,
1061 {
1062 #[inline]
1063 fn encode_option(
1064 this: ::core::option::Option<Self>,
1065 encoder: &mut ___E,
1066 out: &mut ::core::mem::MaybeUninit<
1067 ::fidl_next::wire::Box<'static, crate::wire::SpiImplLockBusRequest>,
1068 >,
1069 _: (),
1070 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1071 if let Some(inner) = this {
1072 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1073 ::fidl_next::wire::Box::encode_present(out);
1074 } else {
1075 ::fidl_next::wire::Box::encode_absent(out);
1076 }
1077
1078 Ok(())
1079 }
1080 }
1081
1082 unsafe impl<'a, ___E>
1083 ::fidl_next::EncodeOption<
1084 ::fidl_next::wire::Box<'static, crate::wire::SpiImplLockBusRequest>,
1085 ___E,
1086 > for &'a SpiImplLockBusRequest
1087 where
1088 ___E: ::fidl_next::Encoder + ?Sized,
1089 &'a SpiImplLockBusRequest: ::fidl_next::Encode<crate::wire::SpiImplLockBusRequest, ___E>,
1090 {
1091 #[inline]
1092 fn encode_option(
1093 this: ::core::option::Option<Self>,
1094 encoder: &mut ___E,
1095 out: &mut ::core::mem::MaybeUninit<
1096 ::fidl_next::wire::Box<'static, crate::wire::SpiImplLockBusRequest>,
1097 >,
1098 _: (),
1099 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1100 if let Some(inner) = this {
1101 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1102 ::fidl_next::wire::Box::encode_present(out);
1103 } else {
1104 ::fidl_next::wire::Box::encode_absent(out);
1105 }
1106
1107 Ok(())
1108 }
1109 }
1110
1111 impl ::fidl_next::FromWire<crate::wire::SpiImplLockBusRequest> for SpiImplLockBusRequest {
1112 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1113 crate::wire::SpiImplLockBusRequest,
1114 Self,
1115 > = unsafe {
1116 ::fidl_next::CopyOptimization::enable_if(
1117 true
1118 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1119 .is_enabled(),
1120 )
1121 };
1122
1123 #[inline]
1124 fn from_wire(wire: crate::wire::SpiImplLockBusRequest) -> Self {
1125 Self { chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select) }
1126 }
1127 }
1128
1129 impl ::fidl_next::FromWireRef<crate::wire::SpiImplLockBusRequest> for SpiImplLockBusRequest {
1130 #[inline]
1131 fn from_wire_ref(wire: &crate::wire::SpiImplLockBusRequest) -> Self {
1132 Self { chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select) }
1133 }
1134 }
1135
1136 pub type SpiImplLockBusResponse = ();
1137
1138 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1139 #[repr(C)]
1140 pub struct SpiImplUnlockBusRequest {
1141 pub chip_select: u32,
1142 }
1143
1144 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplUnlockBusRequest, ___E>
1145 for SpiImplUnlockBusRequest
1146 where
1147 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1148 {
1149 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1150 Self,
1151 crate::wire::SpiImplUnlockBusRequest,
1152 > = unsafe {
1153 ::fidl_next::CopyOptimization::enable_if(
1154 true
1155
1156 && <
1157 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
1158 >::COPY_OPTIMIZATION.is_enabled()
1159
1160 )
1161 };
1162
1163 #[inline]
1164 fn encode(
1165 self,
1166 encoder_: &mut ___E,
1167 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplUnlockBusRequest>,
1168 _: (),
1169 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1170 ::fidl_next::munge! {
1171 let crate::wire::SpiImplUnlockBusRequest {
1172 chip_select,
1173
1174 } = out_;
1175 }
1176
1177 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
1178
1179 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1180
1181 Ok(())
1182 }
1183 }
1184
1185 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpiImplUnlockBusRequest, ___E>
1186 for &'a SpiImplUnlockBusRequest
1187 where
1188 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1189 {
1190 #[inline]
1191 fn encode(
1192 self,
1193 encoder_: &mut ___E,
1194 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplUnlockBusRequest>,
1195 _: (),
1196 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1197 ::fidl_next::munge! {
1198 let crate::wire::SpiImplUnlockBusRequest {
1199 chip_select,
1200
1201 } = out_;
1202 }
1203
1204 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
1205
1206 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1207
1208 Ok(())
1209 }
1210 }
1211
1212 unsafe impl<___E>
1213 ::fidl_next::EncodeOption<
1214 ::fidl_next::wire::Box<'static, crate::wire::SpiImplUnlockBusRequest>,
1215 ___E,
1216 > for SpiImplUnlockBusRequest
1217 where
1218 ___E: ::fidl_next::Encoder + ?Sized,
1219 SpiImplUnlockBusRequest: ::fidl_next::Encode<crate::wire::SpiImplUnlockBusRequest, ___E>,
1220 {
1221 #[inline]
1222 fn encode_option(
1223 this: ::core::option::Option<Self>,
1224 encoder: &mut ___E,
1225 out: &mut ::core::mem::MaybeUninit<
1226 ::fidl_next::wire::Box<'static, crate::wire::SpiImplUnlockBusRequest>,
1227 >,
1228 _: (),
1229 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1230 if let Some(inner) = this {
1231 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1232 ::fidl_next::wire::Box::encode_present(out);
1233 } else {
1234 ::fidl_next::wire::Box::encode_absent(out);
1235 }
1236
1237 Ok(())
1238 }
1239 }
1240
1241 unsafe impl<'a, ___E>
1242 ::fidl_next::EncodeOption<
1243 ::fidl_next::wire::Box<'static, crate::wire::SpiImplUnlockBusRequest>,
1244 ___E,
1245 > for &'a SpiImplUnlockBusRequest
1246 where
1247 ___E: ::fidl_next::Encoder + ?Sized,
1248 &'a SpiImplUnlockBusRequest:
1249 ::fidl_next::Encode<crate::wire::SpiImplUnlockBusRequest, ___E>,
1250 {
1251 #[inline]
1252 fn encode_option(
1253 this: ::core::option::Option<Self>,
1254 encoder: &mut ___E,
1255 out: &mut ::core::mem::MaybeUninit<
1256 ::fidl_next::wire::Box<'static, crate::wire::SpiImplUnlockBusRequest>,
1257 >,
1258 _: (),
1259 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1260 if let Some(inner) = this {
1261 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1262 ::fidl_next::wire::Box::encode_present(out);
1263 } else {
1264 ::fidl_next::wire::Box::encode_absent(out);
1265 }
1266
1267 Ok(())
1268 }
1269 }
1270
1271 impl ::fidl_next::FromWire<crate::wire::SpiImplUnlockBusRequest> for SpiImplUnlockBusRequest {
1272 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1273 crate::wire::SpiImplUnlockBusRequest,
1274 Self,
1275 > = unsafe {
1276 ::fidl_next::CopyOptimization::enable_if(
1277 true
1278 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1279 .is_enabled(),
1280 )
1281 };
1282
1283 #[inline]
1284 fn from_wire(wire: crate::wire::SpiImplUnlockBusRequest) -> Self {
1285 Self { chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select) }
1286 }
1287 }
1288
1289 impl ::fidl_next::FromWireRef<crate::wire::SpiImplUnlockBusRequest> for SpiImplUnlockBusRequest {
1290 #[inline]
1291 fn from_wire_ref(wire: &crate::wire::SpiImplUnlockBusRequest) -> Self {
1292 Self { chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select) }
1293 }
1294 }
1295
1296 pub type SpiImplUnlockBusResponse = ();
1297
1298 pub type SpiImplRegisterVmoResponse = ();
1299
1300 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1301 #[repr(C)]
1302 pub struct SpiImplUnregisterVmoRequest {
1303 pub chip_select: u32,
1304
1305 pub vmo_id: u32,
1306 }
1307
1308 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplUnregisterVmoRequest, ___E>
1309 for SpiImplUnregisterVmoRequest
1310 where
1311 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1312 {
1313 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1314 Self,
1315 crate::wire::SpiImplUnregisterVmoRequest,
1316 > = unsafe {
1317 ::fidl_next::CopyOptimization::enable_if(
1318 true
1319
1320 && <
1321 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
1322 >::COPY_OPTIMIZATION.is_enabled()
1323
1324 && <
1325 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
1326 >::COPY_OPTIMIZATION.is_enabled()
1327
1328 )
1329 };
1330
1331 #[inline]
1332 fn encode(
1333 self,
1334 encoder_: &mut ___E,
1335 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplUnregisterVmoRequest>,
1336 _: (),
1337 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1338 ::fidl_next::munge! {
1339 let crate::wire::SpiImplUnregisterVmoRequest {
1340 chip_select,
1341 vmo_id,
1342
1343 } = out_;
1344 }
1345
1346 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
1347
1348 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1349
1350 ::fidl_next::Encode::encode(self.vmo_id, encoder_, vmo_id, ())?;
1351
1352 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo_id.as_mut_ptr()) };
1353
1354 Ok(())
1355 }
1356 }
1357
1358 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpiImplUnregisterVmoRequest, ___E>
1359 for &'a SpiImplUnregisterVmoRequest
1360 where
1361 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1362 {
1363 #[inline]
1364 fn encode(
1365 self,
1366 encoder_: &mut ___E,
1367 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplUnregisterVmoRequest>,
1368 _: (),
1369 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1370 ::fidl_next::munge! {
1371 let crate::wire::SpiImplUnregisterVmoRequest {
1372 chip_select,
1373 vmo_id,
1374
1375 } = out_;
1376 }
1377
1378 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
1379
1380 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1381
1382 ::fidl_next::Encode::encode(&self.vmo_id, encoder_, vmo_id, ())?;
1383
1384 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo_id.as_mut_ptr()) };
1385
1386 Ok(())
1387 }
1388 }
1389
1390 unsafe impl<___E>
1391 ::fidl_next::EncodeOption<
1392 ::fidl_next::wire::Box<'static, crate::wire::SpiImplUnregisterVmoRequest>,
1393 ___E,
1394 > for SpiImplUnregisterVmoRequest
1395 where
1396 ___E: ::fidl_next::Encoder + ?Sized,
1397 SpiImplUnregisterVmoRequest:
1398 ::fidl_next::Encode<crate::wire::SpiImplUnregisterVmoRequest, ___E>,
1399 {
1400 #[inline]
1401 fn encode_option(
1402 this: ::core::option::Option<Self>,
1403 encoder: &mut ___E,
1404 out: &mut ::core::mem::MaybeUninit<
1405 ::fidl_next::wire::Box<'static, crate::wire::SpiImplUnregisterVmoRequest>,
1406 >,
1407 _: (),
1408 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1409 if let Some(inner) = this {
1410 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1411 ::fidl_next::wire::Box::encode_present(out);
1412 } else {
1413 ::fidl_next::wire::Box::encode_absent(out);
1414 }
1415
1416 Ok(())
1417 }
1418 }
1419
1420 unsafe impl<'a, ___E>
1421 ::fidl_next::EncodeOption<
1422 ::fidl_next::wire::Box<'static, crate::wire::SpiImplUnregisterVmoRequest>,
1423 ___E,
1424 > for &'a SpiImplUnregisterVmoRequest
1425 where
1426 ___E: ::fidl_next::Encoder + ?Sized,
1427 &'a SpiImplUnregisterVmoRequest:
1428 ::fidl_next::Encode<crate::wire::SpiImplUnregisterVmoRequest, ___E>,
1429 {
1430 #[inline]
1431 fn encode_option(
1432 this: ::core::option::Option<Self>,
1433 encoder: &mut ___E,
1434 out: &mut ::core::mem::MaybeUninit<
1435 ::fidl_next::wire::Box<'static, crate::wire::SpiImplUnregisterVmoRequest>,
1436 >,
1437 _: (),
1438 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1439 if let Some(inner) = this {
1440 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1441 ::fidl_next::wire::Box::encode_present(out);
1442 } else {
1443 ::fidl_next::wire::Box::encode_absent(out);
1444 }
1445
1446 Ok(())
1447 }
1448 }
1449
1450 impl ::fidl_next::FromWire<crate::wire::SpiImplUnregisterVmoRequest>
1451 for SpiImplUnregisterVmoRequest
1452 {
1453 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1454 crate::wire::SpiImplUnregisterVmoRequest,
1455 Self,
1456 > = unsafe {
1457 ::fidl_next::CopyOptimization::enable_if(
1458 true
1459 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1460 .is_enabled()
1461 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1462 .is_enabled(),
1463 )
1464 };
1465
1466 #[inline]
1467 fn from_wire(wire: crate::wire::SpiImplUnregisterVmoRequest) -> Self {
1468 Self {
1469 chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select),
1470
1471 vmo_id: ::fidl_next::FromWire::from_wire(wire.vmo_id),
1472 }
1473 }
1474 }
1475
1476 impl ::fidl_next::FromWireRef<crate::wire::SpiImplUnregisterVmoRequest>
1477 for SpiImplUnregisterVmoRequest
1478 {
1479 #[inline]
1480 fn from_wire_ref(wire: &crate::wire::SpiImplUnregisterVmoRequest) -> Self {
1481 Self {
1482 chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select),
1483
1484 vmo_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.vmo_id),
1485 }
1486 }
1487 }
1488
1489 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1490 #[repr(C)]
1491 pub struct SpiImplReleaseRegisteredVmosRequest {
1492 pub chip_select: u32,
1493 }
1494
1495 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplReleaseRegisteredVmosRequest, ___E>
1496 for SpiImplReleaseRegisteredVmosRequest
1497 where
1498 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1499 {
1500 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1501 Self,
1502 crate::wire::SpiImplReleaseRegisteredVmosRequest,
1503 > = unsafe {
1504 ::fidl_next::CopyOptimization::enable_if(
1505 true
1506
1507 && <
1508 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
1509 >::COPY_OPTIMIZATION.is_enabled()
1510
1511 )
1512 };
1513
1514 #[inline]
1515 fn encode(
1516 self,
1517 encoder_: &mut ___E,
1518 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReleaseRegisteredVmosRequest>,
1519 _: (),
1520 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1521 ::fidl_next::munge! {
1522 let crate::wire::SpiImplReleaseRegisteredVmosRequest {
1523 chip_select,
1524
1525 } = out_;
1526 }
1527
1528 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
1529
1530 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1531
1532 Ok(())
1533 }
1534 }
1535
1536 unsafe impl<'a, ___E>
1537 ::fidl_next::Encode<crate::wire::SpiImplReleaseRegisteredVmosRequest, ___E>
1538 for &'a SpiImplReleaseRegisteredVmosRequest
1539 where
1540 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1541 {
1542 #[inline]
1543 fn encode(
1544 self,
1545 encoder_: &mut ___E,
1546 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReleaseRegisteredVmosRequest>,
1547 _: (),
1548 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1549 ::fidl_next::munge! {
1550 let crate::wire::SpiImplReleaseRegisteredVmosRequest {
1551 chip_select,
1552
1553 } = out_;
1554 }
1555
1556 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
1557
1558 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1559
1560 Ok(())
1561 }
1562 }
1563
1564 unsafe impl<___E>
1565 ::fidl_next::EncodeOption<
1566 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReleaseRegisteredVmosRequest>,
1567 ___E,
1568 > for SpiImplReleaseRegisteredVmosRequest
1569 where
1570 ___E: ::fidl_next::Encoder + ?Sized,
1571 SpiImplReleaseRegisteredVmosRequest:
1572 ::fidl_next::Encode<crate::wire::SpiImplReleaseRegisteredVmosRequest, ___E>,
1573 {
1574 #[inline]
1575 fn encode_option(
1576 this: ::core::option::Option<Self>,
1577 encoder: &mut ___E,
1578 out: &mut ::core::mem::MaybeUninit<
1579 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReleaseRegisteredVmosRequest>,
1580 >,
1581 _: (),
1582 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1583 if let Some(inner) = this {
1584 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1585 ::fidl_next::wire::Box::encode_present(out);
1586 } else {
1587 ::fidl_next::wire::Box::encode_absent(out);
1588 }
1589
1590 Ok(())
1591 }
1592 }
1593
1594 unsafe impl<'a, ___E>
1595 ::fidl_next::EncodeOption<
1596 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReleaseRegisteredVmosRequest>,
1597 ___E,
1598 > for &'a SpiImplReleaseRegisteredVmosRequest
1599 where
1600 ___E: ::fidl_next::Encoder + ?Sized,
1601 &'a SpiImplReleaseRegisteredVmosRequest:
1602 ::fidl_next::Encode<crate::wire::SpiImplReleaseRegisteredVmosRequest, ___E>,
1603 {
1604 #[inline]
1605 fn encode_option(
1606 this: ::core::option::Option<Self>,
1607 encoder: &mut ___E,
1608 out: &mut ::core::mem::MaybeUninit<
1609 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReleaseRegisteredVmosRequest>,
1610 >,
1611 _: (),
1612 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1613 if let Some(inner) = this {
1614 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1615 ::fidl_next::wire::Box::encode_present(out);
1616 } else {
1617 ::fidl_next::wire::Box::encode_absent(out);
1618 }
1619
1620 Ok(())
1621 }
1622 }
1623
1624 impl ::fidl_next::FromWire<crate::wire::SpiImplReleaseRegisteredVmosRequest>
1625 for SpiImplReleaseRegisteredVmosRequest
1626 {
1627 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1628 crate::wire::SpiImplReleaseRegisteredVmosRequest,
1629 Self,
1630 > = unsafe {
1631 ::fidl_next::CopyOptimization::enable_if(
1632 true
1633 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1634 .is_enabled(),
1635 )
1636 };
1637
1638 #[inline]
1639 fn from_wire(wire: crate::wire::SpiImplReleaseRegisteredVmosRequest) -> Self {
1640 Self { chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select) }
1641 }
1642 }
1643
1644 impl ::fidl_next::FromWireRef<crate::wire::SpiImplReleaseRegisteredVmosRequest>
1645 for SpiImplReleaseRegisteredVmosRequest
1646 {
1647 #[inline]
1648 fn from_wire_ref(wire: &crate::wire::SpiImplReleaseRegisteredVmosRequest) -> Self {
1649 Self { chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select) }
1650 }
1651 }
1652
1653 #[derive(Debug, Clone, PartialEq)]
1654 pub struct SpiImplTransmitVmoRequest {
1655 pub chip_select: u32,
1656
1657 pub buffer: ::fidl_next_common_fuchsia_hardware_sharedmemory::natural::SharedVmoBuffer,
1658 }
1659
1660 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplTransmitVmoRequest, ___E>
1661 for SpiImplTransmitVmoRequest
1662 where
1663 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1664 {
1665 #[inline]
1666 fn encode(
1667 self,
1668 encoder_: &mut ___E,
1669 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplTransmitVmoRequest>,
1670 _: (),
1671 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1672 ::fidl_next::munge! {
1673 let crate::wire::SpiImplTransmitVmoRequest {
1674 chip_select,
1675 buffer,
1676
1677 } = out_;
1678 }
1679
1680 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
1681
1682 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1683
1684 ::fidl_next::Encode::encode(self.buffer, encoder_, buffer, ())?;
1685
1686 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buffer.as_mut_ptr()) };
1687
1688 Ok(())
1689 }
1690 }
1691
1692 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpiImplTransmitVmoRequest, ___E>
1693 for &'a SpiImplTransmitVmoRequest
1694 where
1695 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1696 {
1697 #[inline]
1698 fn encode(
1699 self,
1700 encoder_: &mut ___E,
1701 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplTransmitVmoRequest>,
1702 _: (),
1703 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1704 ::fidl_next::munge! {
1705 let crate::wire::SpiImplTransmitVmoRequest {
1706 chip_select,
1707 buffer,
1708
1709 } = out_;
1710 }
1711
1712 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
1713
1714 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1715
1716 ::fidl_next::Encode::encode(&self.buffer, encoder_, buffer, ())?;
1717
1718 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buffer.as_mut_ptr()) };
1719
1720 Ok(())
1721 }
1722 }
1723
1724 unsafe impl<___E>
1725 ::fidl_next::EncodeOption<
1726 ::fidl_next::wire::Box<'static, crate::wire::SpiImplTransmitVmoRequest>,
1727 ___E,
1728 > for SpiImplTransmitVmoRequest
1729 where
1730 ___E: ::fidl_next::Encoder + ?Sized,
1731 SpiImplTransmitVmoRequest:
1732 ::fidl_next::Encode<crate::wire::SpiImplTransmitVmoRequest, ___E>,
1733 {
1734 #[inline]
1735 fn encode_option(
1736 this: ::core::option::Option<Self>,
1737 encoder: &mut ___E,
1738 out: &mut ::core::mem::MaybeUninit<
1739 ::fidl_next::wire::Box<'static, crate::wire::SpiImplTransmitVmoRequest>,
1740 >,
1741 _: (),
1742 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1743 if let Some(inner) = this {
1744 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1745 ::fidl_next::wire::Box::encode_present(out);
1746 } else {
1747 ::fidl_next::wire::Box::encode_absent(out);
1748 }
1749
1750 Ok(())
1751 }
1752 }
1753
1754 unsafe impl<'a, ___E>
1755 ::fidl_next::EncodeOption<
1756 ::fidl_next::wire::Box<'static, crate::wire::SpiImplTransmitVmoRequest>,
1757 ___E,
1758 > for &'a SpiImplTransmitVmoRequest
1759 where
1760 ___E: ::fidl_next::Encoder + ?Sized,
1761 &'a SpiImplTransmitVmoRequest:
1762 ::fidl_next::Encode<crate::wire::SpiImplTransmitVmoRequest, ___E>,
1763 {
1764 #[inline]
1765 fn encode_option(
1766 this: ::core::option::Option<Self>,
1767 encoder: &mut ___E,
1768 out: &mut ::core::mem::MaybeUninit<
1769 ::fidl_next::wire::Box<'static, crate::wire::SpiImplTransmitVmoRequest>,
1770 >,
1771 _: (),
1772 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1773 if let Some(inner) = this {
1774 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1775 ::fidl_next::wire::Box::encode_present(out);
1776 } else {
1777 ::fidl_next::wire::Box::encode_absent(out);
1778 }
1779
1780 Ok(())
1781 }
1782 }
1783
1784 impl ::fidl_next::FromWire<crate::wire::SpiImplTransmitVmoRequest> for SpiImplTransmitVmoRequest {
1785 #[inline]
1786 fn from_wire(wire: crate::wire::SpiImplTransmitVmoRequest) -> Self {
1787 Self {
1788 chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select),
1789
1790 buffer: ::fidl_next::FromWire::from_wire(wire.buffer),
1791 }
1792 }
1793 }
1794
1795 impl ::fidl_next::FromWireRef<crate::wire::SpiImplTransmitVmoRequest>
1796 for SpiImplTransmitVmoRequest
1797 {
1798 #[inline]
1799 fn from_wire_ref(wire: &crate::wire::SpiImplTransmitVmoRequest) -> Self {
1800 Self {
1801 chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select),
1802
1803 buffer: ::fidl_next::FromWireRef::from_wire_ref(&wire.buffer),
1804 }
1805 }
1806 }
1807
1808 pub type SpiImplTransmitVmoResponse = ();
1809
1810 #[derive(Debug, Clone, PartialEq)]
1811 pub struct SpiImplReceiveVmoRequest {
1812 pub chip_select: u32,
1813
1814 pub buffer: ::fidl_next_common_fuchsia_hardware_sharedmemory::natural::SharedVmoBuffer,
1815 }
1816
1817 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplReceiveVmoRequest, ___E>
1818 for SpiImplReceiveVmoRequest
1819 where
1820 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1821 {
1822 #[inline]
1823 fn encode(
1824 self,
1825 encoder_: &mut ___E,
1826 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVmoRequest>,
1827 _: (),
1828 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1829 ::fidl_next::munge! {
1830 let crate::wire::SpiImplReceiveVmoRequest {
1831 chip_select,
1832 buffer,
1833
1834 } = out_;
1835 }
1836
1837 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
1838
1839 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1840
1841 ::fidl_next::Encode::encode(self.buffer, encoder_, buffer, ())?;
1842
1843 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buffer.as_mut_ptr()) };
1844
1845 Ok(())
1846 }
1847 }
1848
1849 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpiImplReceiveVmoRequest, ___E>
1850 for &'a SpiImplReceiveVmoRequest
1851 where
1852 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1853 {
1854 #[inline]
1855 fn encode(
1856 self,
1857 encoder_: &mut ___E,
1858 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVmoRequest>,
1859 _: (),
1860 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1861 ::fidl_next::munge! {
1862 let crate::wire::SpiImplReceiveVmoRequest {
1863 chip_select,
1864 buffer,
1865
1866 } = out_;
1867 }
1868
1869 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
1870
1871 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1872
1873 ::fidl_next::Encode::encode(&self.buffer, encoder_, buffer, ())?;
1874
1875 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buffer.as_mut_ptr()) };
1876
1877 Ok(())
1878 }
1879 }
1880
1881 unsafe impl<___E>
1882 ::fidl_next::EncodeOption<
1883 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVmoRequest>,
1884 ___E,
1885 > for SpiImplReceiveVmoRequest
1886 where
1887 ___E: ::fidl_next::Encoder + ?Sized,
1888 SpiImplReceiveVmoRequest: ::fidl_next::Encode<crate::wire::SpiImplReceiveVmoRequest, ___E>,
1889 {
1890 #[inline]
1891 fn encode_option(
1892 this: ::core::option::Option<Self>,
1893 encoder: &mut ___E,
1894 out: &mut ::core::mem::MaybeUninit<
1895 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVmoRequest>,
1896 >,
1897 _: (),
1898 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1899 if let Some(inner) = this {
1900 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1901 ::fidl_next::wire::Box::encode_present(out);
1902 } else {
1903 ::fidl_next::wire::Box::encode_absent(out);
1904 }
1905
1906 Ok(())
1907 }
1908 }
1909
1910 unsafe impl<'a, ___E>
1911 ::fidl_next::EncodeOption<
1912 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVmoRequest>,
1913 ___E,
1914 > for &'a SpiImplReceiveVmoRequest
1915 where
1916 ___E: ::fidl_next::Encoder + ?Sized,
1917 &'a SpiImplReceiveVmoRequest:
1918 ::fidl_next::Encode<crate::wire::SpiImplReceiveVmoRequest, ___E>,
1919 {
1920 #[inline]
1921 fn encode_option(
1922 this: ::core::option::Option<Self>,
1923 encoder: &mut ___E,
1924 out: &mut ::core::mem::MaybeUninit<
1925 ::fidl_next::wire::Box<'static, crate::wire::SpiImplReceiveVmoRequest>,
1926 >,
1927 _: (),
1928 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1929 if let Some(inner) = this {
1930 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1931 ::fidl_next::wire::Box::encode_present(out);
1932 } else {
1933 ::fidl_next::wire::Box::encode_absent(out);
1934 }
1935
1936 Ok(())
1937 }
1938 }
1939
1940 impl ::fidl_next::FromWire<crate::wire::SpiImplReceiveVmoRequest> for SpiImplReceiveVmoRequest {
1941 #[inline]
1942 fn from_wire(wire: crate::wire::SpiImplReceiveVmoRequest) -> Self {
1943 Self {
1944 chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select),
1945
1946 buffer: ::fidl_next::FromWire::from_wire(wire.buffer),
1947 }
1948 }
1949 }
1950
1951 impl ::fidl_next::FromWireRef<crate::wire::SpiImplReceiveVmoRequest> for SpiImplReceiveVmoRequest {
1952 #[inline]
1953 fn from_wire_ref(wire: &crate::wire::SpiImplReceiveVmoRequest) -> Self {
1954 Self {
1955 chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select),
1956
1957 buffer: ::fidl_next::FromWireRef::from_wire_ref(&wire.buffer),
1958 }
1959 }
1960 }
1961
1962 pub type SpiImplReceiveVmoResponse = ();
1963
1964 #[derive(Debug, Clone, PartialEq)]
1965 pub struct SpiImplExchangeVmoRequest {
1966 pub chip_select: u32,
1967
1968 pub tx_buffer: ::fidl_next_common_fuchsia_hardware_sharedmemory::natural::SharedVmoBuffer,
1969
1970 pub rx_buffer: ::fidl_next_common_fuchsia_hardware_sharedmemory::natural::SharedVmoBuffer,
1971 }
1972
1973 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpiImplExchangeVmoRequest, ___E>
1974 for SpiImplExchangeVmoRequest
1975 where
1976 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1977 {
1978 #[inline]
1979 fn encode(
1980 self,
1981 encoder_: &mut ___E,
1982 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplExchangeVmoRequest>,
1983 _: (),
1984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1985 ::fidl_next::munge! {
1986 let crate::wire::SpiImplExchangeVmoRequest {
1987 chip_select,
1988 tx_buffer,
1989 rx_buffer,
1990
1991 } = out_;
1992 }
1993
1994 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
1995
1996 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
1997
1998 ::fidl_next::Encode::encode(self.tx_buffer, encoder_, tx_buffer, ())?;
1999
2000 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tx_buffer.as_mut_ptr()) };
2001
2002 ::fidl_next::Encode::encode(self.rx_buffer, encoder_, rx_buffer, ())?;
2003
2004 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rx_buffer.as_mut_ptr()) };
2005
2006 Ok(())
2007 }
2008 }
2009
2010 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpiImplExchangeVmoRequest, ___E>
2011 for &'a SpiImplExchangeVmoRequest
2012 where
2013 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2014 {
2015 #[inline]
2016 fn encode(
2017 self,
2018 encoder_: &mut ___E,
2019 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplExchangeVmoRequest>,
2020 _: (),
2021 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2022 ::fidl_next::munge! {
2023 let crate::wire::SpiImplExchangeVmoRequest {
2024 chip_select,
2025 tx_buffer,
2026 rx_buffer,
2027
2028 } = out_;
2029 }
2030
2031 ::fidl_next::Encode::encode(&self.chip_select, encoder_, chip_select, ())?;
2032
2033 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(chip_select.as_mut_ptr()) };
2034
2035 ::fidl_next::Encode::encode(&self.tx_buffer, encoder_, tx_buffer, ())?;
2036
2037 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tx_buffer.as_mut_ptr()) };
2038
2039 ::fidl_next::Encode::encode(&self.rx_buffer, encoder_, rx_buffer, ())?;
2040
2041 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rx_buffer.as_mut_ptr()) };
2042
2043 Ok(())
2044 }
2045 }
2046
2047 unsafe impl<___E>
2048 ::fidl_next::EncodeOption<
2049 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVmoRequest>,
2050 ___E,
2051 > for SpiImplExchangeVmoRequest
2052 where
2053 ___E: ::fidl_next::Encoder + ?Sized,
2054 SpiImplExchangeVmoRequest:
2055 ::fidl_next::Encode<crate::wire::SpiImplExchangeVmoRequest, ___E>,
2056 {
2057 #[inline]
2058 fn encode_option(
2059 this: ::core::option::Option<Self>,
2060 encoder: &mut ___E,
2061 out: &mut ::core::mem::MaybeUninit<
2062 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVmoRequest>,
2063 >,
2064 _: (),
2065 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2066 if let Some(inner) = this {
2067 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2068 ::fidl_next::wire::Box::encode_present(out);
2069 } else {
2070 ::fidl_next::wire::Box::encode_absent(out);
2071 }
2072
2073 Ok(())
2074 }
2075 }
2076
2077 unsafe impl<'a, ___E>
2078 ::fidl_next::EncodeOption<
2079 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVmoRequest>,
2080 ___E,
2081 > for &'a SpiImplExchangeVmoRequest
2082 where
2083 ___E: ::fidl_next::Encoder + ?Sized,
2084 &'a SpiImplExchangeVmoRequest:
2085 ::fidl_next::Encode<crate::wire::SpiImplExchangeVmoRequest, ___E>,
2086 {
2087 #[inline]
2088 fn encode_option(
2089 this: ::core::option::Option<Self>,
2090 encoder: &mut ___E,
2091 out: &mut ::core::mem::MaybeUninit<
2092 ::fidl_next::wire::Box<'static, crate::wire::SpiImplExchangeVmoRequest>,
2093 >,
2094 _: (),
2095 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2096 if let Some(inner) = this {
2097 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2098 ::fidl_next::wire::Box::encode_present(out);
2099 } else {
2100 ::fidl_next::wire::Box::encode_absent(out);
2101 }
2102
2103 Ok(())
2104 }
2105 }
2106
2107 impl ::fidl_next::FromWire<crate::wire::SpiImplExchangeVmoRequest> for SpiImplExchangeVmoRequest {
2108 #[inline]
2109 fn from_wire(wire: crate::wire::SpiImplExchangeVmoRequest) -> Self {
2110 Self {
2111 chip_select: ::fidl_next::FromWire::from_wire(wire.chip_select),
2112
2113 tx_buffer: ::fidl_next::FromWire::from_wire(wire.tx_buffer),
2114
2115 rx_buffer: ::fidl_next::FromWire::from_wire(wire.rx_buffer),
2116 }
2117 }
2118 }
2119
2120 impl ::fidl_next::FromWireRef<crate::wire::SpiImplExchangeVmoRequest>
2121 for SpiImplExchangeVmoRequest
2122 {
2123 #[inline]
2124 fn from_wire_ref(wire: &crate::wire::SpiImplExchangeVmoRequest) -> Self {
2125 Self {
2126 chip_select: ::fidl_next::FromWireRef::from_wire_ref(&wire.chip_select),
2127
2128 tx_buffer: ::fidl_next::FromWireRef::from_wire_ref(&wire.tx_buffer),
2129
2130 rx_buffer: ::fidl_next::FromWireRef::from_wire_ref(&wire.rx_buffer),
2131 }
2132 }
2133 }
2134
2135 pub type SpiImplExchangeVmoResponse = ();
2136}
2137
2138pub mod wire {
2139
2140 #[derive(Clone, Debug)]
2142 #[repr(C)]
2143 pub struct SpiImplGetChipSelectCountResponse {
2144 pub count: ::fidl_next::wire::Uint32,
2145 }
2146
2147 static_assertions::const_assert_eq!(
2148 std::mem::size_of::<SpiImplGetChipSelectCountResponse>(),
2149 4
2150 );
2151 static_assertions::const_assert_eq!(
2152 std::mem::align_of::<SpiImplGetChipSelectCountResponse>(),
2153 4
2154 );
2155
2156 static_assertions::const_assert_eq!(
2157 std::mem::offset_of!(SpiImplGetChipSelectCountResponse, count),
2158 0
2159 );
2160
2161 impl ::fidl_next::Constrained for SpiImplGetChipSelectCountResponse {
2162 type Constraint = ();
2163
2164 fn validate(
2165 _: ::fidl_next::Slot<'_, Self>,
2166 _: Self::Constraint,
2167 ) -> Result<(), ::fidl_next::ValidationError> {
2168 Ok(())
2169 }
2170 }
2171
2172 unsafe impl ::fidl_next::Wire for SpiImplGetChipSelectCountResponse {
2173 type Narrowed<'de> = SpiImplGetChipSelectCountResponse;
2174
2175 #[inline]
2176 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2177 ::fidl_next::munge! {
2178 let Self {
2179 count,
2180
2181 } = &mut *out_;
2182 }
2183
2184 ::fidl_next::Wire::zero_padding(count);
2185 }
2186 }
2187
2188 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplGetChipSelectCountResponse
2189 where
2190 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2191 {
2192 fn decode(
2193 slot_: ::fidl_next::Slot<'_, Self>,
2194 decoder_: &mut ___D,
2195 _: (),
2196 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2197 ::fidl_next::munge! {
2198 let Self {
2199 mut count,
2200
2201 } = slot_;
2202 }
2203
2204 let _field = count.as_mut();
2205
2206 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
2207
2208 Ok(())
2209 }
2210 }
2211
2212 impl ::fidl_next::IntoNatural for SpiImplGetChipSelectCountResponse {
2213 type Natural = crate::natural::SpiImplGetChipSelectCountResponse;
2214 }
2215
2216 #[derive(Debug)]
2218 #[repr(C)]
2219 pub struct SpiImplTransmitVectorRequest<'de> {
2220 pub chip_select: ::fidl_next::wire::Uint32,
2221
2222 pub data: ::fidl_next::wire::Vector<'de, u8>,
2223 }
2224
2225 static_assertions::const_assert_eq!(
2226 std::mem::size_of::<SpiImplTransmitVectorRequest<'_>>(),
2227 24
2228 );
2229 static_assertions::const_assert_eq!(
2230 std::mem::align_of::<SpiImplTransmitVectorRequest<'_>>(),
2231 8
2232 );
2233
2234 static_assertions::const_assert_eq!(
2235 std::mem::offset_of!(SpiImplTransmitVectorRequest<'_>, chip_select),
2236 0
2237 );
2238
2239 static_assertions::const_assert_eq!(
2240 std::mem::offset_of!(SpiImplTransmitVectorRequest<'_>, data),
2241 8
2242 );
2243
2244 impl ::fidl_next::Constrained for SpiImplTransmitVectorRequest<'_> {
2245 type Constraint = ();
2246
2247 fn validate(
2248 _: ::fidl_next::Slot<'_, Self>,
2249 _: Self::Constraint,
2250 ) -> Result<(), ::fidl_next::ValidationError> {
2251 Ok(())
2252 }
2253 }
2254
2255 unsafe impl ::fidl_next::Wire for SpiImplTransmitVectorRequest<'static> {
2256 type Narrowed<'de> = SpiImplTransmitVectorRequest<'de>;
2257
2258 #[inline]
2259 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2260 ::fidl_next::munge! {
2261 let Self {
2262 chip_select,
2263 data,
2264
2265 } = &mut *out_;
2266 }
2267
2268 ::fidl_next::Wire::zero_padding(chip_select);
2269
2270 ::fidl_next::Wire::zero_padding(data);
2271
2272 unsafe {
2273 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2274 }
2275 }
2276 }
2277
2278 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SpiImplTransmitVectorRequest<'de>
2279 where
2280 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2281 ___D: ::fidl_next::Decoder<'de>,
2282 {
2283 fn decode(
2284 slot_: ::fidl_next::Slot<'_, Self>,
2285 decoder_: &mut ___D,
2286 _: (),
2287 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2288 if slot_.as_bytes()[4..8] != [0u8; 4] {
2289 return Err(::fidl_next::DecodeError::InvalidPadding);
2290 }
2291
2292 ::fidl_next::munge! {
2293 let Self {
2294 mut chip_select,
2295 mut data,
2296
2297 } = slot_;
2298 }
2299
2300 let _field = chip_select.as_mut();
2301
2302 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
2303
2304 let _field = data.as_mut();
2305 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2306 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (4294967295, ()))?;
2307
2308 Ok(())
2309 }
2310 }
2311
2312 impl<'de> ::fidl_next::IntoNatural for SpiImplTransmitVectorRequest<'de> {
2313 type Natural = crate::natural::SpiImplTransmitVectorRequest;
2314 }
2315
2316 pub type SpiImplTransmitVectorResponse = ::fidl_next::wire::Unit;
2318
2319 #[derive(Clone, Debug)]
2321 #[repr(C)]
2322 pub struct SpiImplReceiveVectorRequest {
2323 pub chip_select: ::fidl_next::wire::Uint32,
2324
2325 pub size: ::fidl_next::wire::Uint32,
2326 }
2327
2328 static_assertions::const_assert_eq!(std::mem::size_of::<SpiImplReceiveVectorRequest>(), 8);
2329 static_assertions::const_assert_eq!(std::mem::align_of::<SpiImplReceiveVectorRequest>(), 4);
2330
2331 static_assertions::const_assert_eq!(
2332 std::mem::offset_of!(SpiImplReceiveVectorRequest, chip_select),
2333 0
2334 );
2335
2336 static_assertions::const_assert_eq!(std::mem::offset_of!(SpiImplReceiveVectorRequest, size), 4);
2337
2338 impl ::fidl_next::Constrained for SpiImplReceiveVectorRequest {
2339 type Constraint = ();
2340
2341 fn validate(
2342 _: ::fidl_next::Slot<'_, Self>,
2343 _: Self::Constraint,
2344 ) -> Result<(), ::fidl_next::ValidationError> {
2345 Ok(())
2346 }
2347 }
2348
2349 unsafe impl ::fidl_next::Wire for SpiImplReceiveVectorRequest {
2350 type Narrowed<'de> = SpiImplReceiveVectorRequest;
2351
2352 #[inline]
2353 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2354 ::fidl_next::munge! {
2355 let Self {
2356 chip_select,
2357 size,
2358
2359 } = &mut *out_;
2360 }
2361
2362 ::fidl_next::Wire::zero_padding(chip_select);
2363
2364 ::fidl_next::Wire::zero_padding(size);
2365 }
2366 }
2367
2368 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplReceiveVectorRequest
2369 where
2370 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2371 {
2372 fn decode(
2373 slot_: ::fidl_next::Slot<'_, Self>,
2374 decoder_: &mut ___D,
2375 _: (),
2376 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2377 ::fidl_next::munge! {
2378 let Self {
2379 mut chip_select,
2380 mut size,
2381
2382 } = slot_;
2383 }
2384
2385 let _field = chip_select.as_mut();
2386
2387 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
2388
2389 let _field = size.as_mut();
2390
2391 ::fidl_next::Decode::decode(size.as_mut(), decoder_, ())?;
2392
2393 Ok(())
2394 }
2395 }
2396
2397 impl ::fidl_next::IntoNatural for SpiImplReceiveVectorRequest {
2398 type Natural = crate::natural::SpiImplReceiveVectorRequest;
2399 }
2400
2401 #[derive(Debug)]
2403 #[repr(C)]
2404 pub struct SpiImplReceiveVectorResponse<'de> {
2405 pub data: ::fidl_next::wire::Vector<'de, u8>,
2406 }
2407
2408 static_assertions::const_assert_eq!(
2409 std::mem::size_of::<SpiImplReceiveVectorResponse<'_>>(),
2410 16
2411 );
2412 static_assertions::const_assert_eq!(
2413 std::mem::align_of::<SpiImplReceiveVectorResponse<'_>>(),
2414 8
2415 );
2416
2417 static_assertions::const_assert_eq!(
2418 std::mem::offset_of!(SpiImplReceiveVectorResponse<'_>, data),
2419 0
2420 );
2421
2422 impl ::fidl_next::Constrained for SpiImplReceiveVectorResponse<'_> {
2423 type Constraint = ();
2424
2425 fn validate(
2426 _: ::fidl_next::Slot<'_, Self>,
2427 _: Self::Constraint,
2428 ) -> Result<(), ::fidl_next::ValidationError> {
2429 Ok(())
2430 }
2431 }
2432
2433 unsafe impl ::fidl_next::Wire for SpiImplReceiveVectorResponse<'static> {
2434 type Narrowed<'de> = SpiImplReceiveVectorResponse<'de>;
2435
2436 #[inline]
2437 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2438 ::fidl_next::munge! {
2439 let Self {
2440 data,
2441
2442 } = &mut *out_;
2443 }
2444
2445 ::fidl_next::Wire::zero_padding(data);
2446 }
2447 }
2448
2449 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SpiImplReceiveVectorResponse<'de>
2450 where
2451 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2452 ___D: ::fidl_next::Decoder<'de>,
2453 {
2454 fn decode(
2455 slot_: ::fidl_next::Slot<'_, Self>,
2456 decoder_: &mut ___D,
2457 _: (),
2458 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2459 ::fidl_next::munge! {
2460 let Self {
2461 mut data,
2462
2463 } = slot_;
2464 }
2465
2466 let _field = data.as_mut();
2467 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2468 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (4294967295, ()))?;
2469
2470 Ok(())
2471 }
2472 }
2473
2474 impl<'de> ::fidl_next::IntoNatural for SpiImplReceiveVectorResponse<'de> {
2475 type Natural = crate::natural::SpiImplReceiveVectorResponse;
2476 }
2477
2478 #[derive(Debug)]
2480 #[repr(C)]
2481 pub struct SpiImplExchangeVectorRequest<'de> {
2482 pub chip_select: ::fidl_next::wire::Uint32,
2483
2484 pub txdata: ::fidl_next::wire::Vector<'de, u8>,
2485 }
2486
2487 static_assertions::const_assert_eq!(
2488 std::mem::size_of::<SpiImplExchangeVectorRequest<'_>>(),
2489 24
2490 );
2491 static_assertions::const_assert_eq!(
2492 std::mem::align_of::<SpiImplExchangeVectorRequest<'_>>(),
2493 8
2494 );
2495
2496 static_assertions::const_assert_eq!(
2497 std::mem::offset_of!(SpiImplExchangeVectorRequest<'_>, chip_select),
2498 0
2499 );
2500
2501 static_assertions::const_assert_eq!(
2502 std::mem::offset_of!(SpiImplExchangeVectorRequest<'_>, txdata),
2503 8
2504 );
2505
2506 impl ::fidl_next::Constrained for SpiImplExchangeVectorRequest<'_> {
2507 type Constraint = ();
2508
2509 fn validate(
2510 _: ::fidl_next::Slot<'_, Self>,
2511 _: Self::Constraint,
2512 ) -> Result<(), ::fidl_next::ValidationError> {
2513 Ok(())
2514 }
2515 }
2516
2517 unsafe impl ::fidl_next::Wire for SpiImplExchangeVectorRequest<'static> {
2518 type Narrowed<'de> = SpiImplExchangeVectorRequest<'de>;
2519
2520 #[inline]
2521 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2522 ::fidl_next::munge! {
2523 let Self {
2524 chip_select,
2525 txdata,
2526
2527 } = &mut *out_;
2528 }
2529
2530 ::fidl_next::Wire::zero_padding(chip_select);
2531
2532 ::fidl_next::Wire::zero_padding(txdata);
2533
2534 unsafe {
2535 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2536 }
2537 }
2538 }
2539
2540 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SpiImplExchangeVectorRequest<'de>
2541 where
2542 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2543 ___D: ::fidl_next::Decoder<'de>,
2544 {
2545 fn decode(
2546 slot_: ::fidl_next::Slot<'_, Self>,
2547 decoder_: &mut ___D,
2548 _: (),
2549 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2550 if slot_.as_bytes()[4..8] != [0u8; 4] {
2551 return Err(::fidl_next::DecodeError::InvalidPadding);
2552 }
2553
2554 ::fidl_next::munge! {
2555 let Self {
2556 mut chip_select,
2557 mut txdata,
2558
2559 } = slot_;
2560 }
2561
2562 let _field = chip_select.as_mut();
2563
2564 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
2565
2566 let _field = txdata.as_mut();
2567 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2568 ::fidl_next::Decode::decode(txdata.as_mut(), decoder_, (4294967295, ()))?;
2569
2570 Ok(())
2571 }
2572 }
2573
2574 impl<'de> ::fidl_next::IntoNatural for SpiImplExchangeVectorRequest<'de> {
2575 type Natural = crate::natural::SpiImplExchangeVectorRequest;
2576 }
2577
2578 #[derive(Debug)]
2580 #[repr(C)]
2581 pub struct SpiImplExchangeVectorResponse<'de> {
2582 pub rxdata: ::fidl_next::wire::Vector<'de, u8>,
2583 }
2584
2585 static_assertions::const_assert_eq!(
2586 std::mem::size_of::<SpiImplExchangeVectorResponse<'_>>(),
2587 16
2588 );
2589 static_assertions::const_assert_eq!(
2590 std::mem::align_of::<SpiImplExchangeVectorResponse<'_>>(),
2591 8
2592 );
2593
2594 static_assertions::const_assert_eq!(
2595 std::mem::offset_of!(SpiImplExchangeVectorResponse<'_>, rxdata),
2596 0
2597 );
2598
2599 impl ::fidl_next::Constrained for SpiImplExchangeVectorResponse<'_> {
2600 type Constraint = ();
2601
2602 fn validate(
2603 _: ::fidl_next::Slot<'_, Self>,
2604 _: Self::Constraint,
2605 ) -> Result<(), ::fidl_next::ValidationError> {
2606 Ok(())
2607 }
2608 }
2609
2610 unsafe impl ::fidl_next::Wire for SpiImplExchangeVectorResponse<'static> {
2611 type Narrowed<'de> = SpiImplExchangeVectorResponse<'de>;
2612
2613 #[inline]
2614 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2615 ::fidl_next::munge! {
2616 let Self {
2617 rxdata,
2618
2619 } = &mut *out_;
2620 }
2621
2622 ::fidl_next::Wire::zero_padding(rxdata);
2623 }
2624 }
2625
2626 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SpiImplExchangeVectorResponse<'de>
2627 where
2628 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2629 ___D: ::fidl_next::Decoder<'de>,
2630 {
2631 fn decode(
2632 slot_: ::fidl_next::Slot<'_, Self>,
2633 decoder_: &mut ___D,
2634 _: (),
2635 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2636 ::fidl_next::munge! {
2637 let Self {
2638 mut rxdata,
2639
2640 } = slot_;
2641 }
2642
2643 let _field = rxdata.as_mut();
2644 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2645 ::fidl_next::Decode::decode(rxdata.as_mut(), decoder_, (4294967295, ()))?;
2646
2647 Ok(())
2648 }
2649 }
2650
2651 impl<'de> ::fidl_next::IntoNatural for SpiImplExchangeVectorResponse<'de> {
2652 type Natural = crate::natural::SpiImplExchangeVectorResponse;
2653 }
2654
2655 #[derive(Clone, Debug)]
2657 #[repr(C)]
2658 pub struct SpiImplLockBusRequest {
2659 pub chip_select: ::fidl_next::wire::Uint32,
2660 }
2661
2662 static_assertions::const_assert_eq!(std::mem::size_of::<SpiImplLockBusRequest>(), 4);
2663 static_assertions::const_assert_eq!(std::mem::align_of::<SpiImplLockBusRequest>(), 4);
2664
2665 static_assertions::const_assert_eq!(
2666 std::mem::offset_of!(SpiImplLockBusRequest, chip_select),
2667 0
2668 );
2669
2670 impl ::fidl_next::Constrained for SpiImplLockBusRequest {
2671 type Constraint = ();
2672
2673 fn validate(
2674 _: ::fidl_next::Slot<'_, Self>,
2675 _: Self::Constraint,
2676 ) -> Result<(), ::fidl_next::ValidationError> {
2677 Ok(())
2678 }
2679 }
2680
2681 unsafe impl ::fidl_next::Wire for SpiImplLockBusRequest {
2682 type Narrowed<'de> = SpiImplLockBusRequest;
2683
2684 #[inline]
2685 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2686 ::fidl_next::munge! {
2687 let Self {
2688 chip_select,
2689
2690 } = &mut *out_;
2691 }
2692
2693 ::fidl_next::Wire::zero_padding(chip_select);
2694 }
2695 }
2696
2697 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplLockBusRequest
2698 where
2699 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2700 {
2701 fn decode(
2702 slot_: ::fidl_next::Slot<'_, Self>,
2703 decoder_: &mut ___D,
2704 _: (),
2705 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2706 ::fidl_next::munge! {
2707 let Self {
2708 mut chip_select,
2709
2710 } = slot_;
2711 }
2712
2713 let _field = chip_select.as_mut();
2714
2715 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
2716
2717 Ok(())
2718 }
2719 }
2720
2721 impl ::fidl_next::IntoNatural for SpiImplLockBusRequest {
2722 type Natural = crate::natural::SpiImplLockBusRequest;
2723 }
2724
2725 pub type SpiImplLockBusResponse = ::fidl_next::wire::Unit;
2727
2728 #[derive(Clone, Debug)]
2730 #[repr(C)]
2731 pub struct SpiImplUnlockBusRequest {
2732 pub chip_select: ::fidl_next::wire::Uint32,
2733 }
2734
2735 static_assertions::const_assert_eq!(std::mem::size_of::<SpiImplUnlockBusRequest>(), 4);
2736 static_assertions::const_assert_eq!(std::mem::align_of::<SpiImplUnlockBusRequest>(), 4);
2737
2738 static_assertions::const_assert_eq!(
2739 std::mem::offset_of!(SpiImplUnlockBusRequest, chip_select),
2740 0
2741 );
2742
2743 impl ::fidl_next::Constrained for SpiImplUnlockBusRequest {
2744 type Constraint = ();
2745
2746 fn validate(
2747 _: ::fidl_next::Slot<'_, Self>,
2748 _: Self::Constraint,
2749 ) -> Result<(), ::fidl_next::ValidationError> {
2750 Ok(())
2751 }
2752 }
2753
2754 unsafe impl ::fidl_next::Wire for SpiImplUnlockBusRequest {
2755 type Narrowed<'de> = SpiImplUnlockBusRequest;
2756
2757 #[inline]
2758 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2759 ::fidl_next::munge! {
2760 let Self {
2761 chip_select,
2762
2763 } = &mut *out_;
2764 }
2765
2766 ::fidl_next::Wire::zero_padding(chip_select);
2767 }
2768 }
2769
2770 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplUnlockBusRequest
2771 where
2772 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2773 {
2774 fn decode(
2775 slot_: ::fidl_next::Slot<'_, Self>,
2776 decoder_: &mut ___D,
2777 _: (),
2778 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2779 ::fidl_next::munge! {
2780 let Self {
2781 mut chip_select,
2782
2783 } = slot_;
2784 }
2785
2786 let _field = chip_select.as_mut();
2787
2788 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
2789
2790 Ok(())
2791 }
2792 }
2793
2794 impl ::fidl_next::IntoNatural for SpiImplUnlockBusRequest {
2795 type Natural = crate::natural::SpiImplUnlockBusRequest;
2796 }
2797
2798 pub type SpiImplUnlockBusResponse = ::fidl_next::wire::Unit;
2800
2801 pub type SpiImplRegisterVmoResponse = ::fidl_next::wire::Unit;
2803
2804 #[derive(Clone, Debug)]
2806 #[repr(C)]
2807 pub struct SpiImplUnregisterVmoRequest {
2808 pub chip_select: ::fidl_next::wire::Uint32,
2809
2810 pub vmo_id: ::fidl_next::wire::Uint32,
2811 }
2812
2813 static_assertions::const_assert_eq!(std::mem::size_of::<SpiImplUnregisterVmoRequest>(), 8);
2814 static_assertions::const_assert_eq!(std::mem::align_of::<SpiImplUnregisterVmoRequest>(), 4);
2815
2816 static_assertions::const_assert_eq!(
2817 std::mem::offset_of!(SpiImplUnregisterVmoRequest, chip_select),
2818 0
2819 );
2820
2821 static_assertions::const_assert_eq!(
2822 std::mem::offset_of!(SpiImplUnregisterVmoRequest, vmo_id),
2823 4
2824 );
2825
2826 impl ::fidl_next::Constrained for SpiImplUnregisterVmoRequest {
2827 type Constraint = ();
2828
2829 fn validate(
2830 _: ::fidl_next::Slot<'_, Self>,
2831 _: Self::Constraint,
2832 ) -> Result<(), ::fidl_next::ValidationError> {
2833 Ok(())
2834 }
2835 }
2836
2837 unsafe impl ::fidl_next::Wire for SpiImplUnregisterVmoRequest {
2838 type Narrowed<'de> = SpiImplUnregisterVmoRequest;
2839
2840 #[inline]
2841 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2842 ::fidl_next::munge! {
2843 let Self {
2844 chip_select,
2845 vmo_id,
2846
2847 } = &mut *out_;
2848 }
2849
2850 ::fidl_next::Wire::zero_padding(chip_select);
2851
2852 ::fidl_next::Wire::zero_padding(vmo_id);
2853 }
2854 }
2855
2856 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplUnregisterVmoRequest
2857 where
2858 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2859 {
2860 fn decode(
2861 slot_: ::fidl_next::Slot<'_, Self>,
2862 decoder_: &mut ___D,
2863 _: (),
2864 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2865 ::fidl_next::munge! {
2866 let Self {
2867 mut chip_select,
2868 mut vmo_id,
2869
2870 } = slot_;
2871 }
2872
2873 let _field = chip_select.as_mut();
2874
2875 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
2876
2877 let _field = vmo_id.as_mut();
2878
2879 ::fidl_next::Decode::decode(vmo_id.as_mut(), decoder_, ())?;
2880
2881 Ok(())
2882 }
2883 }
2884
2885 impl ::fidl_next::IntoNatural for SpiImplUnregisterVmoRequest {
2886 type Natural = crate::natural::SpiImplUnregisterVmoRequest;
2887 }
2888
2889 #[derive(Clone, Debug)]
2891 #[repr(C)]
2892 pub struct SpiImplReleaseRegisteredVmosRequest {
2893 pub chip_select: ::fidl_next::wire::Uint32,
2894 }
2895
2896 static_assertions::const_assert_eq!(
2897 std::mem::size_of::<SpiImplReleaseRegisteredVmosRequest>(),
2898 4
2899 );
2900 static_assertions::const_assert_eq!(
2901 std::mem::align_of::<SpiImplReleaseRegisteredVmosRequest>(),
2902 4
2903 );
2904
2905 static_assertions::const_assert_eq!(
2906 std::mem::offset_of!(SpiImplReleaseRegisteredVmosRequest, chip_select),
2907 0
2908 );
2909
2910 impl ::fidl_next::Constrained for SpiImplReleaseRegisteredVmosRequest {
2911 type Constraint = ();
2912
2913 fn validate(
2914 _: ::fidl_next::Slot<'_, Self>,
2915 _: Self::Constraint,
2916 ) -> Result<(), ::fidl_next::ValidationError> {
2917 Ok(())
2918 }
2919 }
2920
2921 unsafe impl ::fidl_next::Wire for SpiImplReleaseRegisteredVmosRequest {
2922 type Narrowed<'de> = SpiImplReleaseRegisteredVmosRequest;
2923
2924 #[inline]
2925 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2926 ::fidl_next::munge! {
2927 let Self {
2928 chip_select,
2929
2930 } = &mut *out_;
2931 }
2932
2933 ::fidl_next::Wire::zero_padding(chip_select);
2934 }
2935 }
2936
2937 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplReleaseRegisteredVmosRequest
2938 where
2939 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2940 {
2941 fn decode(
2942 slot_: ::fidl_next::Slot<'_, Self>,
2943 decoder_: &mut ___D,
2944 _: (),
2945 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2946 ::fidl_next::munge! {
2947 let Self {
2948 mut chip_select,
2949
2950 } = slot_;
2951 }
2952
2953 let _field = chip_select.as_mut();
2954
2955 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
2956
2957 Ok(())
2958 }
2959 }
2960
2961 impl ::fidl_next::IntoNatural for SpiImplReleaseRegisteredVmosRequest {
2962 type Natural = crate::natural::SpiImplReleaseRegisteredVmosRequest;
2963 }
2964
2965 #[derive(Clone, Debug)]
2967 #[repr(C)]
2968 pub struct SpiImplTransmitVmoRequest {
2969 pub chip_select: ::fidl_next::wire::Uint32,
2970
2971 pub buffer: ::fidl_next_common_fuchsia_hardware_sharedmemory::wire::SharedVmoBuffer,
2972 }
2973
2974 static_assertions::const_assert_eq!(std::mem::size_of::<SpiImplTransmitVmoRequest>(), 32);
2975 static_assertions::const_assert_eq!(std::mem::align_of::<SpiImplTransmitVmoRequest>(), 8);
2976
2977 static_assertions::const_assert_eq!(
2978 std::mem::offset_of!(SpiImplTransmitVmoRequest, chip_select),
2979 0
2980 );
2981
2982 static_assertions::const_assert_eq!(std::mem::offset_of!(SpiImplTransmitVmoRequest, buffer), 8);
2983
2984 impl ::fidl_next::Constrained for SpiImplTransmitVmoRequest {
2985 type Constraint = ();
2986
2987 fn validate(
2988 _: ::fidl_next::Slot<'_, Self>,
2989 _: Self::Constraint,
2990 ) -> Result<(), ::fidl_next::ValidationError> {
2991 Ok(())
2992 }
2993 }
2994
2995 unsafe impl ::fidl_next::Wire for SpiImplTransmitVmoRequest {
2996 type Narrowed<'de> = SpiImplTransmitVmoRequest;
2997
2998 #[inline]
2999 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3000 ::fidl_next::munge! {
3001 let Self {
3002 chip_select,
3003 buffer,
3004
3005 } = &mut *out_;
3006 }
3007
3008 ::fidl_next::Wire::zero_padding(chip_select);
3009
3010 ::fidl_next::Wire::zero_padding(buffer);
3011
3012 unsafe {
3013 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
3014 }
3015 }
3016 }
3017
3018 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplTransmitVmoRequest
3019 where
3020 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3021 {
3022 fn decode(
3023 slot_: ::fidl_next::Slot<'_, Self>,
3024 decoder_: &mut ___D,
3025 _: (),
3026 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3027 if slot_.as_bytes()[4..8] != [0u8; 4] {
3028 return Err(::fidl_next::DecodeError::InvalidPadding);
3029 }
3030
3031 ::fidl_next::munge! {
3032 let Self {
3033 mut chip_select,
3034 mut buffer,
3035
3036 } = slot_;
3037 }
3038
3039 let _field = chip_select.as_mut();
3040
3041 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
3042
3043 let _field = buffer.as_mut();
3044
3045 ::fidl_next::Decode::decode(buffer.as_mut(), decoder_, ())?;
3046
3047 Ok(())
3048 }
3049 }
3050
3051 impl ::fidl_next::IntoNatural for SpiImplTransmitVmoRequest {
3052 type Natural = crate::natural::SpiImplTransmitVmoRequest;
3053 }
3054
3055 pub type SpiImplTransmitVmoResponse = ::fidl_next::wire::Unit;
3057
3058 #[derive(Clone, Debug)]
3060 #[repr(C)]
3061 pub struct SpiImplReceiveVmoRequest {
3062 pub chip_select: ::fidl_next::wire::Uint32,
3063
3064 pub buffer: ::fidl_next_common_fuchsia_hardware_sharedmemory::wire::SharedVmoBuffer,
3065 }
3066
3067 static_assertions::const_assert_eq!(std::mem::size_of::<SpiImplReceiveVmoRequest>(), 32);
3068 static_assertions::const_assert_eq!(std::mem::align_of::<SpiImplReceiveVmoRequest>(), 8);
3069
3070 static_assertions::const_assert_eq!(
3071 std::mem::offset_of!(SpiImplReceiveVmoRequest, chip_select),
3072 0
3073 );
3074
3075 static_assertions::const_assert_eq!(std::mem::offset_of!(SpiImplReceiveVmoRequest, buffer), 8);
3076
3077 impl ::fidl_next::Constrained for SpiImplReceiveVmoRequest {
3078 type Constraint = ();
3079
3080 fn validate(
3081 _: ::fidl_next::Slot<'_, Self>,
3082 _: Self::Constraint,
3083 ) -> Result<(), ::fidl_next::ValidationError> {
3084 Ok(())
3085 }
3086 }
3087
3088 unsafe impl ::fidl_next::Wire for SpiImplReceiveVmoRequest {
3089 type Narrowed<'de> = SpiImplReceiveVmoRequest;
3090
3091 #[inline]
3092 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3093 ::fidl_next::munge! {
3094 let Self {
3095 chip_select,
3096 buffer,
3097
3098 } = &mut *out_;
3099 }
3100
3101 ::fidl_next::Wire::zero_padding(chip_select);
3102
3103 ::fidl_next::Wire::zero_padding(buffer);
3104
3105 unsafe {
3106 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
3107 }
3108 }
3109 }
3110
3111 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplReceiveVmoRequest
3112 where
3113 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3114 {
3115 fn decode(
3116 slot_: ::fidl_next::Slot<'_, Self>,
3117 decoder_: &mut ___D,
3118 _: (),
3119 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3120 if slot_.as_bytes()[4..8] != [0u8; 4] {
3121 return Err(::fidl_next::DecodeError::InvalidPadding);
3122 }
3123
3124 ::fidl_next::munge! {
3125 let Self {
3126 mut chip_select,
3127 mut buffer,
3128
3129 } = slot_;
3130 }
3131
3132 let _field = chip_select.as_mut();
3133
3134 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
3135
3136 let _field = buffer.as_mut();
3137
3138 ::fidl_next::Decode::decode(buffer.as_mut(), decoder_, ())?;
3139
3140 Ok(())
3141 }
3142 }
3143
3144 impl ::fidl_next::IntoNatural for SpiImplReceiveVmoRequest {
3145 type Natural = crate::natural::SpiImplReceiveVmoRequest;
3146 }
3147
3148 pub type SpiImplReceiveVmoResponse = ::fidl_next::wire::Unit;
3150
3151 #[derive(Clone, Debug)]
3153 #[repr(C)]
3154 pub struct SpiImplExchangeVmoRequest {
3155 pub chip_select: ::fidl_next::wire::Uint32,
3156
3157 pub tx_buffer: ::fidl_next_common_fuchsia_hardware_sharedmemory::wire::SharedVmoBuffer,
3158
3159 pub rx_buffer: ::fidl_next_common_fuchsia_hardware_sharedmemory::wire::SharedVmoBuffer,
3160 }
3161
3162 static_assertions::const_assert_eq!(std::mem::size_of::<SpiImplExchangeVmoRequest>(), 56);
3163 static_assertions::const_assert_eq!(std::mem::align_of::<SpiImplExchangeVmoRequest>(), 8);
3164
3165 static_assertions::const_assert_eq!(
3166 std::mem::offset_of!(SpiImplExchangeVmoRequest, chip_select),
3167 0
3168 );
3169
3170 static_assertions::const_assert_eq!(
3171 std::mem::offset_of!(SpiImplExchangeVmoRequest, tx_buffer),
3172 8
3173 );
3174
3175 static_assertions::const_assert_eq!(
3176 std::mem::offset_of!(SpiImplExchangeVmoRequest, rx_buffer),
3177 32
3178 );
3179
3180 impl ::fidl_next::Constrained for SpiImplExchangeVmoRequest {
3181 type Constraint = ();
3182
3183 fn validate(
3184 _: ::fidl_next::Slot<'_, Self>,
3185 _: Self::Constraint,
3186 ) -> Result<(), ::fidl_next::ValidationError> {
3187 Ok(())
3188 }
3189 }
3190
3191 unsafe impl ::fidl_next::Wire for SpiImplExchangeVmoRequest {
3192 type Narrowed<'de> = SpiImplExchangeVmoRequest;
3193
3194 #[inline]
3195 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3196 ::fidl_next::munge! {
3197 let Self {
3198 chip_select,
3199 tx_buffer,
3200 rx_buffer,
3201
3202 } = &mut *out_;
3203 }
3204
3205 ::fidl_next::Wire::zero_padding(chip_select);
3206
3207 ::fidl_next::Wire::zero_padding(tx_buffer);
3208
3209 ::fidl_next::Wire::zero_padding(rx_buffer);
3210
3211 unsafe {
3212 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
3213 }
3214 }
3215 }
3216
3217 unsafe impl<___D> ::fidl_next::Decode<___D> for SpiImplExchangeVmoRequest
3218 where
3219 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3220 {
3221 fn decode(
3222 slot_: ::fidl_next::Slot<'_, Self>,
3223 decoder_: &mut ___D,
3224 _: (),
3225 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3226 if slot_.as_bytes()[4..8] != [0u8; 4] {
3227 return Err(::fidl_next::DecodeError::InvalidPadding);
3228 }
3229
3230 ::fidl_next::munge! {
3231 let Self {
3232 mut chip_select,
3233 mut tx_buffer,
3234 mut rx_buffer,
3235
3236 } = slot_;
3237 }
3238
3239 let _field = chip_select.as_mut();
3240
3241 ::fidl_next::Decode::decode(chip_select.as_mut(), decoder_, ())?;
3242
3243 let _field = tx_buffer.as_mut();
3244
3245 ::fidl_next::Decode::decode(tx_buffer.as_mut(), decoder_, ())?;
3246
3247 let _field = rx_buffer.as_mut();
3248
3249 ::fidl_next::Decode::decode(rx_buffer.as_mut(), decoder_, ())?;
3250
3251 Ok(())
3252 }
3253 }
3254
3255 impl ::fidl_next::IntoNatural for SpiImplExchangeVmoRequest {
3256 type Natural = crate::natural::SpiImplExchangeVmoRequest;
3257 }
3258
3259 pub type SpiImplExchangeVmoResponse = ::fidl_next::wire::Unit;
3261}
3262
3263pub mod wire_optional {}
3264
3265pub mod generic {
3266
3267 pub struct SpiImplGetChipSelectCountResponse<T0> {
3269 pub count: T0,
3270 }
3271
3272 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SpiImplGetChipSelectCountResponse, ___E>
3273 for SpiImplGetChipSelectCountResponse<T0>
3274 where
3275 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3276 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3277 {
3278 #[inline]
3279 fn encode(
3280 self,
3281 encoder_: &mut ___E,
3282 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplGetChipSelectCountResponse>,
3283 _: (),
3284 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3285 ::fidl_next::munge! {
3286 let crate::wire::SpiImplGetChipSelectCountResponse {
3287 count,
3288
3289 } = out_;
3290 }
3291
3292 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
3293
3294 Ok(())
3295 }
3296 }
3297
3298 pub struct SpiImplTransmitVectorRequest<T0, T1> {
3300 pub chip_select: T0,
3301
3302 pub data: T1,
3303 }
3304
3305 unsafe impl<___E, T0, T1>
3306 ::fidl_next::Encode<crate::wire::SpiImplTransmitVectorRequest<'static>, ___E>
3307 for SpiImplTransmitVectorRequest<T0, T1>
3308 where
3309 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3310 ___E: ::fidl_next::Encoder,
3311 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3312 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3313 {
3314 #[inline]
3315 fn encode(
3316 self,
3317 encoder_: &mut ___E,
3318 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplTransmitVectorRequest<'static>>,
3319 _: (),
3320 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3321 ::fidl_next::munge! {
3322 let crate::wire::SpiImplTransmitVectorRequest {
3323 chip_select,
3324 data,
3325
3326 } = out_;
3327 }
3328
3329 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3330
3331 ::fidl_next::Encode::encode(self.data, encoder_, data, (4294967295, ()))?;
3332
3333 Ok(())
3334 }
3335 }
3336
3337 pub type SpiImplTransmitVectorResponse = ();
3339
3340 pub struct SpiImplReceiveVectorRequest<T0, T1> {
3342 pub chip_select: T0,
3343
3344 pub size: T1,
3345 }
3346
3347 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorRequest, ___E>
3348 for SpiImplReceiveVectorRequest<T0, T1>
3349 where
3350 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3351 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3352 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3353 {
3354 #[inline]
3355 fn encode(
3356 self,
3357 encoder_: &mut ___E,
3358 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVectorRequest>,
3359 _: (),
3360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3361 ::fidl_next::munge! {
3362 let crate::wire::SpiImplReceiveVectorRequest {
3363 chip_select,
3364 size,
3365
3366 } = out_;
3367 }
3368
3369 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3370
3371 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
3372
3373 Ok(())
3374 }
3375 }
3376
3377 pub struct SpiImplReceiveVectorResponse<T0> {
3379 pub data: T0,
3380 }
3381
3382 unsafe impl<___E, T0>
3383 ::fidl_next::Encode<crate::wire::SpiImplReceiveVectorResponse<'static>, ___E>
3384 for SpiImplReceiveVectorResponse<T0>
3385 where
3386 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3387 ___E: ::fidl_next::Encoder,
3388 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3389 {
3390 #[inline]
3391 fn encode(
3392 self,
3393 encoder_: &mut ___E,
3394 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVectorResponse<'static>>,
3395 _: (),
3396 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3397 ::fidl_next::munge! {
3398 let crate::wire::SpiImplReceiveVectorResponse {
3399 data,
3400
3401 } = out_;
3402 }
3403
3404 ::fidl_next::Encode::encode(self.data, encoder_, data, (4294967295, ()))?;
3405
3406 Ok(())
3407 }
3408 }
3409
3410 pub struct SpiImplExchangeVectorRequest<T0, T1> {
3412 pub chip_select: T0,
3413
3414 pub txdata: T1,
3415 }
3416
3417 unsafe impl<___E, T0, T1>
3418 ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorRequest<'static>, ___E>
3419 for SpiImplExchangeVectorRequest<T0, T1>
3420 where
3421 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3422 ___E: ::fidl_next::Encoder,
3423 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3424 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3425 {
3426 #[inline]
3427 fn encode(
3428 self,
3429 encoder_: &mut ___E,
3430 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplExchangeVectorRequest<'static>>,
3431 _: (),
3432 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3433 ::fidl_next::munge! {
3434 let crate::wire::SpiImplExchangeVectorRequest {
3435 chip_select,
3436 txdata,
3437
3438 } = out_;
3439 }
3440
3441 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3442
3443 ::fidl_next::Encode::encode(self.txdata, encoder_, txdata, (4294967295, ()))?;
3444
3445 Ok(())
3446 }
3447 }
3448
3449 pub struct SpiImplExchangeVectorResponse<T0> {
3451 pub rxdata: T0,
3452 }
3453
3454 unsafe impl<___E, T0>
3455 ::fidl_next::Encode<crate::wire::SpiImplExchangeVectorResponse<'static>, ___E>
3456 for SpiImplExchangeVectorResponse<T0>
3457 where
3458 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3459 ___E: ::fidl_next::Encoder,
3460 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3461 {
3462 #[inline]
3463 fn encode(
3464 self,
3465 encoder_: &mut ___E,
3466 out_: &mut ::core::mem::MaybeUninit<
3467 crate::wire::SpiImplExchangeVectorResponse<'static>,
3468 >,
3469 _: (),
3470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3471 ::fidl_next::munge! {
3472 let crate::wire::SpiImplExchangeVectorResponse {
3473 rxdata,
3474
3475 } = out_;
3476 }
3477
3478 ::fidl_next::Encode::encode(self.rxdata, encoder_, rxdata, (4294967295, ()))?;
3479
3480 Ok(())
3481 }
3482 }
3483
3484 pub struct SpiImplLockBusRequest<T0> {
3486 pub chip_select: T0,
3487 }
3488
3489 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SpiImplLockBusRequest, ___E>
3490 for SpiImplLockBusRequest<T0>
3491 where
3492 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3493 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3494 {
3495 #[inline]
3496 fn encode(
3497 self,
3498 encoder_: &mut ___E,
3499 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplLockBusRequest>,
3500 _: (),
3501 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3502 ::fidl_next::munge! {
3503 let crate::wire::SpiImplLockBusRequest {
3504 chip_select,
3505
3506 } = out_;
3507 }
3508
3509 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3510
3511 Ok(())
3512 }
3513 }
3514
3515 pub type SpiImplLockBusResponse = ();
3517
3518 pub struct SpiImplUnlockBusRequest<T0> {
3520 pub chip_select: T0,
3521 }
3522
3523 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SpiImplUnlockBusRequest, ___E>
3524 for SpiImplUnlockBusRequest<T0>
3525 where
3526 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3527 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3528 {
3529 #[inline]
3530 fn encode(
3531 self,
3532 encoder_: &mut ___E,
3533 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplUnlockBusRequest>,
3534 _: (),
3535 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3536 ::fidl_next::munge! {
3537 let crate::wire::SpiImplUnlockBusRequest {
3538 chip_select,
3539
3540 } = out_;
3541 }
3542
3543 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3544
3545 Ok(())
3546 }
3547 }
3548
3549 pub type SpiImplUnlockBusResponse = ();
3551
3552 pub type SpiImplRegisterVmoResponse = ();
3554
3555 pub struct SpiImplUnregisterVmoRequest<T0, T1> {
3557 pub chip_select: T0,
3558
3559 pub vmo_id: T1,
3560 }
3561
3562 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SpiImplUnregisterVmoRequest, ___E>
3563 for SpiImplUnregisterVmoRequest<T0, T1>
3564 where
3565 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3566 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3567 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3568 {
3569 #[inline]
3570 fn encode(
3571 self,
3572 encoder_: &mut ___E,
3573 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplUnregisterVmoRequest>,
3574 _: (),
3575 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3576 ::fidl_next::munge! {
3577 let crate::wire::SpiImplUnregisterVmoRequest {
3578 chip_select,
3579 vmo_id,
3580
3581 } = out_;
3582 }
3583
3584 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3585
3586 ::fidl_next::Encode::encode(self.vmo_id, encoder_, vmo_id, ())?;
3587
3588 Ok(())
3589 }
3590 }
3591
3592 pub struct SpiImplReleaseRegisteredVmosRequest<T0> {
3594 pub chip_select: T0,
3595 }
3596
3597 unsafe impl<___E, T0>
3598 ::fidl_next::Encode<crate::wire::SpiImplReleaseRegisteredVmosRequest, ___E>
3599 for SpiImplReleaseRegisteredVmosRequest<T0>
3600 where
3601 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3602 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3603 {
3604 #[inline]
3605 fn encode(
3606 self,
3607 encoder_: &mut ___E,
3608 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReleaseRegisteredVmosRequest>,
3609 _: (),
3610 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3611 ::fidl_next::munge! {
3612 let crate::wire::SpiImplReleaseRegisteredVmosRequest {
3613 chip_select,
3614
3615 } = out_;
3616 }
3617
3618 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3619
3620 Ok(())
3621 }
3622 }
3623
3624 pub struct SpiImplTransmitVmoRequest<T0, T1> {
3626 pub chip_select: T0,
3627
3628 pub buffer: T1,
3629 }
3630
3631 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SpiImplTransmitVmoRequest, ___E>
3632 for SpiImplTransmitVmoRequest<T0, T1>
3633 where
3634 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3635 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3636 T1: ::fidl_next::Encode<
3637 ::fidl_next_common_fuchsia_hardware_sharedmemory::wire::SharedVmoBuffer,
3638 ___E,
3639 >,
3640 {
3641 #[inline]
3642 fn encode(
3643 self,
3644 encoder_: &mut ___E,
3645 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplTransmitVmoRequest>,
3646 _: (),
3647 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3648 ::fidl_next::munge! {
3649 let crate::wire::SpiImplTransmitVmoRequest {
3650 chip_select,
3651 buffer,
3652
3653 } = out_;
3654 }
3655
3656 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3657
3658 ::fidl_next::Encode::encode(self.buffer, encoder_, buffer, ())?;
3659
3660 Ok(())
3661 }
3662 }
3663
3664 pub type SpiImplTransmitVmoResponse = ();
3666
3667 pub struct SpiImplReceiveVmoRequest<T0, T1> {
3669 pub chip_select: T0,
3670
3671 pub buffer: T1,
3672 }
3673
3674 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SpiImplReceiveVmoRequest, ___E>
3675 for SpiImplReceiveVmoRequest<T0, T1>
3676 where
3677 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3678 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3679 T1: ::fidl_next::Encode<
3680 ::fidl_next_common_fuchsia_hardware_sharedmemory::wire::SharedVmoBuffer,
3681 ___E,
3682 >,
3683 {
3684 #[inline]
3685 fn encode(
3686 self,
3687 encoder_: &mut ___E,
3688 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplReceiveVmoRequest>,
3689 _: (),
3690 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3691 ::fidl_next::munge! {
3692 let crate::wire::SpiImplReceiveVmoRequest {
3693 chip_select,
3694 buffer,
3695
3696 } = out_;
3697 }
3698
3699 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3700
3701 ::fidl_next::Encode::encode(self.buffer, encoder_, buffer, ())?;
3702
3703 Ok(())
3704 }
3705 }
3706
3707 pub type SpiImplReceiveVmoResponse = ();
3709
3710 pub struct SpiImplExchangeVmoRequest<T0, T1, T2> {
3712 pub chip_select: T0,
3713
3714 pub tx_buffer: T1,
3715
3716 pub rx_buffer: T2,
3717 }
3718
3719 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::SpiImplExchangeVmoRequest, ___E>
3720 for SpiImplExchangeVmoRequest<T0, T1, T2>
3721 where
3722 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3723 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3724 T1: ::fidl_next::Encode<
3725 ::fidl_next_common_fuchsia_hardware_sharedmemory::wire::SharedVmoBuffer,
3726 ___E,
3727 >,
3728 T2: ::fidl_next::Encode<
3729 ::fidl_next_common_fuchsia_hardware_sharedmemory::wire::SharedVmoBuffer,
3730 ___E,
3731 >,
3732 {
3733 #[inline]
3734 fn encode(
3735 self,
3736 encoder_: &mut ___E,
3737 out_: &mut ::core::mem::MaybeUninit<crate::wire::SpiImplExchangeVmoRequest>,
3738 _: (),
3739 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3740 ::fidl_next::munge! {
3741 let crate::wire::SpiImplExchangeVmoRequest {
3742 chip_select,
3743 tx_buffer,
3744 rx_buffer,
3745
3746 } = out_;
3747 }
3748
3749 ::fidl_next::Encode::encode(self.chip_select, encoder_, chip_select, ())?;
3750
3751 ::fidl_next::Encode::encode(self.tx_buffer, encoder_, tx_buffer, ())?;
3752
3753 ::fidl_next::Encode::encode(self.rx_buffer, encoder_, rx_buffer, ())?;
3754
3755 Ok(())
3756 }
3757 }
3758
3759 pub type SpiImplExchangeVmoResponse = ();
3761}
3762
3763pub use self::natural::*;