1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_boot::natural::*;
8
9 #[doc = " Refers to a VMO that has been created from the big bootfs VMO.\n"]
10 #[derive(Debug, PartialEq)]
11 #[repr(C)]
12 pub struct BootfsFileVmo {
13 pub offset: u32,
14
15 pub contents: ::fidl_next::fuchsia::zx::Vmo,
16 }
17
18 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BootfsFileVmo, ___E> for BootfsFileVmo
19 where
20 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21 ___E: ::fidl_next::fuchsia::HandleEncoder,
22 {
23 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::BootfsFileVmo> = unsafe {
24 ::fidl_next::CopyOptimization::enable_if(
25 true
26
27 && <
28 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
29 >::COPY_OPTIMIZATION.is_enabled()
30
31 && <
32 ::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>
33 >::COPY_OPTIMIZATION.is_enabled()
34
35 )
36 };
37
38 #[inline]
39 fn encode(
40 self,
41 encoder_: &mut ___E,
42 out_: &mut ::core::mem::MaybeUninit<crate::wire::BootfsFileVmo>,
43 _: (),
44 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
45 ::fidl_next::munge! {
46 let crate::wire::BootfsFileVmo {
47 offset,
48 contents,
49
50 } = out_;
51 }
52
53 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
54
55 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
56
57 ::fidl_next::Encode::encode(self.contents, encoder_, contents, ())?;
58
59 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(contents.as_mut_ptr()) };
60
61 Ok(())
62 }
63 }
64
65 unsafe impl<___E>
66 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::BootfsFileVmo>, ___E>
67 for BootfsFileVmo
68 where
69 ___E: ::fidl_next::Encoder + ?Sized,
70 BootfsFileVmo: ::fidl_next::Encode<crate::wire::BootfsFileVmo, ___E>,
71 {
72 #[inline]
73 fn encode_option(
74 this: ::core::option::Option<Self>,
75 encoder: &mut ___E,
76 out: &mut ::core::mem::MaybeUninit<
77 ::fidl_next::wire::Box<'static, crate::wire::BootfsFileVmo>,
78 >,
79 _: (),
80 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
81 if let Some(inner) = this {
82 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
83 ::fidl_next::wire::Box::encode_present(out);
84 } else {
85 ::fidl_next::wire::Box::encode_absent(out);
86 }
87
88 Ok(())
89 }
90 }
91
92 impl ::fidl_next::FromWire<crate::wire::BootfsFileVmo> for BootfsFileVmo {
93 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::BootfsFileVmo, Self> = unsafe {
94 ::fidl_next::CopyOptimization::enable_if(
95 true
96 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
97 .is_enabled()
98 && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
99 ::fidl_next::wire::fuchsia::Vmo,
100 >>::COPY_OPTIMIZATION
101 .is_enabled(),
102 )
103 };
104
105 #[inline]
106 fn from_wire(wire: crate::wire::BootfsFileVmo) -> Self {
107 Self {
108 offset: ::fidl_next::FromWire::from_wire(wire.offset),
109
110 contents: ::fidl_next::FromWire::from_wire(wire.contents),
111 }
112 }
113 }
114
115 #[derive(Debug, PartialEq)]
116 #[repr(C)]
117 pub struct FactoryItemsGetResponse {
118 pub payload: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
119
120 pub length: u32,
121 }
122
123 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FactoryItemsGetResponse, ___E>
124 for FactoryItemsGetResponse
125 where
126 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
127 ___E: ::fidl_next::fuchsia::HandleEncoder,
128 {
129 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
130 Self,
131 crate::wire::FactoryItemsGetResponse,
132 > = unsafe {
133 ::fidl_next::CopyOptimization::enable_if(
134 true
135
136 && <
137 ::core::option::Option<::fidl_next::fuchsia::zx::Vmo> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>
138 >::COPY_OPTIMIZATION.is_enabled()
139
140 && <
141 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
142 >::COPY_OPTIMIZATION.is_enabled()
143
144 )
145 };
146
147 #[inline]
148 fn encode(
149 self,
150 encoder_: &mut ___E,
151 out_: &mut ::core::mem::MaybeUninit<crate::wire::FactoryItemsGetResponse>,
152 _: (),
153 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
154 ::fidl_next::munge! {
155 let crate::wire::FactoryItemsGetResponse {
156 payload,
157 length,
158
159 } = out_;
160 }
161
162 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
163
164 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
165
166 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
167
168 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
169
170 Ok(())
171 }
172 }
173
174 unsafe impl<___E>
175 ::fidl_next::EncodeOption<
176 ::fidl_next::wire::Box<'static, crate::wire::FactoryItemsGetResponse>,
177 ___E,
178 > for FactoryItemsGetResponse
179 where
180 ___E: ::fidl_next::Encoder + ?Sized,
181 FactoryItemsGetResponse: ::fidl_next::Encode<crate::wire::FactoryItemsGetResponse, ___E>,
182 {
183 #[inline]
184 fn encode_option(
185 this: ::core::option::Option<Self>,
186 encoder: &mut ___E,
187 out: &mut ::core::mem::MaybeUninit<
188 ::fidl_next::wire::Box<'static, crate::wire::FactoryItemsGetResponse>,
189 >,
190 _: (),
191 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
192 if let Some(inner) = this {
193 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
194 ::fidl_next::wire::Box::encode_present(out);
195 } else {
196 ::fidl_next::wire::Box::encode_absent(out);
197 }
198
199 Ok(())
200 }
201 }
202
203 impl ::fidl_next::FromWire<crate::wire::FactoryItemsGetResponse> for FactoryItemsGetResponse {
204 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
205 crate::wire::FactoryItemsGetResponse,
206 Self,
207 > = unsafe {
208 ::fidl_next::CopyOptimization::enable_if(
209 true
210
211 && <
212 ::core::option::Option<::fidl_next::fuchsia::zx::Vmo> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalVmo>
213 >::COPY_OPTIMIZATION.is_enabled()
214
215 && <
216 u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>
217 >::COPY_OPTIMIZATION.is_enabled()
218
219 )
220 };
221
222 #[inline]
223 fn from_wire(wire: crate::wire::FactoryItemsGetResponse) -> Self {
224 Self {
225 payload: ::fidl_next::FromWire::from_wire(wire.payload),
226
227 length: ::fidl_next::FromWire::from_wire(wire.length),
228 }
229 }
230 }
231
232 #[derive(Debug, PartialEq)]
233 #[repr(C)]
234 pub struct ItemsGetResponse {
235 pub payload: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
236
237 pub length: u32,
238 }
239
240 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ItemsGetResponse, ___E> for ItemsGetResponse
241 where
242 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
243 ___E: ::fidl_next::fuchsia::HandleEncoder,
244 {
245 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
246 Self,
247 crate::wire::ItemsGetResponse,
248 > = unsafe {
249 ::fidl_next::CopyOptimization::enable_if(
250 true
251
252 && <
253 ::core::option::Option<::fidl_next::fuchsia::zx::Vmo> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>
254 >::COPY_OPTIMIZATION.is_enabled()
255
256 && <
257 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
258 >::COPY_OPTIMIZATION.is_enabled()
259
260 )
261 };
262
263 #[inline]
264 fn encode(
265 self,
266 encoder_: &mut ___E,
267 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGetResponse>,
268 _: (),
269 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
270 ::fidl_next::munge! {
271 let crate::wire::ItemsGetResponse {
272 payload,
273 length,
274
275 } = out_;
276 }
277
278 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
279
280 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
281
282 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
283
284 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
285
286 Ok(())
287 }
288 }
289
290 unsafe impl<___E>
291 ::fidl_next::EncodeOption<
292 ::fidl_next::wire::Box<'static, crate::wire::ItemsGetResponse>,
293 ___E,
294 > for ItemsGetResponse
295 where
296 ___E: ::fidl_next::Encoder + ?Sized,
297 ItemsGetResponse: ::fidl_next::Encode<crate::wire::ItemsGetResponse, ___E>,
298 {
299 #[inline]
300 fn encode_option(
301 this: ::core::option::Option<Self>,
302 encoder: &mut ___E,
303 out: &mut ::core::mem::MaybeUninit<
304 ::fidl_next::wire::Box<'static, crate::wire::ItemsGetResponse>,
305 >,
306 _: (),
307 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
308 if let Some(inner) = this {
309 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
310 ::fidl_next::wire::Box::encode_present(out);
311 } else {
312 ::fidl_next::wire::Box::encode_absent(out);
313 }
314
315 Ok(())
316 }
317 }
318
319 impl ::fidl_next::FromWire<crate::wire::ItemsGetResponse> for ItemsGetResponse {
320 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
321 crate::wire::ItemsGetResponse,
322 Self,
323 > = unsafe {
324 ::fidl_next::CopyOptimization::enable_if(
325 true
326
327 && <
328 ::core::option::Option<::fidl_next::fuchsia::zx::Vmo> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalVmo>
329 >::COPY_OPTIMIZATION.is_enabled()
330
331 && <
332 u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>
333 >::COPY_OPTIMIZATION.is_enabled()
334
335 )
336 };
337
338 #[inline]
339 fn from_wire(wire: crate::wire::ItemsGetResponse) -> Self {
340 Self {
341 payload: ::fidl_next::FromWire::from_wire(wire.payload),
342
343 length: ::fidl_next::FromWire::from_wire(wire.length),
344 }
345 }
346 }
347
348 #[derive(Debug, PartialEq)]
349 #[repr(C)]
350 pub struct RetrievedItems {
351 pub payload: ::fidl_next::fuchsia::zx::Vmo,
352
353 pub length: u32,
354
355 pub extra: u32,
356 }
357
358 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RetrievedItems, ___E> for RetrievedItems
359 where
360 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
361 ___E: ::fidl_next::fuchsia::HandleEncoder,
362 {
363 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::RetrievedItems> = unsafe {
364 ::fidl_next::CopyOptimization::enable_if(
365 true
366
367 && <
368 ::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>
369 >::COPY_OPTIMIZATION.is_enabled()
370
371 && <
372 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
373 >::COPY_OPTIMIZATION.is_enabled()
374
375 && <
376 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
377 >::COPY_OPTIMIZATION.is_enabled()
378
379 )
380 };
381
382 #[inline]
383 fn encode(
384 self,
385 encoder_: &mut ___E,
386 out_: &mut ::core::mem::MaybeUninit<crate::wire::RetrievedItems>,
387 _: (),
388 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
389 ::fidl_next::munge! {
390 let crate::wire::RetrievedItems {
391 payload,
392 length,
393 extra,
394
395 } = out_;
396 }
397
398 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
399
400 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
401
402 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
403
404 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
405
406 ::fidl_next::Encode::encode(self.extra, encoder_, extra, ())?;
407
408 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(extra.as_mut_ptr()) };
409
410 Ok(())
411 }
412 }
413
414 unsafe impl<___E>
415 ::fidl_next::EncodeOption<
416 ::fidl_next::wire::Box<'static, crate::wire::RetrievedItems>,
417 ___E,
418 > for RetrievedItems
419 where
420 ___E: ::fidl_next::Encoder + ?Sized,
421 RetrievedItems: ::fidl_next::Encode<crate::wire::RetrievedItems, ___E>,
422 {
423 #[inline]
424 fn encode_option(
425 this: ::core::option::Option<Self>,
426 encoder: &mut ___E,
427 out: &mut ::core::mem::MaybeUninit<
428 ::fidl_next::wire::Box<'static, crate::wire::RetrievedItems>,
429 >,
430 _: (),
431 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
432 if let Some(inner) = this {
433 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
434 ::fidl_next::wire::Box::encode_present(out);
435 } else {
436 ::fidl_next::wire::Box::encode_absent(out);
437 }
438
439 Ok(())
440 }
441 }
442
443 impl ::fidl_next::FromWire<crate::wire::RetrievedItems> for RetrievedItems {
444 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::RetrievedItems, Self> = unsafe {
445 ::fidl_next::CopyOptimization::enable_if(
446 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
447 ::fidl_next::wire::fuchsia::Vmo,
448 >>::COPY_OPTIMIZATION
449 .is_enabled()
450 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
451 .is_enabled()
452 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
453 .is_enabled(),
454 )
455 };
456
457 #[inline]
458 fn from_wire(wire: crate::wire::RetrievedItems) -> Self {
459 Self {
460 payload: ::fidl_next::FromWire::from_wire(wire.payload),
461
462 length: ::fidl_next::FromWire::from_wire(wire.length),
463
464 extra: ::fidl_next::FromWire::from_wire(wire.extra),
465 }
466 }
467 }
468
469 #[derive(Debug, PartialEq)]
470 pub struct ItemsGet2Response {
471 pub retrieved_items: ::std::vec::Vec<crate::natural::RetrievedItems>,
472 }
473
474 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ItemsGet2Response<'static>, ___E>
475 for ItemsGet2Response
476 where
477 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
478 ___E: ::fidl_next::Encoder,
479 ___E: ::fidl_next::fuchsia::HandleEncoder,
480 {
481 #[inline]
482 fn encode(
483 self,
484 encoder_: &mut ___E,
485 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGet2Response<'static>>,
486 _: (),
487 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
488 ::fidl_next::munge! {
489 let crate::wire::ItemsGet2Response {
490 retrieved_items,
491
492 } = out_;
493 }
494
495 ::fidl_next::Encode::encode(
496 self.retrieved_items,
497 encoder_,
498 retrieved_items,
499 (4294967295, ()),
500 )?;
501
502 let mut _field =
503 unsafe { ::fidl_next::Slot::new_unchecked(retrieved_items.as_mut_ptr()) };
504 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
505
506 Ok(())
507 }
508 }
509
510 unsafe impl<___E>
511 ::fidl_next::EncodeOption<
512 ::fidl_next::wire::Box<'static, crate::wire::ItemsGet2Response<'static>>,
513 ___E,
514 > for ItemsGet2Response
515 where
516 ___E: ::fidl_next::Encoder + ?Sized,
517 ItemsGet2Response: ::fidl_next::Encode<crate::wire::ItemsGet2Response<'static>, ___E>,
518 {
519 #[inline]
520 fn encode_option(
521 this: ::core::option::Option<Self>,
522 encoder: &mut ___E,
523 out: &mut ::core::mem::MaybeUninit<
524 ::fidl_next::wire::Box<'static, crate::wire::ItemsGet2Response<'static>>,
525 >,
526 _: (),
527 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
528 if let Some(inner) = this {
529 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
530 ::fidl_next::wire::Box::encode_present(out);
531 } else {
532 ::fidl_next::wire::Box::encode_absent(out);
533 }
534
535 Ok(())
536 }
537 }
538
539 impl<'de> ::fidl_next::FromWire<crate::wire::ItemsGet2Response<'de>> for ItemsGet2Response {
540 #[inline]
541 fn from_wire(wire: crate::wire::ItemsGet2Response<'de>) -> Self {
542 Self { retrieved_items: ::fidl_next::FromWire::from_wire(wire.retrieved_items) }
543 }
544 }
545
546 #[derive(Debug, PartialEq)]
547 #[repr(C)]
548 pub struct ItemsGetBootloaderFileResponse {
549 pub payload: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
550 }
551
552 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ItemsGetBootloaderFileResponse, ___E>
553 for ItemsGetBootloaderFileResponse
554 where
555 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
556 ___E: ::fidl_next::fuchsia::HandleEncoder,
557 {
558 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
559 Self,
560 crate::wire::ItemsGetBootloaderFileResponse,
561 > = unsafe {
562 ::fidl_next::CopyOptimization::enable_if(
563 true
564
565 && <
566 ::core::option::Option<::fidl_next::fuchsia::zx::Vmo> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>
567 >::COPY_OPTIMIZATION.is_enabled()
568
569 )
570 };
571
572 #[inline]
573 fn encode(
574 self,
575 encoder_: &mut ___E,
576 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGetBootloaderFileResponse>,
577 _: (),
578 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
579 ::fidl_next::munge! {
580 let crate::wire::ItemsGetBootloaderFileResponse {
581 payload,
582
583 } = out_;
584 }
585
586 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
587
588 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
589
590 Ok(())
591 }
592 }
593
594 unsafe impl<___E>
595 ::fidl_next::EncodeOption<
596 ::fidl_next::wire::Box<'static, crate::wire::ItemsGetBootloaderFileResponse>,
597 ___E,
598 > for ItemsGetBootloaderFileResponse
599 where
600 ___E: ::fidl_next::Encoder + ?Sized,
601 ItemsGetBootloaderFileResponse:
602 ::fidl_next::Encode<crate::wire::ItemsGetBootloaderFileResponse, ___E>,
603 {
604 #[inline]
605 fn encode_option(
606 this: ::core::option::Option<Self>,
607 encoder: &mut ___E,
608 out: &mut ::core::mem::MaybeUninit<
609 ::fidl_next::wire::Box<'static, crate::wire::ItemsGetBootloaderFileResponse>,
610 >,
611 _: (),
612 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
613 if let Some(inner) = this {
614 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
615 ::fidl_next::wire::Box::encode_present(out);
616 } else {
617 ::fidl_next::wire::Box::encode_absent(out);
618 }
619
620 Ok(())
621 }
622 }
623
624 impl ::fidl_next::FromWire<crate::wire::ItemsGetBootloaderFileResponse>
625 for ItemsGetBootloaderFileResponse
626 {
627 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
628 crate::wire::ItemsGetBootloaderFileResponse,
629 Self,
630 > = unsafe {
631 ::fidl_next::CopyOptimization::enable_if(
632 true
633
634 && <
635 ::core::option::Option<::fidl_next::fuchsia::zx::Vmo> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalVmo>
636 >::COPY_OPTIMIZATION.is_enabled()
637
638 )
639 };
640
641 #[inline]
642 fn from_wire(wire: crate::wire::ItemsGetBootloaderFileResponse) -> Self {
643 Self { payload: ::fidl_next::FromWire::from_wire(wire.payload) }
644 }
645 }
646
647 #[derive(Debug, PartialEq)]
648 #[repr(C)]
649 pub struct ReadOnlyLogGetResponse {
650 pub log: ::fidl_next::fuchsia::zx::DebugLog,
651 }
652
653 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadOnlyLogGetResponse, ___E>
654 for ReadOnlyLogGetResponse
655 where
656 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
657 ___E: ::fidl_next::fuchsia::HandleEncoder,
658 {
659 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
660 Self,
661 crate::wire::ReadOnlyLogGetResponse,
662 > = unsafe {
663 ::fidl_next::CopyOptimization::enable_if(
664 true && <::fidl_next::fuchsia::zx::DebugLog as ::fidl_next::Encode<
665 ::fidl_next::wire::fuchsia::DebugLog,
666 ___E,
667 >>::COPY_OPTIMIZATION
668 .is_enabled(),
669 )
670 };
671
672 #[inline]
673 fn encode(
674 self,
675 encoder_: &mut ___E,
676 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadOnlyLogGetResponse>,
677 _: (),
678 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
679 ::fidl_next::munge! {
680 let crate::wire::ReadOnlyLogGetResponse {
681 log,
682
683 } = out_;
684 }
685
686 ::fidl_next::Encode::encode(self.log, encoder_, log, ())?;
687
688 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(log.as_mut_ptr()) };
689
690 Ok(())
691 }
692 }
693
694 unsafe impl<___E>
695 ::fidl_next::EncodeOption<
696 ::fidl_next::wire::Box<'static, crate::wire::ReadOnlyLogGetResponse>,
697 ___E,
698 > for ReadOnlyLogGetResponse
699 where
700 ___E: ::fidl_next::Encoder + ?Sized,
701 ReadOnlyLogGetResponse: ::fidl_next::Encode<crate::wire::ReadOnlyLogGetResponse, ___E>,
702 {
703 #[inline]
704 fn encode_option(
705 this: ::core::option::Option<Self>,
706 encoder: &mut ___E,
707 out: &mut ::core::mem::MaybeUninit<
708 ::fidl_next::wire::Box<'static, crate::wire::ReadOnlyLogGetResponse>,
709 >,
710 _: (),
711 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
712 if let Some(inner) = this {
713 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
714 ::fidl_next::wire::Box::encode_present(out);
715 } else {
716 ::fidl_next::wire::Box::encode_absent(out);
717 }
718
719 Ok(())
720 }
721 }
722
723 impl ::fidl_next::FromWire<crate::wire::ReadOnlyLogGetResponse> for ReadOnlyLogGetResponse {
724 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
725 crate::wire::ReadOnlyLogGetResponse,
726 Self,
727 > = unsafe {
728 ::fidl_next::CopyOptimization::enable_if(
729 true && <::fidl_next::fuchsia::zx::DebugLog as ::fidl_next::FromWire<
730 ::fidl_next::wire::fuchsia::DebugLog,
731 >>::COPY_OPTIMIZATION
732 .is_enabled(),
733 )
734 };
735
736 #[inline]
737 fn from_wire(wire: crate::wire::ReadOnlyLogGetResponse) -> Self {
738 Self { log: ::fidl_next::FromWire::from_wire(wire.log) }
739 }
740 }
741
742 #[derive(Debug, PartialEq)]
743 #[repr(C)]
744 pub struct SvcStashStoreRequest {
745 pub svc_endpoint: ::fidl_next::ServerEnd<
746 ::fidl_next_fuchsia_io::Directory,
747 ::fidl_next::fuchsia::zx::Channel,
748 >,
749 }
750
751 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SvcStashStoreRequest, ___E>
752 for SvcStashStoreRequest
753 where
754 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
755 ___E: ::fidl_next::fuchsia::HandleEncoder,
756 {
757 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
758 Self,
759 crate::wire::SvcStashStoreRequest,
760 > = unsafe {
761 ::fidl_next::CopyOptimization::enable_if(
762 true && <::fidl_next::ServerEnd<
763 ::fidl_next_fuchsia_io::Directory,
764 ::fidl_next::fuchsia::zx::Channel,
765 > as ::fidl_next::Encode<
766 ::fidl_next::ServerEnd<
767 ::fidl_next_fuchsia_io::Directory,
768 ::fidl_next::wire::fuchsia::Channel,
769 >,
770 ___E,
771 >>::COPY_OPTIMIZATION
772 .is_enabled(),
773 )
774 };
775
776 #[inline]
777 fn encode(
778 self,
779 encoder_: &mut ___E,
780 out_: &mut ::core::mem::MaybeUninit<crate::wire::SvcStashStoreRequest>,
781 _: (),
782 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
783 ::fidl_next::munge! {
784 let crate::wire::SvcStashStoreRequest {
785 svc_endpoint,
786
787 } = out_;
788 }
789
790 ::fidl_next::Encode::encode(self.svc_endpoint, encoder_, svc_endpoint, ())?;
791
792 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(svc_endpoint.as_mut_ptr()) };
793
794 Ok(())
795 }
796 }
797
798 unsafe impl<___E>
799 ::fidl_next::EncodeOption<
800 ::fidl_next::wire::Box<'static, crate::wire::SvcStashStoreRequest>,
801 ___E,
802 > for SvcStashStoreRequest
803 where
804 ___E: ::fidl_next::Encoder + ?Sized,
805 SvcStashStoreRequest: ::fidl_next::Encode<crate::wire::SvcStashStoreRequest, ___E>,
806 {
807 #[inline]
808 fn encode_option(
809 this: ::core::option::Option<Self>,
810 encoder: &mut ___E,
811 out: &mut ::core::mem::MaybeUninit<
812 ::fidl_next::wire::Box<'static, crate::wire::SvcStashStoreRequest>,
813 >,
814 _: (),
815 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
816 if let Some(inner) = this {
817 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
818 ::fidl_next::wire::Box::encode_present(out);
819 } else {
820 ::fidl_next::wire::Box::encode_absent(out);
821 }
822
823 Ok(())
824 }
825 }
826
827 impl ::fidl_next::FromWire<crate::wire::SvcStashStoreRequest> for SvcStashStoreRequest {
828 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
829 crate::wire::SvcStashStoreRequest,
830 Self,
831 > = unsafe {
832 ::fidl_next::CopyOptimization::enable_if(
833 true && <::fidl_next::ServerEnd<
834 ::fidl_next_fuchsia_io::Directory,
835 ::fidl_next::fuchsia::zx::Channel,
836 > as ::fidl_next::FromWire<
837 ::fidl_next::ServerEnd<
838 ::fidl_next_fuchsia_io::Directory,
839 ::fidl_next::wire::fuchsia::Channel,
840 >,
841 >>::COPY_OPTIMIZATION
842 .is_enabled(),
843 )
844 };
845
846 #[inline]
847 fn from_wire(wire: crate::wire::SvcStashStoreRequest) -> Self {
848 Self { svc_endpoint: ::fidl_next::FromWire::from_wire(wire.svc_endpoint) }
849 }
850 }
851
852 #[derive(Debug, PartialEq)]
853 #[repr(C)]
854 pub struct SvcStashProviderGetResponse {
855 pub resource: ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::fuchsia::zx::Channel>,
856 }
857
858 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SvcStashProviderGetResponse, ___E>
859 for SvcStashProviderGetResponse
860 where
861 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
862 ___E: ::fidl_next::fuchsia::HandleEncoder,
863 {
864 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
865 Self,
866 crate::wire::SvcStashProviderGetResponse,
867 > = unsafe {
868 ::fidl_next::CopyOptimization::enable_if(
869 true
870
871 && <
872 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>, ___E>
873 >::COPY_OPTIMIZATION.is_enabled()
874
875 )
876 };
877
878 #[inline]
879 fn encode(
880 self,
881 encoder_: &mut ___E,
882 out_: &mut ::core::mem::MaybeUninit<crate::wire::SvcStashProviderGetResponse>,
883 _: (),
884 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
885 ::fidl_next::munge! {
886 let crate::wire::SvcStashProviderGetResponse {
887 resource,
888
889 } = out_;
890 }
891
892 ::fidl_next::Encode::encode(self.resource, encoder_, resource, ())?;
893
894 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(resource.as_mut_ptr()) };
895
896 Ok(())
897 }
898 }
899
900 unsafe impl<___E>
901 ::fidl_next::EncodeOption<
902 ::fidl_next::wire::Box<'static, crate::wire::SvcStashProviderGetResponse>,
903 ___E,
904 > for SvcStashProviderGetResponse
905 where
906 ___E: ::fidl_next::Encoder + ?Sized,
907 SvcStashProviderGetResponse:
908 ::fidl_next::Encode<crate::wire::SvcStashProviderGetResponse, ___E>,
909 {
910 #[inline]
911 fn encode_option(
912 this: ::core::option::Option<Self>,
913 encoder: &mut ___E,
914 out: &mut ::core::mem::MaybeUninit<
915 ::fidl_next::wire::Box<'static, crate::wire::SvcStashProviderGetResponse>,
916 >,
917 _: (),
918 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
919 if let Some(inner) = this {
920 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
921 ::fidl_next::wire::Box::encode_present(out);
922 } else {
923 ::fidl_next::wire::Box::encode_absent(out);
924 }
925
926 Ok(())
927 }
928 }
929
930 impl ::fidl_next::FromWire<crate::wire::SvcStashProviderGetResponse>
931 for SvcStashProviderGetResponse
932 {
933 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
934 crate::wire::SvcStashProviderGetResponse,
935 Self,
936 > = unsafe {
937 ::fidl_next::CopyOptimization::enable_if(
938 true
939
940 && <
941 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>>
942 >::COPY_OPTIMIZATION.is_enabled()
943
944 )
945 };
946
947 #[inline]
948 fn from_wire(wire: crate::wire::SvcStashProviderGetResponse) -> Self {
949 Self { resource: ::fidl_next::FromWire::from_wire(wire.resource) }
950 }
951 }
952
953 #[derive(Debug, PartialEq)]
954 #[repr(C)]
955 pub struct UserbootPostBootfsVmoRequest {
956 pub bootfs: ::fidl_next::fuchsia::zx::Vmo,
957 }
958
959 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UserbootPostBootfsVmoRequest, ___E>
960 for UserbootPostBootfsVmoRequest
961 where
962 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
963 ___E: ::fidl_next::fuchsia::HandleEncoder,
964 {
965 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
966 Self,
967 crate::wire::UserbootPostBootfsVmoRequest,
968 > = unsafe {
969 ::fidl_next::CopyOptimization::enable_if(
970 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<
971 ::fidl_next::wire::fuchsia::Vmo,
972 ___E,
973 >>::COPY_OPTIMIZATION
974 .is_enabled(),
975 )
976 };
977
978 #[inline]
979 fn encode(
980 self,
981 encoder_: &mut ___E,
982 out_: &mut ::core::mem::MaybeUninit<crate::wire::UserbootPostBootfsVmoRequest>,
983 _: (),
984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
985 ::fidl_next::munge! {
986 let crate::wire::UserbootPostBootfsVmoRequest {
987 bootfs,
988
989 } = out_;
990 }
991
992 ::fidl_next::Encode::encode(self.bootfs, encoder_, bootfs, ())?;
993
994 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bootfs.as_mut_ptr()) };
995
996 Ok(())
997 }
998 }
999
1000 unsafe impl<___E>
1001 ::fidl_next::EncodeOption<
1002 ::fidl_next::wire::Box<'static, crate::wire::UserbootPostBootfsVmoRequest>,
1003 ___E,
1004 > for UserbootPostBootfsVmoRequest
1005 where
1006 ___E: ::fidl_next::Encoder + ?Sized,
1007 UserbootPostBootfsVmoRequest:
1008 ::fidl_next::Encode<crate::wire::UserbootPostBootfsVmoRequest, ___E>,
1009 {
1010 #[inline]
1011 fn encode_option(
1012 this: ::core::option::Option<Self>,
1013 encoder: &mut ___E,
1014 out: &mut ::core::mem::MaybeUninit<
1015 ::fidl_next::wire::Box<'static, crate::wire::UserbootPostBootfsVmoRequest>,
1016 >,
1017 _: (),
1018 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1019 if let Some(inner) = this {
1020 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1021 ::fidl_next::wire::Box::encode_present(out);
1022 } else {
1023 ::fidl_next::wire::Box::encode_absent(out);
1024 }
1025
1026 Ok(())
1027 }
1028 }
1029
1030 impl ::fidl_next::FromWire<crate::wire::UserbootPostBootfsVmoRequest>
1031 for UserbootPostBootfsVmoRequest
1032 {
1033 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1034 crate::wire::UserbootPostBootfsVmoRequest,
1035 Self,
1036 > = unsafe {
1037 ::fidl_next::CopyOptimization::enable_if(
1038 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
1039 ::fidl_next::wire::fuchsia::Vmo,
1040 >>::COPY_OPTIMIZATION
1041 .is_enabled(),
1042 )
1043 };
1044
1045 #[inline]
1046 fn from_wire(wire: crate::wire::UserbootPostBootfsVmoRequest) -> Self {
1047 Self { bootfs: ::fidl_next::FromWire::from_wire(wire.bootfs) }
1048 }
1049 }
1050
1051 #[derive(Debug, PartialEq)]
1052 pub struct UserbootPostBootfsFilesRequest {
1053 pub files: ::std::vec::Vec<crate::natural::BootfsFileVmo>,
1054 }
1055
1056 unsafe impl<___E>
1057 ::fidl_next::Encode<crate::wire::UserbootPostBootfsFilesRequest<'static>, ___E>
1058 for UserbootPostBootfsFilesRequest
1059 where
1060 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1061 ___E: ::fidl_next::Encoder,
1062 ___E: ::fidl_next::fuchsia::HandleEncoder,
1063 {
1064 #[inline]
1065 fn encode(
1066 self,
1067 encoder_: &mut ___E,
1068 out_: &mut ::core::mem::MaybeUninit<
1069 crate::wire::UserbootPostBootfsFilesRequest<'static>,
1070 >,
1071 _: (),
1072 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1073 ::fidl_next::munge! {
1074 let crate::wire::UserbootPostBootfsFilesRequest {
1075 files,
1076
1077 } = out_;
1078 }
1079
1080 ::fidl_next::Encode::encode(self.files, encoder_, files, (64, ()))?;
1081
1082 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(files.as_mut_ptr()) };
1083 ::fidl_next::Constrained::validate(_field, (64, ()))?;
1084
1085 Ok(())
1086 }
1087 }
1088
1089 unsafe impl<___E>
1090 ::fidl_next::EncodeOption<
1091 ::fidl_next::wire::Box<'static, crate::wire::UserbootPostBootfsFilesRequest<'static>>,
1092 ___E,
1093 > for UserbootPostBootfsFilesRequest
1094 where
1095 ___E: ::fidl_next::Encoder + ?Sized,
1096 UserbootPostBootfsFilesRequest:
1097 ::fidl_next::Encode<crate::wire::UserbootPostBootfsFilesRequest<'static>, ___E>,
1098 {
1099 #[inline]
1100 fn encode_option(
1101 this: ::core::option::Option<Self>,
1102 encoder: &mut ___E,
1103 out: &mut ::core::mem::MaybeUninit<
1104 ::fidl_next::wire::Box<
1105 'static,
1106 crate::wire::UserbootPostBootfsFilesRequest<'static>,
1107 >,
1108 >,
1109 _: (),
1110 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1111 if let Some(inner) = this {
1112 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1113 ::fidl_next::wire::Box::encode_present(out);
1114 } else {
1115 ::fidl_next::wire::Box::encode_absent(out);
1116 }
1117
1118 Ok(())
1119 }
1120 }
1121
1122 impl<'de> ::fidl_next::FromWire<crate::wire::UserbootPostBootfsFilesRequest<'de>>
1123 for UserbootPostBootfsFilesRequest
1124 {
1125 #[inline]
1126 fn from_wire(wire: crate::wire::UserbootPostBootfsFilesRequest<'de>) -> Self {
1127 Self { files: ::fidl_next::FromWire::from_wire(wire.files) }
1128 }
1129 }
1130
1131 #[derive(Debug, Default, PartialEq)]
1132 pub struct UserbootPostBootHandlesRequest {
1133 pub zbi_vmo: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
1134
1135 pub kernel_files: ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::Vmo>>,
1136
1137 pub system_resource: ::core::option::Option<::fidl_next::fuchsia::zx::Resource>,
1138
1139 pub mmio_resource: ::core::option::Option<::fidl_next::fuchsia::zx::Resource>,
1140
1141 pub irq_resource: ::core::option::Option<::fidl_next::fuchsia::zx::Resource>,
1142
1143 pub ioport_resource: ::core::option::Option<::fidl_next::fuchsia::zx::Resource>,
1144
1145 pub smc_resource: ::core::option::Option<::fidl_next::fuchsia::zx::Resource>,
1146 }
1147
1148 impl UserbootPostBootHandlesRequest {
1149 fn __max_ordinal(&self) -> usize {
1150 if self.smc_resource.is_some() {
1151 return 7;
1152 }
1153
1154 if self.ioport_resource.is_some() {
1155 return 6;
1156 }
1157
1158 if self.irq_resource.is_some() {
1159 return 5;
1160 }
1161
1162 if self.mmio_resource.is_some() {
1163 return 4;
1164 }
1165
1166 if self.system_resource.is_some() {
1167 return 3;
1168 }
1169
1170 if self.kernel_files.is_some() {
1171 return 2;
1172 }
1173
1174 if self.zbi_vmo.is_some() {
1175 return 1;
1176 }
1177
1178 0
1179 }
1180 }
1181
1182 unsafe impl<___E>
1183 ::fidl_next::Encode<crate::wire::UserbootPostBootHandlesRequest<'static>, ___E>
1184 for UserbootPostBootHandlesRequest
1185 where
1186 ___E: ::fidl_next::Encoder + ?Sized,
1187 ___E: ::fidl_next::fuchsia::HandleEncoder,
1188 {
1189 #[inline]
1190 fn encode(
1191 mut self,
1192 encoder: &mut ___E,
1193 out: &mut ::core::mem::MaybeUninit<
1194 crate::wire::UserbootPostBootHandlesRequest<'static>,
1195 >,
1196 _: (),
1197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1198 ::fidl_next::munge!(let crate::wire::UserbootPostBootHandlesRequest { table } = out);
1199
1200 let max_ord = self.__max_ordinal();
1201
1202 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1203 ::fidl_next::Wire::zero_padding(&mut out);
1204
1205 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1206 ::fidl_next::wire::Envelope,
1207 >(encoder, max_ord);
1208
1209 for i in 1..=max_ord {
1210 match i {
1211 7 => {
1212 if let Some(value) = self.smc_resource.take() {
1213 ::fidl_next::wire::Envelope::encode_value::<
1214 ::fidl_next::wire::fuchsia::Resource,
1215 ___E,
1216 >(
1217 value, preallocated.encoder, &mut out, ()
1218 )?;
1219 } else {
1220 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1221 }
1222 }
1223
1224 6 => {
1225 if let Some(value) = self.ioport_resource.take() {
1226 ::fidl_next::wire::Envelope::encode_value::<
1227 ::fidl_next::wire::fuchsia::Resource,
1228 ___E,
1229 >(
1230 value, preallocated.encoder, &mut out, ()
1231 )?;
1232 } else {
1233 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1234 }
1235 }
1236
1237 5 => {
1238 if let Some(value) = self.irq_resource.take() {
1239 ::fidl_next::wire::Envelope::encode_value::<
1240 ::fidl_next::wire::fuchsia::Resource,
1241 ___E,
1242 >(
1243 value, preallocated.encoder, &mut out, ()
1244 )?;
1245 } else {
1246 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1247 }
1248 }
1249
1250 4 => {
1251 if let Some(value) = self.mmio_resource.take() {
1252 ::fidl_next::wire::Envelope::encode_value::<
1253 ::fidl_next::wire::fuchsia::Resource,
1254 ___E,
1255 >(
1256 value, preallocated.encoder, &mut out, ()
1257 )?;
1258 } else {
1259 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1260 }
1261 }
1262
1263 3 => {
1264 if let Some(value) = self.system_resource.take() {
1265 ::fidl_next::wire::Envelope::encode_value::<
1266 ::fidl_next::wire::fuchsia::Resource,
1267 ___E,
1268 >(
1269 value, preallocated.encoder, &mut out, ()
1270 )?;
1271 } else {
1272 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1273 }
1274 }
1275
1276 2 => {
1277 if let Some(value) = self.kernel_files.take() {
1278 ::fidl_next::wire::Envelope::encode_value::<
1279 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::fuchsia::Vmo>,
1280 ___E,
1281 >(
1282 value, preallocated.encoder, &mut out, (64, ())
1283 )?;
1284 } else {
1285 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1286 }
1287 }
1288
1289 1 => {
1290 if let Some(value) = self.zbi_vmo.take() {
1291 ::fidl_next::wire::Envelope::encode_value::<
1292 ::fidl_next::wire::fuchsia::Vmo,
1293 ___E,
1294 >(
1295 value, preallocated.encoder, &mut out, ()
1296 )?;
1297 } else {
1298 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1299 }
1300 }
1301
1302 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1303 }
1304 unsafe {
1305 preallocated.write_next(out.assume_init_ref());
1306 }
1307 }
1308
1309 ::fidl_next::wire::Table::encode_len(table, max_ord);
1310
1311 Ok(())
1312 }
1313 }
1314
1315 impl<'de> ::fidl_next::FromWire<crate::wire::UserbootPostBootHandlesRequest<'de>>
1316 for UserbootPostBootHandlesRequest
1317 {
1318 #[inline]
1319 fn from_wire(wire_: crate::wire::UserbootPostBootHandlesRequest<'de>) -> Self {
1320 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1321
1322 let zbi_vmo = wire_.table.get(1);
1323
1324 let kernel_files = wire_.table.get(2);
1325
1326 let system_resource = wire_.table.get(3);
1327
1328 let mmio_resource = wire_.table.get(4);
1329
1330 let irq_resource = wire_.table.get(5);
1331
1332 let ioport_resource = wire_.table.get(6);
1333
1334 let smc_resource = wire_.table.get(7);
1335
1336 Self {
1337
1338
1339 zbi_vmo: zbi_vmo.map(|envelope| ::fidl_next::FromWire::from_wire(
1340 unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>() }
1341 )),
1342
1343
1344 kernel_files: kernel_files.map(|envelope| ::fidl_next::FromWire::from_wire(
1345 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Vmo>>() }
1346 )),
1347
1348
1349 system_resource: system_resource.map(|envelope| ::fidl_next::FromWire::from_wire(
1350 unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>() }
1351 )),
1352
1353
1354 mmio_resource: mmio_resource.map(|envelope| ::fidl_next::FromWire::from_wire(
1355 unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>() }
1356 )),
1357
1358
1359 irq_resource: irq_resource.map(|envelope| ::fidl_next::FromWire::from_wire(
1360 unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>() }
1361 )),
1362
1363
1364 ioport_resource: ioport_resource.map(|envelope| ::fidl_next::FromWire::from_wire(
1365 unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>() }
1366 )),
1367
1368
1369 smc_resource: smc_resource.map(|envelope| ::fidl_next::FromWire::from_wire(
1370 unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>() }
1371 )),
1372
1373 }
1374 }
1375 }
1376
1377 #[derive(Debug, PartialEq)]
1378 #[repr(C)]
1379 pub struct UserbootPostStashSvcRequest {
1380 pub stash_svc_endpoint:
1381 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::fuchsia::zx::Channel>,
1382 }
1383
1384 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UserbootPostStashSvcRequest, ___E>
1385 for UserbootPostStashSvcRequest
1386 where
1387 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1388 ___E: ::fidl_next::fuchsia::HandleEncoder,
1389 {
1390 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1391 Self,
1392 crate::wire::UserbootPostStashSvcRequest,
1393 > = unsafe {
1394 ::fidl_next::CopyOptimization::enable_if(
1395 true
1396
1397 && <
1398 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>, ___E>
1399 >::COPY_OPTIMIZATION.is_enabled()
1400
1401 )
1402 };
1403
1404 #[inline]
1405 fn encode(
1406 self,
1407 encoder_: &mut ___E,
1408 out_: &mut ::core::mem::MaybeUninit<crate::wire::UserbootPostStashSvcRequest>,
1409 _: (),
1410 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1411 ::fidl_next::munge! {
1412 let crate::wire::UserbootPostStashSvcRequest {
1413 stash_svc_endpoint,
1414
1415 } = out_;
1416 }
1417
1418 ::fidl_next::Encode::encode(self.stash_svc_endpoint, encoder_, stash_svc_endpoint, ())?;
1419
1420 let mut _field =
1421 unsafe { ::fidl_next::Slot::new_unchecked(stash_svc_endpoint.as_mut_ptr()) };
1422
1423 Ok(())
1424 }
1425 }
1426
1427 unsafe impl<___E>
1428 ::fidl_next::EncodeOption<
1429 ::fidl_next::wire::Box<'static, crate::wire::UserbootPostStashSvcRequest>,
1430 ___E,
1431 > for UserbootPostStashSvcRequest
1432 where
1433 ___E: ::fidl_next::Encoder + ?Sized,
1434 UserbootPostStashSvcRequest:
1435 ::fidl_next::Encode<crate::wire::UserbootPostStashSvcRequest, ___E>,
1436 {
1437 #[inline]
1438 fn encode_option(
1439 this: ::core::option::Option<Self>,
1440 encoder: &mut ___E,
1441 out: &mut ::core::mem::MaybeUninit<
1442 ::fidl_next::wire::Box<'static, crate::wire::UserbootPostStashSvcRequest>,
1443 >,
1444 _: (),
1445 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1446 if let Some(inner) = this {
1447 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1448 ::fidl_next::wire::Box::encode_present(out);
1449 } else {
1450 ::fidl_next::wire::Box::encode_absent(out);
1451 }
1452
1453 Ok(())
1454 }
1455 }
1456
1457 impl ::fidl_next::FromWire<crate::wire::UserbootPostStashSvcRequest>
1458 for UserbootPostStashSvcRequest
1459 {
1460 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1461 crate::wire::UserbootPostStashSvcRequest,
1462 Self,
1463 > = unsafe {
1464 ::fidl_next::CopyOptimization::enable_if(
1465 true
1466
1467 && <
1468 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>>
1469 >::COPY_OPTIMIZATION.is_enabled()
1470
1471 )
1472 };
1473
1474 #[inline]
1475 fn from_wire(wire: crate::wire::UserbootPostStashSvcRequest) -> Self {
1476 Self { stash_svc_endpoint: ::fidl_next::FromWire::from_wire(wire.stash_svc_endpoint) }
1477 }
1478 }
1479
1480 #[derive(Debug, PartialEq)]
1481 #[repr(C)]
1482 pub struct WriteOnlyLogGetResponse {
1483 pub log: ::fidl_next::fuchsia::zx::DebugLog,
1484 }
1485
1486 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WriteOnlyLogGetResponse, ___E>
1487 for WriteOnlyLogGetResponse
1488 where
1489 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1490 ___E: ::fidl_next::fuchsia::HandleEncoder,
1491 {
1492 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1493 Self,
1494 crate::wire::WriteOnlyLogGetResponse,
1495 > = unsafe {
1496 ::fidl_next::CopyOptimization::enable_if(
1497 true && <::fidl_next::fuchsia::zx::DebugLog as ::fidl_next::Encode<
1498 ::fidl_next::wire::fuchsia::DebugLog,
1499 ___E,
1500 >>::COPY_OPTIMIZATION
1501 .is_enabled(),
1502 )
1503 };
1504
1505 #[inline]
1506 fn encode(
1507 self,
1508 encoder_: &mut ___E,
1509 out_: &mut ::core::mem::MaybeUninit<crate::wire::WriteOnlyLogGetResponse>,
1510 _: (),
1511 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1512 ::fidl_next::munge! {
1513 let crate::wire::WriteOnlyLogGetResponse {
1514 log,
1515
1516 } = out_;
1517 }
1518
1519 ::fidl_next::Encode::encode(self.log, encoder_, log, ())?;
1520
1521 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(log.as_mut_ptr()) };
1522
1523 Ok(())
1524 }
1525 }
1526
1527 unsafe impl<___E>
1528 ::fidl_next::EncodeOption<
1529 ::fidl_next::wire::Box<'static, crate::wire::WriteOnlyLogGetResponse>,
1530 ___E,
1531 > for WriteOnlyLogGetResponse
1532 where
1533 ___E: ::fidl_next::Encoder + ?Sized,
1534 WriteOnlyLogGetResponse: ::fidl_next::Encode<crate::wire::WriteOnlyLogGetResponse, ___E>,
1535 {
1536 #[inline]
1537 fn encode_option(
1538 this: ::core::option::Option<Self>,
1539 encoder: &mut ___E,
1540 out: &mut ::core::mem::MaybeUninit<
1541 ::fidl_next::wire::Box<'static, crate::wire::WriteOnlyLogGetResponse>,
1542 >,
1543 _: (),
1544 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1545 if let Some(inner) = this {
1546 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1547 ::fidl_next::wire::Box::encode_present(out);
1548 } else {
1549 ::fidl_next::wire::Box::encode_absent(out);
1550 }
1551
1552 Ok(())
1553 }
1554 }
1555
1556 impl ::fidl_next::FromWire<crate::wire::WriteOnlyLogGetResponse> for WriteOnlyLogGetResponse {
1557 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1558 crate::wire::WriteOnlyLogGetResponse,
1559 Self,
1560 > = unsafe {
1561 ::fidl_next::CopyOptimization::enable_if(
1562 true && <::fidl_next::fuchsia::zx::DebugLog as ::fidl_next::FromWire<
1563 ::fidl_next::wire::fuchsia::DebugLog,
1564 >>::COPY_OPTIMIZATION
1565 .is_enabled(),
1566 )
1567 };
1568
1569 #[inline]
1570 fn from_wire(wire: crate::wire::WriteOnlyLogGetResponse) -> Self {
1571 Self { log: ::fidl_next::FromWire::from_wire(wire.log) }
1572 }
1573 }
1574}
1575
1576pub mod wire {
1577
1578 pub use fidl_next_common_fuchsia_boot::wire::*;
1579
1580 #[derive(Debug)]
1582 #[repr(C)]
1583 pub struct BootfsFileVmo {
1584 pub offset: ::fidl_next::wire::Uint32,
1585
1586 pub contents: ::fidl_next::wire::fuchsia::Vmo,
1587 }
1588
1589 static_assertions::const_assert_eq!(std::mem::size_of::<BootfsFileVmo>(), 8);
1590 static_assertions::const_assert_eq!(std::mem::align_of::<BootfsFileVmo>(), 4);
1591
1592 static_assertions::const_assert_eq!(std::mem::offset_of!(BootfsFileVmo, offset), 0);
1593
1594 static_assertions::const_assert_eq!(std::mem::offset_of!(BootfsFileVmo, contents), 4);
1595
1596 impl ::fidl_next::Constrained for BootfsFileVmo {
1597 type Constraint = ();
1598
1599 fn validate(
1600 _: ::fidl_next::Slot<'_, Self>,
1601 _: Self::Constraint,
1602 ) -> Result<(), ::fidl_next::ValidationError> {
1603 Ok(())
1604 }
1605 }
1606
1607 unsafe impl ::fidl_next::Wire for BootfsFileVmo {
1608 type Narrowed<'de> = BootfsFileVmo;
1609
1610 #[inline]
1611 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1612 ::fidl_next::munge! {
1613 let Self {
1614 offset,
1615 contents,
1616
1617 } = &mut *out_;
1618 }
1619
1620 ::fidl_next::Wire::zero_padding(offset);
1621
1622 ::fidl_next::Wire::zero_padding(contents);
1623 }
1624 }
1625
1626 unsafe impl<___D> ::fidl_next::Decode<___D> for BootfsFileVmo
1627 where
1628 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1629 ___D: ::fidl_next::fuchsia::HandleDecoder,
1630 {
1631 fn decode(
1632 slot_: ::fidl_next::Slot<'_, Self>,
1633 decoder_: &mut ___D,
1634 _: (),
1635 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1636 ::fidl_next::munge! {
1637 let Self {
1638 mut offset,
1639 mut contents,
1640
1641 } = slot_;
1642 }
1643
1644 let _field = offset.as_mut();
1645
1646 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
1647
1648 let _field = contents.as_mut();
1649
1650 ::fidl_next::Decode::decode(contents.as_mut(), decoder_, ())?;
1651
1652 Ok(())
1653 }
1654 }
1655
1656 impl ::fidl_next::IntoNatural for BootfsFileVmo {
1657 type Natural = crate::natural::BootfsFileVmo;
1658 }
1659
1660 #[derive(Debug)]
1662 #[repr(C)]
1663 pub struct FactoryItemsGetResponse {
1664 pub payload: ::fidl_next::wire::fuchsia::OptionalVmo,
1665
1666 pub length: ::fidl_next::wire::Uint32,
1667 }
1668
1669 static_assertions::const_assert_eq!(std::mem::size_of::<FactoryItemsGetResponse>(), 8);
1670 static_assertions::const_assert_eq!(std::mem::align_of::<FactoryItemsGetResponse>(), 4);
1671
1672 static_assertions::const_assert_eq!(std::mem::offset_of!(FactoryItemsGetResponse, payload), 0);
1673
1674 static_assertions::const_assert_eq!(std::mem::offset_of!(FactoryItemsGetResponse, length), 4);
1675
1676 impl ::fidl_next::Constrained for FactoryItemsGetResponse {
1677 type Constraint = ();
1678
1679 fn validate(
1680 _: ::fidl_next::Slot<'_, Self>,
1681 _: Self::Constraint,
1682 ) -> Result<(), ::fidl_next::ValidationError> {
1683 Ok(())
1684 }
1685 }
1686
1687 unsafe impl ::fidl_next::Wire for FactoryItemsGetResponse {
1688 type Narrowed<'de> = FactoryItemsGetResponse;
1689
1690 #[inline]
1691 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1692 ::fidl_next::munge! {
1693 let Self {
1694 payload,
1695 length,
1696
1697 } = &mut *out_;
1698 }
1699
1700 ::fidl_next::Wire::zero_padding(payload);
1701
1702 ::fidl_next::Wire::zero_padding(length);
1703 }
1704 }
1705
1706 unsafe impl<___D> ::fidl_next::Decode<___D> for FactoryItemsGetResponse
1707 where
1708 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1709 ___D: ::fidl_next::fuchsia::HandleDecoder,
1710 {
1711 fn decode(
1712 slot_: ::fidl_next::Slot<'_, Self>,
1713 decoder_: &mut ___D,
1714 _: (),
1715 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1716 ::fidl_next::munge! {
1717 let Self {
1718 mut payload,
1719 mut length,
1720
1721 } = slot_;
1722 }
1723
1724 let _field = payload.as_mut();
1725
1726 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
1727
1728 let _field = length.as_mut();
1729
1730 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
1731
1732 Ok(())
1733 }
1734 }
1735
1736 impl ::fidl_next::IntoNatural for FactoryItemsGetResponse {
1737 type Natural = crate::natural::FactoryItemsGetResponse;
1738 }
1739
1740 #[derive(Debug)]
1742 #[repr(C)]
1743 pub struct ItemsGetResponse {
1744 pub payload: ::fidl_next::wire::fuchsia::OptionalVmo,
1745
1746 pub length: ::fidl_next::wire::Uint32,
1747 }
1748
1749 static_assertions::const_assert_eq!(std::mem::size_of::<ItemsGetResponse>(), 8);
1750 static_assertions::const_assert_eq!(std::mem::align_of::<ItemsGetResponse>(), 4);
1751
1752 static_assertions::const_assert_eq!(std::mem::offset_of!(ItemsGetResponse, payload), 0);
1753
1754 static_assertions::const_assert_eq!(std::mem::offset_of!(ItemsGetResponse, length), 4);
1755
1756 impl ::fidl_next::Constrained for ItemsGetResponse {
1757 type Constraint = ();
1758
1759 fn validate(
1760 _: ::fidl_next::Slot<'_, Self>,
1761 _: Self::Constraint,
1762 ) -> Result<(), ::fidl_next::ValidationError> {
1763 Ok(())
1764 }
1765 }
1766
1767 unsafe impl ::fidl_next::Wire for ItemsGetResponse {
1768 type Narrowed<'de> = ItemsGetResponse;
1769
1770 #[inline]
1771 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1772 ::fidl_next::munge! {
1773 let Self {
1774 payload,
1775 length,
1776
1777 } = &mut *out_;
1778 }
1779
1780 ::fidl_next::Wire::zero_padding(payload);
1781
1782 ::fidl_next::Wire::zero_padding(length);
1783 }
1784 }
1785
1786 unsafe impl<___D> ::fidl_next::Decode<___D> for ItemsGetResponse
1787 where
1788 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1789 ___D: ::fidl_next::fuchsia::HandleDecoder,
1790 {
1791 fn decode(
1792 slot_: ::fidl_next::Slot<'_, Self>,
1793 decoder_: &mut ___D,
1794 _: (),
1795 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1796 ::fidl_next::munge! {
1797 let Self {
1798 mut payload,
1799 mut length,
1800
1801 } = slot_;
1802 }
1803
1804 let _field = payload.as_mut();
1805
1806 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
1807
1808 let _field = length.as_mut();
1809
1810 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
1811
1812 Ok(())
1813 }
1814 }
1815
1816 impl ::fidl_next::IntoNatural for ItemsGetResponse {
1817 type Natural = crate::natural::ItemsGetResponse;
1818 }
1819
1820 #[derive(Debug)]
1822 #[repr(C)]
1823 pub struct RetrievedItems {
1824 pub payload: ::fidl_next::wire::fuchsia::Vmo,
1825
1826 pub length: ::fidl_next::wire::Uint32,
1827
1828 pub extra: ::fidl_next::wire::Uint32,
1829 }
1830
1831 static_assertions::const_assert_eq!(std::mem::size_of::<RetrievedItems>(), 12);
1832 static_assertions::const_assert_eq!(std::mem::align_of::<RetrievedItems>(), 4);
1833
1834 static_assertions::const_assert_eq!(std::mem::offset_of!(RetrievedItems, payload), 0);
1835
1836 static_assertions::const_assert_eq!(std::mem::offset_of!(RetrievedItems, length), 4);
1837
1838 static_assertions::const_assert_eq!(std::mem::offset_of!(RetrievedItems, extra), 8);
1839
1840 impl ::fidl_next::Constrained for RetrievedItems {
1841 type Constraint = ();
1842
1843 fn validate(
1844 _: ::fidl_next::Slot<'_, Self>,
1845 _: Self::Constraint,
1846 ) -> Result<(), ::fidl_next::ValidationError> {
1847 Ok(())
1848 }
1849 }
1850
1851 unsafe impl ::fidl_next::Wire for RetrievedItems {
1852 type Narrowed<'de> = RetrievedItems;
1853
1854 #[inline]
1855 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1856 ::fidl_next::munge! {
1857 let Self {
1858 payload,
1859 length,
1860 extra,
1861
1862 } = &mut *out_;
1863 }
1864
1865 ::fidl_next::Wire::zero_padding(payload);
1866
1867 ::fidl_next::Wire::zero_padding(length);
1868
1869 ::fidl_next::Wire::zero_padding(extra);
1870 }
1871 }
1872
1873 unsafe impl<___D> ::fidl_next::Decode<___D> for RetrievedItems
1874 where
1875 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1876 ___D: ::fidl_next::fuchsia::HandleDecoder,
1877 {
1878 fn decode(
1879 slot_: ::fidl_next::Slot<'_, Self>,
1880 decoder_: &mut ___D,
1881 _: (),
1882 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1883 ::fidl_next::munge! {
1884 let Self {
1885 mut payload,
1886 mut length,
1887 mut extra,
1888
1889 } = slot_;
1890 }
1891
1892 let _field = payload.as_mut();
1893
1894 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
1895
1896 let _field = length.as_mut();
1897
1898 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
1899
1900 let _field = extra.as_mut();
1901
1902 ::fidl_next::Decode::decode(extra.as_mut(), decoder_, ())?;
1903
1904 Ok(())
1905 }
1906 }
1907
1908 impl ::fidl_next::IntoNatural for RetrievedItems {
1909 type Natural = crate::natural::RetrievedItems;
1910 }
1911
1912 #[derive(Debug)]
1914 #[repr(C)]
1915 pub struct ItemsGet2Response<'de> {
1916 pub retrieved_items: ::fidl_next::wire::Vector<'de, crate::wire::RetrievedItems>,
1917 }
1918
1919 static_assertions::const_assert_eq!(std::mem::size_of::<ItemsGet2Response<'_>>(), 16);
1920 static_assertions::const_assert_eq!(std::mem::align_of::<ItemsGet2Response<'_>>(), 8);
1921
1922 static_assertions::const_assert_eq!(
1923 std::mem::offset_of!(ItemsGet2Response<'_>, retrieved_items),
1924 0
1925 );
1926
1927 impl ::fidl_next::Constrained for ItemsGet2Response<'_> {
1928 type Constraint = ();
1929
1930 fn validate(
1931 _: ::fidl_next::Slot<'_, Self>,
1932 _: Self::Constraint,
1933 ) -> Result<(), ::fidl_next::ValidationError> {
1934 Ok(())
1935 }
1936 }
1937
1938 unsafe impl ::fidl_next::Wire for ItemsGet2Response<'static> {
1939 type Narrowed<'de> = ItemsGet2Response<'de>;
1940
1941 #[inline]
1942 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1943 ::fidl_next::munge! {
1944 let Self {
1945 retrieved_items,
1946
1947 } = &mut *out_;
1948 }
1949
1950 ::fidl_next::Wire::zero_padding(retrieved_items);
1951 }
1952 }
1953
1954 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ItemsGet2Response<'de>
1955 where
1956 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1957 ___D: ::fidl_next::Decoder<'de>,
1958 ___D: ::fidl_next::fuchsia::HandleDecoder,
1959 {
1960 fn decode(
1961 slot_: ::fidl_next::Slot<'_, Self>,
1962 decoder_: &mut ___D,
1963 _: (),
1964 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1965 ::fidl_next::munge! {
1966 let Self {
1967 mut retrieved_items,
1968
1969 } = slot_;
1970 }
1971
1972 let _field = retrieved_items.as_mut();
1973 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1974 ::fidl_next::Decode::decode(retrieved_items.as_mut(), decoder_, (4294967295, ()))?;
1975
1976 Ok(())
1977 }
1978 }
1979
1980 impl<'de> ::fidl_next::IntoNatural for ItemsGet2Response<'de> {
1981 type Natural = crate::natural::ItemsGet2Response;
1982 }
1983
1984 #[derive(Debug)]
1986 #[repr(C)]
1987 pub struct ItemsGetBootloaderFileResponse {
1988 pub payload: ::fidl_next::wire::fuchsia::OptionalVmo,
1989 }
1990
1991 static_assertions::const_assert_eq!(std::mem::size_of::<ItemsGetBootloaderFileResponse>(), 4);
1992 static_assertions::const_assert_eq!(std::mem::align_of::<ItemsGetBootloaderFileResponse>(), 4);
1993
1994 static_assertions::const_assert_eq!(
1995 std::mem::offset_of!(ItemsGetBootloaderFileResponse, payload),
1996 0
1997 );
1998
1999 impl ::fidl_next::Constrained for ItemsGetBootloaderFileResponse {
2000 type Constraint = ();
2001
2002 fn validate(
2003 _: ::fidl_next::Slot<'_, Self>,
2004 _: Self::Constraint,
2005 ) -> Result<(), ::fidl_next::ValidationError> {
2006 Ok(())
2007 }
2008 }
2009
2010 unsafe impl ::fidl_next::Wire for ItemsGetBootloaderFileResponse {
2011 type Narrowed<'de> = ItemsGetBootloaderFileResponse;
2012
2013 #[inline]
2014 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2015 ::fidl_next::munge! {
2016 let Self {
2017 payload,
2018
2019 } = &mut *out_;
2020 }
2021
2022 ::fidl_next::Wire::zero_padding(payload);
2023 }
2024 }
2025
2026 unsafe impl<___D> ::fidl_next::Decode<___D> for ItemsGetBootloaderFileResponse
2027 where
2028 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2029 ___D: ::fidl_next::fuchsia::HandleDecoder,
2030 {
2031 fn decode(
2032 slot_: ::fidl_next::Slot<'_, Self>,
2033 decoder_: &mut ___D,
2034 _: (),
2035 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2036 ::fidl_next::munge! {
2037 let Self {
2038 mut payload,
2039
2040 } = slot_;
2041 }
2042
2043 let _field = payload.as_mut();
2044
2045 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
2046
2047 Ok(())
2048 }
2049 }
2050
2051 impl ::fidl_next::IntoNatural for ItemsGetBootloaderFileResponse {
2052 type Natural = crate::natural::ItemsGetBootloaderFileResponse;
2053 }
2054
2055 #[derive(Debug)]
2057 #[repr(C)]
2058 pub struct ReadOnlyLogGetResponse {
2059 pub log: ::fidl_next::wire::fuchsia::DebugLog,
2060 }
2061
2062 static_assertions::const_assert_eq!(std::mem::size_of::<ReadOnlyLogGetResponse>(), 4);
2063 static_assertions::const_assert_eq!(std::mem::align_of::<ReadOnlyLogGetResponse>(), 4);
2064
2065 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadOnlyLogGetResponse, log), 0);
2066
2067 impl ::fidl_next::Constrained for ReadOnlyLogGetResponse {
2068 type Constraint = ();
2069
2070 fn validate(
2071 _: ::fidl_next::Slot<'_, Self>,
2072 _: Self::Constraint,
2073 ) -> Result<(), ::fidl_next::ValidationError> {
2074 Ok(())
2075 }
2076 }
2077
2078 unsafe impl ::fidl_next::Wire for ReadOnlyLogGetResponse {
2079 type Narrowed<'de> = ReadOnlyLogGetResponse;
2080
2081 #[inline]
2082 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2083 ::fidl_next::munge! {
2084 let Self {
2085 log,
2086
2087 } = &mut *out_;
2088 }
2089
2090 ::fidl_next::Wire::zero_padding(log);
2091 }
2092 }
2093
2094 unsafe impl<___D> ::fidl_next::Decode<___D> for ReadOnlyLogGetResponse
2095 where
2096 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2097 ___D: ::fidl_next::fuchsia::HandleDecoder,
2098 {
2099 fn decode(
2100 slot_: ::fidl_next::Slot<'_, Self>,
2101 decoder_: &mut ___D,
2102 _: (),
2103 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2104 ::fidl_next::munge! {
2105 let Self {
2106 mut log,
2107
2108 } = slot_;
2109 }
2110
2111 let _field = log.as_mut();
2112
2113 ::fidl_next::Decode::decode(log.as_mut(), decoder_, ())?;
2114
2115 Ok(())
2116 }
2117 }
2118
2119 impl ::fidl_next::IntoNatural for ReadOnlyLogGetResponse {
2120 type Natural = crate::natural::ReadOnlyLogGetResponse;
2121 }
2122
2123 #[derive(Debug)]
2125 #[repr(C)]
2126 pub struct SvcStashStoreRequest {
2127 pub svc_endpoint: ::fidl_next::ServerEnd<
2128 ::fidl_next_fuchsia_io::Directory,
2129 ::fidl_next::wire::fuchsia::Channel,
2130 >,
2131 }
2132
2133 static_assertions::const_assert_eq!(std::mem::size_of::<SvcStashStoreRequest>(), 4);
2134 static_assertions::const_assert_eq!(std::mem::align_of::<SvcStashStoreRequest>(), 4);
2135
2136 static_assertions::const_assert_eq!(
2137 std::mem::offset_of!(SvcStashStoreRequest, svc_endpoint),
2138 0
2139 );
2140
2141 impl ::fidl_next::Constrained for SvcStashStoreRequest {
2142 type Constraint = ();
2143
2144 fn validate(
2145 _: ::fidl_next::Slot<'_, Self>,
2146 _: Self::Constraint,
2147 ) -> Result<(), ::fidl_next::ValidationError> {
2148 Ok(())
2149 }
2150 }
2151
2152 unsafe impl ::fidl_next::Wire for SvcStashStoreRequest {
2153 type Narrowed<'de> = SvcStashStoreRequest;
2154
2155 #[inline]
2156 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2157 ::fidl_next::munge! {
2158 let Self {
2159 svc_endpoint,
2160
2161 } = &mut *out_;
2162 }
2163
2164 ::fidl_next::Wire::zero_padding(svc_endpoint);
2165 }
2166 }
2167
2168 unsafe impl<___D> ::fidl_next::Decode<___D> for SvcStashStoreRequest
2169 where
2170 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2171 ___D: ::fidl_next::fuchsia::HandleDecoder,
2172 {
2173 fn decode(
2174 slot_: ::fidl_next::Slot<'_, Self>,
2175 decoder_: &mut ___D,
2176 _: (),
2177 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2178 ::fidl_next::munge! {
2179 let Self {
2180 mut svc_endpoint,
2181
2182 } = slot_;
2183 }
2184
2185 let _field = svc_endpoint.as_mut();
2186
2187 ::fidl_next::Decode::decode(svc_endpoint.as_mut(), decoder_, ())?;
2188
2189 Ok(())
2190 }
2191 }
2192
2193 impl ::fidl_next::IntoNatural for SvcStashStoreRequest {
2194 type Natural = crate::natural::SvcStashStoreRequest;
2195 }
2196
2197 #[derive(Debug)]
2199 #[repr(C)]
2200 pub struct SvcStashProviderGetResponse {
2201 pub resource: ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
2202 }
2203
2204 static_assertions::const_assert_eq!(std::mem::size_of::<SvcStashProviderGetResponse>(), 4);
2205 static_assertions::const_assert_eq!(std::mem::align_of::<SvcStashProviderGetResponse>(), 4);
2206
2207 static_assertions::const_assert_eq!(
2208 std::mem::offset_of!(SvcStashProviderGetResponse, resource),
2209 0
2210 );
2211
2212 impl ::fidl_next::Constrained for SvcStashProviderGetResponse {
2213 type Constraint = ();
2214
2215 fn validate(
2216 _: ::fidl_next::Slot<'_, Self>,
2217 _: Self::Constraint,
2218 ) -> Result<(), ::fidl_next::ValidationError> {
2219 Ok(())
2220 }
2221 }
2222
2223 unsafe impl ::fidl_next::Wire for SvcStashProviderGetResponse {
2224 type Narrowed<'de> = SvcStashProviderGetResponse;
2225
2226 #[inline]
2227 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2228 ::fidl_next::munge! {
2229 let Self {
2230 resource,
2231
2232 } = &mut *out_;
2233 }
2234
2235 ::fidl_next::Wire::zero_padding(resource);
2236 }
2237 }
2238
2239 unsafe impl<___D> ::fidl_next::Decode<___D> for SvcStashProviderGetResponse
2240 where
2241 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2242 ___D: ::fidl_next::fuchsia::HandleDecoder,
2243 {
2244 fn decode(
2245 slot_: ::fidl_next::Slot<'_, Self>,
2246 decoder_: &mut ___D,
2247 _: (),
2248 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2249 ::fidl_next::munge! {
2250 let Self {
2251 mut resource,
2252
2253 } = slot_;
2254 }
2255
2256 let _field = resource.as_mut();
2257
2258 ::fidl_next::Decode::decode(resource.as_mut(), decoder_, ())?;
2259
2260 Ok(())
2261 }
2262 }
2263
2264 impl ::fidl_next::IntoNatural for SvcStashProviderGetResponse {
2265 type Natural = crate::natural::SvcStashProviderGetResponse;
2266 }
2267
2268 #[derive(Debug)]
2270 #[repr(C)]
2271 pub struct UserbootPostBootfsVmoRequest {
2272 pub bootfs: ::fidl_next::wire::fuchsia::Vmo,
2273 }
2274
2275 static_assertions::const_assert_eq!(std::mem::size_of::<UserbootPostBootfsVmoRequest>(), 4);
2276 static_assertions::const_assert_eq!(std::mem::align_of::<UserbootPostBootfsVmoRequest>(), 4);
2277
2278 static_assertions::const_assert_eq!(
2279 std::mem::offset_of!(UserbootPostBootfsVmoRequest, bootfs),
2280 0
2281 );
2282
2283 impl ::fidl_next::Constrained for UserbootPostBootfsVmoRequest {
2284 type Constraint = ();
2285
2286 fn validate(
2287 _: ::fidl_next::Slot<'_, Self>,
2288 _: Self::Constraint,
2289 ) -> Result<(), ::fidl_next::ValidationError> {
2290 Ok(())
2291 }
2292 }
2293
2294 unsafe impl ::fidl_next::Wire for UserbootPostBootfsVmoRequest {
2295 type Narrowed<'de> = UserbootPostBootfsVmoRequest;
2296
2297 #[inline]
2298 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2299 ::fidl_next::munge! {
2300 let Self {
2301 bootfs,
2302
2303 } = &mut *out_;
2304 }
2305
2306 ::fidl_next::Wire::zero_padding(bootfs);
2307 }
2308 }
2309
2310 unsafe impl<___D> ::fidl_next::Decode<___D> for UserbootPostBootfsVmoRequest
2311 where
2312 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2313 ___D: ::fidl_next::fuchsia::HandleDecoder,
2314 {
2315 fn decode(
2316 slot_: ::fidl_next::Slot<'_, Self>,
2317 decoder_: &mut ___D,
2318 _: (),
2319 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2320 ::fidl_next::munge! {
2321 let Self {
2322 mut bootfs,
2323
2324 } = slot_;
2325 }
2326
2327 let _field = bootfs.as_mut();
2328
2329 ::fidl_next::Decode::decode(bootfs.as_mut(), decoder_, ())?;
2330
2331 Ok(())
2332 }
2333 }
2334
2335 impl ::fidl_next::IntoNatural for UserbootPostBootfsVmoRequest {
2336 type Natural = crate::natural::UserbootPostBootfsVmoRequest;
2337 }
2338
2339 #[derive(Debug)]
2341 #[repr(C)]
2342 pub struct UserbootPostBootfsFilesRequest<'de> {
2343 pub files: ::fidl_next::wire::Vector<'de, crate::wire::BootfsFileVmo>,
2344 }
2345
2346 static_assertions::const_assert_eq!(
2347 std::mem::size_of::<UserbootPostBootfsFilesRequest<'_>>(),
2348 16
2349 );
2350 static_assertions::const_assert_eq!(
2351 std::mem::align_of::<UserbootPostBootfsFilesRequest<'_>>(),
2352 8
2353 );
2354
2355 static_assertions::const_assert_eq!(
2356 std::mem::offset_of!(UserbootPostBootfsFilesRequest<'_>, files),
2357 0
2358 );
2359
2360 impl ::fidl_next::Constrained for UserbootPostBootfsFilesRequest<'_> {
2361 type Constraint = ();
2362
2363 fn validate(
2364 _: ::fidl_next::Slot<'_, Self>,
2365 _: Self::Constraint,
2366 ) -> Result<(), ::fidl_next::ValidationError> {
2367 Ok(())
2368 }
2369 }
2370
2371 unsafe impl ::fidl_next::Wire for UserbootPostBootfsFilesRequest<'static> {
2372 type Narrowed<'de> = UserbootPostBootfsFilesRequest<'de>;
2373
2374 #[inline]
2375 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2376 ::fidl_next::munge! {
2377 let Self {
2378 files,
2379
2380 } = &mut *out_;
2381 }
2382
2383 ::fidl_next::Wire::zero_padding(files);
2384 }
2385 }
2386
2387 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UserbootPostBootfsFilesRequest<'de>
2388 where
2389 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2390 ___D: ::fidl_next::Decoder<'de>,
2391 ___D: ::fidl_next::fuchsia::HandleDecoder,
2392 {
2393 fn decode(
2394 slot_: ::fidl_next::Slot<'_, Self>,
2395 decoder_: &mut ___D,
2396 _: (),
2397 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2398 ::fidl_next::munge! {
2399 let Self {
2400 mut files,
2401
2402 } = slot_;
2403 }
2404
2405 let _field = files.as_mut();
2406 ::fidl_next::Constrained::validate(_field, (64, ()))?;
2407 ::fidl_next::Decode::decode(files.as_mut(), decoder_, (64, ()))?;
2408
2409 let files = unsafe { files.deref_unchecked() };
2410
2411 if files.len() > 64 {
2412 return Err(::fidl_next::DecodeError::VectorTooLong {
2413 size: files.len() as u64,
2414 limit: 64,
2415 });
2416 }
2417
2418 Ok(())
2419 }
2420 }
2421
2422 impl<'de> ::fidl_next::IntoNatural for UserbootPostBootfsFilesRequest<'de> {
2423 type Natural = crate::natural::UserbootPostBootfsFilesRequest;
2424 }
2425
2426 #[repr(C)]
2428 pub struct UserbootPostBootHandlesRequest<'de> {
2429 pub(crate) table: ::fidl_next::wire::Table<'de>,
2430 }
2431
2432 impl<'de> Drop for UserbootPostBootHandlesRequest<'de> {
2433 fn drop(&mut self) {
2434 let _ = self.table.get(1).map(|envelope| unsafe {
2435 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2436 });
2437
2438 let _ = self.table.get(2)
2439 .map(|envelope| unsafe {
2440 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Vmo>>()
2441 });
2442
2443 let _ = self.table.get(3).map(|envelope| unsafe {
2444 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>()
2445 });
2446
2447 let _ = self.table.get(4).map(|envelope| unsafe {
2448 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>()
2449 });
2450
2451 let _ = self.table.get(5).map(|envelope| unsafe {
2452 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>()
2453 });
2454
2455 let _ = self.table.get(6).map(|envelope| unsafe {
2456 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>()
2457 });
2458
2459 let _ = self.table.get(7).map(|envelope| unsafe {
2460 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Resource>()
2461 });
2462 }
2463 }
2464
2465 impl ::fidl_next::Constrained for UserbootPostBootHandlesRequest<'_> {
2466 type Constraint = ();
2467
2468 fn validate(
2469 _: ::fidl_next::Slot<'_, Self>,
2470 _: Self::Constraint,
2471 ) -> Result<(), ::fidl_next::ValidationError> {
2472 Ok(())
2473 }
2474 }
2475
2476 unsafe impl ::fidl_next::Wire for UserbootPostBootHandlesRequest<'static> {
2477 type Narrowed<'de> = UserbootPostBootHandlesRequest<'de>;
2478
2479 #[inline]
2480 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2481 ::fidl_next::munge!(let Self { table } = out);
2482 ::fidl_next::wire::Table::zero_padding(table);
2483 }
2484 }
2485
2486 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UserbootPostBootHandlesRequest<'de>
2487 where
2488 ___D: ::fidl_next::Decoder<'de> + ?Sized,
2489 ___D: ::fidl_next::fuchsia::HandleDecoder,
2490 {
2491 fn decode(
2492 slot: ::fidl_next::Slot<'_, Self>,
2493 decoder: &mut ___D,
2494 _: (),
2495 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2496 ::fidl_next::munge!(let Self { table } = slot);
2497
2498 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2499 match ordinal {
2500 0 => unsafe { ::core::hint::unreachable_unchecked() },
2501
2502 1 => {
2503 ::fidl_next::wire::Envelope::decode_as::<
2504 ___D,
2505 ::fidl_next::wire::fuchsia::Vmo,
2506 >(slot.as_mut(), decoder, ())?;
2507
2508 Ok(())
2509 }
2510
2511 2 => {
2512 ::fidl_next::wire::Envelope::decode_as::<
2513 ___D,
2514 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Vmo>,
2515 >(slot.as_mut(), decoder, (64, ()))?;
2516
2517 let value = unsafe {
2518 slot
2519 .deref_unchecked()
2520 .deref_unchecked::<
2521 ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Vmo>
2522 >()
2523 };
2524
2525 if value.len() > 64 {
2526 return Err(::fidl_next::DecodeError::VectorTooLong {
2527 size: value.len() as u64,
2528 limit: 64,
2529 });
2530 }
2531
2532 Ok(())
2533 }
2534
2535 3 => {
2536 ::fidl_next::wire::Envelope::decode_as::<
2537 ___D,
2538 ::fidl_next::wire::fuchsia::Resource,
2539 >(slot.as_mut(), decoder, ())?;
2540
2541 Ok(())
2542 }
2543
2544 4 => {
2545 ::fidl_next::wire::Envelope::decode_as::<
2546 ___D,
2547 ::fidl_next::wire::fuchsia::Resource,
2548 >(slot.as_mut(), decoder, ())?;
2549
2550 Ok(())
2551 }
2552
2553 5 => {
2554 ::fidl_next::wire::Envelope::decode_as::<
2555 ___D,
2556 ::fidl_next::wire::fuchsia::Resource,
2557 >(slot.as_mut(), decoder, ())?;
2558
2559 Ok(())
2560 }
2561
2562 6 => {
2563 ::fidl_next::wire::Envelope::decode_as::<
2564 ___D,
2565 ::fidl_next::wire::fuchsia::Resource,
2566 >(slot.as_mut(), decoder, ())?;
2567
2568 Ok(())
2569 }
2570
2571 7 => {
2572 ::fidl_next::wire::Envelope::decode_as::<
2573 ___D,
2574 ::fidl_next::wire::fuchsia::Resource,
2575 >(slot.as_mut(), decoder, ())?;
2576
2577 Ok(())
2578 }
2579
2580 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2581 }
2582 })
2583 }
2584 }
2585
2586 impl<'de> UserbootPostBootHandlesRequest<'de> {
2587 pub fn zbi_vmo(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmo> {
2588 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2589 }
2590
2591 pub fn take_zbi_vmo(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmo> {
2592 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2593 }
2594
2595 pub fn kernel_files(
2596 &self,
2597 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Vmo>>
2598 {
2599 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2600 }
2601
2602 pub fn take_kernel_files(
2603 &mut self,
2604 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Vmo>>
2605 {
2606 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2607 }
2608
2609 pub fn system_resource(
2610 &self,
2611 ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Resource> {
2612 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2613 }
2614
2615 pub fn take_system_resource(
2616 &mut self,
2617 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Resource> {
2618 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2619 }
2620
2621 pub fn mmio_resource(
2622 &self,
2623 ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Resource> {
2624 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2625 }
2626
2627 pub fn take_mmio_resource(
2628 &mut self,
2629 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Resource> {
2630 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2631 }
2632
2633 pub fn irq_resource(
2634 &self,
2635 ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Resource> {
2636 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2637 }
2638
2639 pub fn take_irq_resource(
2640 &mut self,
2641 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Resource> {
2642 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
2643 }
2644
2645 pub fn ioport_resource(
2646 &self,
2647 ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Resource> {
2648 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2649 }
2650
2651 pub fn take_ioport_resource(
2652 &mut self,
2653 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Resource> {
2654 unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
2655 }
2656
2657 pub fn smc_resource(
2658 &self,
2659 ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Resource> {
2660 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2661 }
2662
2663 pub fn take_smc_resource(
2664 &mut self,
2665 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Resource> {
2666 unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
2667 }
2668 }
2669
2670 impl<'de> ::core::fmt::Debug for UserbootPostBootHandlesRequest<'de> {
2671 fn fmt(
2672 &self,
2673 f: &mut ::core::fmt::Formatter<'_>,
2674 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2675 f.debug_struct("UserbootPostBootHandlesRequest")
2676 .field("zbi_vmo", &self.zbi_vmo())
2677 .field("kernel_files", &self.kernel_files())
2678 .field("system_resource", &self.system_resource())
2679 .field("mmio_resource", &self.mmio_resource())
2680 .field("irq_resource", &self.irq_resource())
2681 .field("ioport_resource", &self.ioport_resource())
2682 .field("smc_resource", &self.smc_resource())
2683 .finish()
2684 }
2685 }
2686
2687 impl<'de> ::fidl_next::IntoNatural for UserbootPostBootHandlesRequest<'de> {
2688 type Natural = crate::natural::UserbootPostBootHandlesRequest;
2689 }
2690
2691 #[derive(Debug)]
2693 #[repr(C)]
2694 pub struct UserbootPostStashSvcRequest {
2695 pub stash_svc_endpoint:
2696 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
2697 }
2698
2699 static_assertions::const_assert_eq!(std::mem::size_of::<UserbootPostStashSvcRequest>(), 4);
2700 static_assertions::const_assert_eq!(std::mem::align_of::<UserbootPostStashSvcRequest>(), 4);
2701
2702 static_assertions::const_assert_eq!(
2703 std::mem::offset_of!(UserbootPostStashSvcRequest, stash_svc_endpoint),
2704 0
2705 );
2706
2707 impl ::fidl_next::Constrained for UserbootPostStashSvcRequest {
2708 type Constraint = ();
2709
2710 fn validate(
2711 _: ::fidl_next::Slot<'_, Self>,
2712 _: Self::Constraint,
2713 ) -> Result<(), ::fidl_next::ValidationError> {
2714 Ok(())
2715 }
2716 }
2717
2718 unsafe impl ::fidl_next::Wire for UserbootPostStashSvcRequest {
2719 type Narrowed<'de> = UserbootPostStashSvcRequest;
2720
2721 #[inline]
2722 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2723 ::fidl_next::munge! {
2724 let Self {
2725 stash_svc_endpoint,
2726
2727 } = &mut *out_;
2728 }
2729
2730 ::fidl_next::Wire::zero_padding(stash_svc_endpoint);
2731 }
2732 }
2733
2734 unsafe impl<___D> ::fidl_next::Decode<___D> for UserbootPostStashSvcRequest
2735 where
2736 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2737 ___D: ::fidl_next::fuchsia::HandleDecoder,
2738 {
2739 fn decode(
2740 slot_: ::fidl_next::Slot<'_, Self>,
2741 decoder_: &mut ___D,
2742 _: (),
2743 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2744 ::fidl_next::munge! {
2745 let Self {
2746 mut stash_svc_endpoint,
2747
2748 } = slot_;
2749 }
2750
2751 let _field = stash_svc_endpoint.as_mut();
2752
2753 ::fidl_next::Decode::decode(stash_svc_endpoint.as_mut(), decoder_, ())?;
2754
2755 Ok(())
2756 }
2757 }
2758
2759 impl ::fidl_next::IntoNatural for UserbootPostStashSvcRequest {
2760 type Natural = crate::natural::UserbootPostStashSvcRequest;
2761 }
2762
2763 #[derive(Debug)]
2765 #[repr(C)]
2766 pub struct WriteOnlyLogGetResponse {
2767 pub log: ::fidl_next::wire::fuchsia::DebugLog,
2768 }
2769
2770 static_assertions::const_assert_eq!(std::mem::size_of::<WriteOnlyLogGetResponse>(), 4);
2771 static_assertions::const_assert_eq!(std::mem::align_of::<WriteOnlyLogGetResponse>(), 4);
2772
2773 static_assertions::const_assert_eq!(std::mem::offset_of!(WriteOnlyLogGetResponse, log), 0);
2774
2775 impl ::fidl_next::Constrained for WriteOnlyLogGetResponse {
2776 type Constraint = ();
2777
2778 fn validate(
2779 _: ::fidl_next::Slot<'_, Self>,
2780 _: Self::Constraint,
2781 ) -> Result<(), ::fidl_next::ValidationError> {
2782 Ok(())
2783 }
2784 }
2785
2786 unsafe impl ::fidl_next::Wire for WriteOnlyLogGetResponse {
2787 type Narrowed<'de> = WriteOnlyLogGetResponse;
2788
2789 #[inline]
2790 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2791 ::fidl_next::munge! {
2792 let Self {
2793 log,
2794
2795 } = &mut *out_;
2796 }
2797
2798 ::fidl_next::Wire::zero_padding(log);
2799 }
2800 }
2801
2802 unsafe impl<___D> ::fidl_next::Decode<___D> for WriteOnlyLogGetResponse
2803 where
2804 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2805 ___D: ::fidl_next::fuchsia::HandleDecoder,
2806 {
2807 fn decode(
2808 slot_: ::fidl_next::Slot<'_, Self>,
2809 decoder_: &mut ___D,
2810 _: (),
2811 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2812 ::fidl_next::munge! {
2813 let Self {
2814 mut log,
2815
2816 } = slot_;
2817 }
2818
2819 let _field = log.as_mut();
2820
2821 ::fidl_next::Decode::decode(log.as_mut(), decoder_, ())?;
2822
2823 Ok(())
2824 }
2825 }
2826
2827 impl ::fidl_next::IntoNatural for WriteOnlyLogGetResponse {
2828 type Natural = crate::natural::WriteOnlyLogGetResponse;
2829 }
2830}
2831
2832pub mod wire_optional {
2833
2834 pub use fidl_next_common_fuchsia_boot::wire_optional::*;
2835}
2836
2837pub mod generic {
2838
2839 pub use fidl_next_common_fuchsia_boot::generic::*;
2840
2841 pub struct BootfsFileVmo<T0, T1> {
2843 pub offset: T0,
2844
2845 pub contents: T1,
2846 }
2847
2848 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::BootfsFileVmo, ___E>
2849 for BootfsFileVmo<T0, T1>
2850 where
2851 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2852 ___E: ::fidl_next::fuchsia::HandleEncoder,
2853 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2854 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2855 {
2856 #[inline]
2857 fn encode(
2858 self,
2859 encoder_: &mut ___E,
2860 out_: &mut ::core::mem::MaybeUninit<crate::wire::BootfsFileVmo>,
2861 _: (),
2862 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2863 ::fidl_next::munge! {
2864 let crate::wire::BootfsFileVmo {
2865 offset,
2866 contents,
2867
2868 } = out_;
2869 }
2870
2871 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
2872
2873 ::fidl_next::Encode::encode(self.contents, encoder_, contents, ())?;
2874
2875 Ok(())
2876 }
2877 }
2878
2879 pub struct FactoryItemsGetResponse<T0, T1> {
2881 pub payload: T0,
2882
2883 pub length: T1,
2884 }
2885
2886 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FactoryItemsGetResponse, ___E>
2887 for FactoryItemsGetResponse<T0, T1>
2888 where
2889 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2890 ___E: ::fidl_next::fuchsia::HandleEncoder,
2891 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
2892 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2893 {
2894 #[inline]
2895 fn encode(
2896 self,
2897 encoder_: &mut ___E,
2898 out_: &mut ::core::mem::MaybeUninit<crate::wire::FactoryItemsGetResponse>,
2899 _: (),
2900 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2901 ::fidl_next::munge! {
2902 let crate::wire::FactoryItemsGetResponse {
2903 payload,
2904 length,
2905
2906 } = out_;
2907 }
2908
2909 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
2910
2911 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
2912
2913 Ok(())
2914 }
2915 }
2916
2917 pub struct ItemsGetResponse<T0, T1> {
2919 pub payload: T0,
2920
2921 pub length: T1,
2922 }
2923
2924 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ItemsGetResponse, ___E>
2925 for ItemsGetResponse<T0, T1>
2926 where
2927 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2928 ___E: ::fidl_next::fuchsia::HandleEncoder,
2929 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
2930 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2931 {
2932 #[inline]
2933 fn encode(
2934 self,
2935 encoder_: &mut ___E,
2936 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGetResponse>,
2937 _: (),
2938 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2939 ::fidl_next::munge! {
2940 let crate::wire::ItemsGetResponse {
2941 payload,
2942 length,
2943
2944 } = out_;
2945 }
2946
2947 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
2948
2949 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
2950
2951 Ok(())
2952 }
2953 }
2954
2955 pub struct RetrievedItems<T0, T1, T2> {
2957 pub payload: T0,
2958
2959 pub length: T1,
2960
2961 pub extra: T2,
2962 }
2963
2964 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::RetrievedItems, ___E>
2965 for RetrievedItems<T0, T1, T2>
2966 where
2967 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2968 ___E: ::fidl_next::fuchsia::HandleEncoder,
2969 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2970 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2971 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2972 {
2973 #[inline]
2974 fn encode(
2975 self,
2976 encoder_: &mut ___E,
2977 out_: &mut ::core::mem::MaybeUninit<crate::wire::RetrievedItems>,
2978 _: (),
2979 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2980 ::fidl_next::munge! {
2981 let crate::wire::RetrievedItems {
2982 payload,
2983 length,
2984 extra,
2985
2986 } = out_;
2987 }
2988
2989 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
2990
2991 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
2992
2993 ::fidl_next::Encode::encode(self.extra, encoder_, extra, ())?;
2994
2995 Ok(())
2996 }
2997 }
2998
2999 pub struct ItemsGet2Response<T0> {
3001 pub retrieved_items: T0,
3002 }
3003
3004 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ItemsGet2Response<'static>, ___E>
3005 for ItemsGet2Response<T0>
3006 where
3007 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3008 ___E: ::fidl_next::Encoder,
3009 ___E: ::fidl_next::fuchsia::HandleEncoder,
3010 T0: ::fidl_next::Encode<
3011 ::fidl_next::wire::Vector<'static, crate::wire::RetrievedItems>,
3012 ___E,
3013 >,
3014 {
3015 #[inline]
3016 fn encode(
3017 self,
3018 encoder_: &mut ___E,
3019 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGet2Response<'static>>,
3020 _: (),
3021 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3022 ::fidl_next::munge! {
3023 let crate::wire::ItemsGet2Response {
3024 retrieved_items,
3025
3026 } = out_;
3027 }
3028
3029 ::fidl_next::Encode::encode(
3030 self.retrieved_items,
3031 encoder_,
3032 retrieved_items,
3033 (4294967295, ()),
3034 )?;
3035
3036 Ok(())
3037 }
3038 }
3039
3040 pub struct ItemsGetBootloaderFileResponse<T0> {
3042 pub payload: T0,
3043 }
3044
3045 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ItemsGetBootloaderFileResponse, ___E>
3046 for ItemsGetBootloaderFileResponse<T0>
3047 where
3048 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3049 ___E: ::fidl_next::fuchsia::HandleEncoder,
3050 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
3051 {
3052 #[inline]
3053 fn encode(
3054 self,
3055 encoder_: &mut ___E,
3056 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGetBootloaderFileResponse>,
3057 _: (),
3058 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3059 ::fidl_next::munge! {
3060 let crate::wire::ItemsGetBootloaderFileResponse {
3061 payload,
3062
3063 } = out_;
3064 }
3065
3066 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3067
3068 Ok(())
3069 }
3070 }
3071
3072 pub struct ReadOnlyLogGetResponse<T0> {
3074 pub log: T0,
3075 }
3076
3077 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadOnlyLogGetResponse, ___E>
3078 for ReadOnlyLogGetResponse<T0>
3079 where
3080 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3081 ___E: ::fidl_next::fuchsia::HandleEncoder,
3082 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::DebugLog, ___E>,
3083 {
3084 #[inline]
3085 fn encode(
3086 self,
3087 encoder_: &mut ___E,
3088 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadOnlyLogGetResponse>,
3089 _: (),
3090 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3091 ::fidl_next::munge! {
3092 let crate::wire::ReadOnlyLogGetResponse {
3093 log,
3094
3095 } = out_;
3096 }
3097
3098 ::fidl_next::Encode::encode(self.log, encoder_, log, ())?;
3099
3100 Ok(())
3101 }
3102 }
3103
3104 pub struct SvcStashStoreRequest<T0> {
3106 pub svc_endpoint: T0,
3107 }
3108
3109 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SvcStashStoreRequest, ___E>
3110 for SvcStashStoreRequest<T0>
3111 where
3112 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3113 ___E: ::fidl_next::fuchsia::HandleEncoder,
3114 T0: ::fidl_next::Encode<
3115 ::fidl_next::ServerEnd<
3116 ::fidl_next_fuchsia_io::Directory,
3117 ::fidl_next::wire::fuchsia::Channel,
3118 >,
3119 ___E,
3120 >,
3121 {
3122 #[inline]
3123 fn encode(
3124 self,
3125 encoder_: &mut ___E,
3126 out_: &mut ::core::mem::MaybeUninit<crate::wire::SvcStashStoreRequest>,
3127 _: (),
3128 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3129 ::fidl_next::munge! {
3130 let crate::wire::SvcStashStoreRequest {
3131 svc_endpoint,
3132
3133 } = out_;
3134 }
3135
3136 ::fidl_next::Encode::encode(self.svc_endpoint, encoder_, svc_endpoint, ())?;
3137
3138 Ok(())
3139 }
3140 }
3141
3142 pub struct SvcStashProviderGetResponse<T0> {
3144 pub resource: T0,
3145 }
3146
3147 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SvcStashProviderGetResponse, ___E>
3148 for SvcStashProviderGetResponse<T0>
3149 where
3150 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3151 ___E: ::fidl_next::fuchsia::HandleEncoder,
3152 T0: ::fidl_next::Encode<
3153 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
3154 ___E,
3155 >,
3156 {
3157 #[inline]
3158 fn encode(
3159 self,
3160 encoder_: &mut ___E,
3161 out_: &mut ::core::mem::MaybeUninit<crate::wire::SvcStashProviderGetResponse>,
3162 _: (),
3163 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3164 ::fidl_next::munge! {
3165 let crate::wire::SvcStashProviderGetResponse {
3166 resource,
3167
3168 } = out_;
3169 }
3170
3171 ::fidl_next::Encode::encode(self.resource, encoder_, resource, ())?;
3172
3173 Ok(())
3174 }
3175 }
3176
3177 pub struct UserbootPostBootfsVmoRequest<T0> {
3179 pub bootfs: T0,
3180 }
3181
3182 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UserbootPostBootfsVmoRequest, ___E>
3183 for UserbootPostBootfsVmoRequest<T0>
3184 where
3185 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3186 ___E: ::fidl_next::fuchsia::HandleEncoder,
3187 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3188 {
3189 #[inline]
3190 fn encode(
3191 self,
3192 encoder_: &mut ___E,
3193 out_: &mut ::core::mem::MaybeUninit<crate::wire::UserbootPostBootfsVmoRequest>,
3194 _: (),
3195 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3196 ::fidl_next::munge! {
3197 let crate::wire::UserbootPostBootfsVmoRequest {
3198 bootfs,
3199
3200 } = out_;
3201 }
3202
3203 ::fidl_next::Encode::encode(self.bootfs, encoder_, bootfs, ())?;
3204
3205 Ok(())
3206 }
3207 }
3208
3209 pub struct UserbootPostBootfsFilesRequest<T0> {
3211 pub files: T0,
3212 }
3213
3214 unsafe impl<___E, T0>
3215 ::fidl_next::Encode<crate::wire::UserbootPostBootfsFilesRequest<'static>, ___E>
3216 for UserbootPostBootfsFilesRequest<T0>
3217 where
3218 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3219 ___E: ::fidl_next::Encoder,
3220 ___E: ::fidl_next::fuchsia::HandleEncoder,
3221 T0: ::fidl_next::Encode<
3222 ::fidl_next::wire::Vector<'static, crate::wire::BootfsFileVmo>,
3223 ___E,
3224 >,
3225 {
3226 #[inline]
3227 fn encode(
3228 self,
3229 encoder_: &mut ___E,
3230 out_: &mut ::core::mem::MaybeUninit<
3231 crate::wire::UserbootPostBootfsFilesRequest<'static>,
3232 >,
3233 _: (),
3234 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3235 ::fidl_next::munge! {
3236 let crate::wire::UserbootPostBootfsFilesRequest {
3237 files,
3238
3239 } = out_;
3240 }
3241
3242 ::fidl_next::Encode::encode(self.files, encoder_, files, (64, ()))?;
3243
3244 Ok(())
3245 }
3246 }
3247
3248 pub struct UserbootPostStashSvcRequest<T0> {
3250 pub stash_svc_endpoint: T0,
3251 }
3252
3253 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UserbootPostStashSvcRequest, ___E>
3254 for UserbootPostStashSvcRequest<T0>
3255 where
3256 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3257 ___E: ::fidl_next::fuchsia::HandleEncoder,
3258 T0: ::fidl_next::Encode<
3259 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
3260 ___E,
3261 >,
3262 {
3263 #[inline]
3264 fn encode(
3265 self,
3266 encoder_: &mut ___E,
3267 out_: &mut ::core::mem::MaybeUninit<crate::wire::UserbootPostStashSvcRequest>,
3268 _: (),
3269 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3270 ::fidl_next::munge! {
3271 let crate::wire::UserbootPostStashSvcRequest {
3272 stash_svc_endpoint,
3273
3274 } = out_;
3275 }
3276
3277 ::fidl_next::Encode::encode(self.stash_svc_endpoint, encoder_, stash_svc_endpoint, ())?;
3278
3279 Ok(())
3280 }
3281 }
3282
3283 pub struct WriteOnlyLogGetResponse<T0> {
3285 pub log: T0,
3286 }
3287
3288 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WriteOnlyLogGetResponse, ___E>
3289 for WriteOnlyLogGetResponse<T0>
3290 where
3291 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3292 ___E: ::fidl_next::fuchsia::HandleEncoder,
3293 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::DebugLog, ___E>,
3294 {
3295 #[inline]
3296 fn encode(
3297 self,
3298 encoder_: &mut ___E,
3299 out_: &mut ::core::mem::MaybeUninit<crate::wire::WriteOnlyLogGetResponse>,
3300 _: (),
3301 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3302 ::fidl_next::munge! {
3303 let crate::wire::WriteOnlyLogGetResponse {
3304 log,
3305
3306 } = out_;
3307 }
3308
3309 ::fidl_next::Encode::encode(self.log, encoder_, log, ())?;
3310
3311 Ok(())
3312 }
3313 }
3314}
3315
3316pub use self::natural::*;
3317
3318#[doc = " Protocol for retrieving factory boot item payloads.\n"]
3320#[derive(PartialEq, Debug)]
3321pub struct FactoryItems;
3322
3323impl ::fidl_next::Discoverable for FactoryItems {
3324 const PROTOCOL_NAME: &'static str = "fuchsia.boot.FactoryItems";
3325}
3326
3327#[cfg(target_os = "fuchsia")]
3328impl ::fidl_next::HasTransport for FactoryItems {
3329 type Transport = ::fidl_next::fuchsia::zx::Channel;
3330}
3331
3332pub mod factory_items {
3333 pub mod prelude {
3334 pub use crate::{
3335 FactoryItems, FactoryItemsClientHandler, FactoryItemsLocalClientHandler,
3336 FactoryItemsLocalServerHandler, FactoryItemsServerHandler, factory_items,
3337 };
3338
3339 pub use crate::natural::FactoryItemsGetRequest;
3340
3341 pub use crate::natural::FactoryItemsGetResponse;
3342 }
3343
3344 pub struct Get;
3345
3346 impl ::fidl_next::Method for Get {
3347 const ORDINAL: u64 = 3390589410134308569;
3348 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3349 ::fidl_next::protocol::Flexibility::Strict;
3350
3351 type Protocol = crate::FactoryItems;
3352
3353 type Request = crate::wire::FactoryItemsGetRequest;
3354 }
3355
3356 impl ::fidl_next::TwoWayMethod for Get {
3357 type Response = ::fidl_next::wire::Strict<crate::wire::FactoryItemsGetResponse>;
3358 }
3359
3360 impl<___R> ::fidl_next::Respond<___R> for Get {
3361 type Output = ::fidl_next::Strict<___R>;
3362
3363 fn respond(response: ___R) -> Self::Output {
3364 ::fidl_next::Strict(response)
3365 }
3366 }
3367
3368 mod ___detail {
3369 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::FactoryItems
3370 where
3371 ___T: ::fidl_next::Transport,
3372 {
3373 type Client = FactoryItemsClient<___T>;
3374 type Server = FactoryItemsServer<___T>;
3375 }
3376
3377 #[repr(transparent)]
3379 pub struct FactoryItemsClient<___T: ::fidl_next::Transport> {
3380 #[allow(dead_code)]
3381 client: ::fidl_next::protocol::Client<___T>,
3382 }
3383
3384 impl<___T> FactoryItemsClient<___T>
3385 where
3386 ___T: ::fidl_next::Transport,
3387 {
3388 #[doc = " Gets a `payload` for a `ZBI_TYPE_STORAGE_BOOTFS_FACTORY` boot item with\n extra field set to `extra`.\n\n NOTE: We return the `length` of the item, as VMOs must be page-aligned.\n"]
3389 pub fn get(
3390 &self,
3391
3392 extra: impl ::fidl_next::Encode<
3393 ::fidl_next::wire::Uint32,
3394 <___T as ::fidl_next::Transport>::SendBuffer,
3395 >,
3396 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
3397 where
3398 <___T as ::fidl_next::Transport>::SendBuffer:
3399 ::fidl_next::encoder::InternalHandleEncoder,
3400 {
3401 self.get_with(crate::generic::FactoryItemsGetRequest { extra })
3402 }
3403
3404 #[doc = " Gets a `payload` for a `ZBI_TYPE_STORAGE_BOOTFS_FACTORY` boot item with\n extra field set to `extra`.\n\n NOTE: We return the `length` of the item, as VMOs must be page-aligned.\n"]
3405 pub fn get_with<___R>(
3406 &self,
3407 request: ___R,
3408 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
3409 where
3410 ___R: ::fidl_next::Encode<
3411 crate::wire::FactoryItemsGetRequest,
3412 <___T as ::fidl_next::Transport>::SendBuffer,
3413 >,
3414 {
3415 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3416 3390589410134308569,
3417 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
3418 request,
3419 ))
3420 }
3421 }
3422
3423 #[repr(transparent)]
3425 pub struct FactoryItemsServer<___T: ::fidl_next::Transport> {
3426 server: ::fidl_next::protocol::Server<___T>,
3427 }
3428
3429 impl<___T> FactoryItemsServer<___T> where ___T: ::fidl_next::Transport {}
3430 }
3431}
3432
3433#[diagnostic::on_unimplemented(
3434 note = "If {Self} implements the non-local FactoryItemsClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3435)]
3436
3437pub trait FactoryItemsLocalClientHandler<
3441 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3442 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3443>
3444{
3445}
3446
3447impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for FactoryItems
3448where
3449 ___H: FactoryItemsLocalClientHandler<___T>,
3450 ___T: ::fidl_next::Transport,
3451{
3452 async fn on_event(
3453 handler: &mut ___H,
3454 mut message: ::fidl_next::Message<___T>,
3455 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3456 match *message.header().ordinal {
3457 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3458 }
3459 }
3460}
3461
3462#[diagnostic::on_unimplemented(
3463 note = "If {Self} implements the non-local FactoryItemsServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3464)]
3465
3466pub trait FactoryItemsLocalServerHandler<
3470 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3471 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3472>
3473{
3474 #[doc = " Gets a `payload` for a `ZBI_TYPE_STORAGE_BOOTFS_FACTORY` boot item with\n extra field set to `extra`.\n\n NOTE: We return the `length` of the item, as VMOs must be page-aligned.\n"]
3475 fn get(
3476 &mut self,
3477
3478 request: ::fidl_next::Request<factory_items::Get, ___T>,
3479
3480 responder: ::fidl_next::Responder<factory_items::Get, ___T>,
3481 ) -> impl ::core::future::Future<Output = ()>;
3482}
3483
3484impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for FactoryItems
3485where
3486 ___H: FactoryItemsLocalServerHandler<___T>,
3487 ___T: ::fidl_next::Transport,
3488 for<'de> crate::wire::FactoryItemsGetRequest: ::fidl_next::Decode<
3489 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3490 Constraint = (),
3491 >,
3492{
3493 async fn on_one_way(
3494 handler: &mut ___H,
3495 mut message: ::fidl_next::Message<___T>,
3496 ) -> ::core::result::Result<
3497 (),
3498 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3499 > {
3500 match *message.header().ordinal {
3501 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3502 }
3503 }
3504
3505 async fn on_two_way(
3506 handler: &mut ___H,
3507 mut message: ::fidl_next::Message<___T>,
3508 responder: ::fidl_next::protocol::Responder<___T>,
3509 ) -> ::core::result::Result<
3510 (),
3511 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3512 > {
3513 match *message.header().ordinal {
3514 3390589410134308569 => {
3515 let responder = ::fidl_next::Responder::from_untyped(responder);
3516
3517 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3518 Ok(decoded) => {
3519 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
3520 Ok(())
3521 }
3522 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3523 ordinal: 3390589410134308569,
3524 error,
3525 }),
3526 }
3527 }
3528
3529 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3530 }
3531 }
3532}
3533
3534pub trait FactoryItemsClientHandler<
3538 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3539 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3540>
3541{
3542}
3543
3544impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for FactoryItems
3545where
3546 ___H: FactoryItemsClientHandler<___T> + ::core::marker::Send,
3547 ___T: ::fidl_next::Transport,
3548{
3549 async fn on_event(
3550 handler: &mut ___H,
3551 mut message: ::fidl_next::Message<___T>,
3552 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3553 match *message.header().ordinal {
3554 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3555 }
3556 }
3557}
3558
3559pub trait FactoryItemsServerHandler<
3563 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3564 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3565>
3566{
3567 #[doc = " Gets a `payload` for a `ZBI_TYPE_STORAGE_BOOTFS_FACTORY` boot item with\n extra field set to `extra`.\n\n NOTE: We return the `length` of the item, as VMOs must be page-aligned.\n"]
3568 fn get(
3569 &mut self,
3570
3571 request: ::fidl_next::Request<factory_items::Get, ___T>,
3572
3573 responder: ::fidl_next::Responder<factory_items::Get, ___T>,
3574 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3575}
3576
3577impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for FactoryItems
3578where
3579 ___H: FactoryItemsServerHandler<___T> + ::core::marker::Send,
3580 ___T: ::fidl_next::Transport,
3581 for<'de> crate::wire::FactoryItemsGetRequest: ::fidl_next::Decode<
3582 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3583 Constraint = (),
3584 >,
3585{
3586 async fn on_one_way(
3587 handler: &mut ___H,
3588 mut message: ::fidl_next::Message<___T>,
3589 ) -> ::core::result::Result<
3590 (),
3591 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3592 > {
3593 match *message.header().ordinal {
3594 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3595 }
3596 }
3597
3598 async fn on_two_way(
3599 handler: &mut ___H,
3600 mut message: ::fidl_next::Message<___T>,
3601 responder: ::fidl_next::protocol::Responder<___T>,
3602 ) -> ::core::result::Result<
3603 (),
3604 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3605 > {
3606 match *message.header().ordinal {
3607 3390589410134308569 => {
3608 let responder = ::fidl_next::Responder::from_untyped(responder);
3609
3610 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3611 Ok(decoded) => {
3612 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
3613 Ok(())
3614 }
3615 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3616 ordinal: 3390589410134308569,
3617 error,
3618 }),
3619 }
3620 }
3621
3622 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3623 }
3624 }
3625}
3626
3627impl<___T> FactoryItemsClientHandler<___T> for ::fidl_next::IgnoreEvents where
3628 ___T: ::fidl_next::Transport
3629{
3630}
3631
3632impl<___H, ___T> FactoryItemsLocalClientHandler<___T> for ::fidl_next::Local<___H>
3633where
3634 ___H: FactoryItemsClientHandler<___T>,
3635 ___T: ::fidl_next::Transport,
3636{
3637}
3638
3639impl<___H, ___T> FactoryItemsLocalServerHandler<___T> for ::fidl_next::Local<___H>
3640where
3641 ___H: FactoryItemsServerHandler<___T>,
3642 ___T: ::fidl_next::Transport,
3643{
3644 async fn get(
3645 &mut self,
3646
3647 request: ::fidl_next::Request<factory_items::Get, ___T>,
3648
3649 responder: ::fidl_next::Responder<factory_items::Get, ___T>,
3650 ) {
3651 ___H::get(&mut self.0, request, responder).await
3652 }
3653}
3654
3655#[doc = " Protocol for retrieving boot item payloads.\n"]
3657#[derive(PartialEq, Debug)]
3658pub struct Items;
3659
3660impl ::fidl_next::Discoverable for Items {
3661 const PROTOCOL_NAME: &'static str = "fuchsia.boot.Items";
3662}
3663
3664#[cfg(target_os = "fuchsia")]
3665impl ::fidl_next::HasTransport for Items {
3666 type Transport = ::fidl_next::fuchsia::zx::Channel;
3667}
3668
3669pub mod items {
3670 pub mod prelude {
3671 pub use crate::{
3672 Items, ItemsClientHandler, ItemsLocalClientHandler, ItemsLocalServerHandler,
3673 ItemsServerHandler, items,
3674 };
3675
3676 pub use crate::natural::ItemsGet2Request;
3677
3678 pub use crate::natural::ItemsGetBootloaderFileRequest;
3679
3680 pub use crate::natural::ItemsGetBootloaderFileResponse;
3681
3682 pub use crate::natural::ItemsGetRequest;
3683
3684 pub use crate::natural::ItemsGetResponse;
3685
3686 pub use crate::natural::ItemsGet2Response;
3687 }
3688
3689 pub struct Get;
3690
3691 impl ::fidl_next::Method for Get {
3692 const ORDINAL: u64 = 6065702122792689372;
3693 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3694 ::fidl_next::protocol::Flexibility::Strict;
3695
3696 type Protocol = crate::Items;
3697
3698 type Request = crate::wire::ItemsGetRequest;
3699 }
3700
3701 impl ::fidl_next::TwoWayMethod for Get {
3702 type Response = ::fidl_next::wire::Strict<crate::wire::ItemsGetResponse>;
3703 }
3704
3705 impl<___R> ::fidl_next::Respond<___R> for Get {
3706 type Output = ::fidl_next::Strict<___R>;
3707
3708 fn respond(response: ___R) -> Self::Output {
3709 ::fidl_next::Strict(response)
3710 }
3711 }
3712
3713 pub struct Get2;
3714
3715 impl ::fidl_next::Method for Get2 {
3716 const ORDINAL: u64 = 3054774473899786030;
3717 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3718 ::fidl_next::protocol::Flexibility::Strict;
3719
3720 type Protocol = crate::Items;
3721
3722 type Request = crate::wire::ItemsGet2Request<'static>;
3723 }
3724
3725 impl ::fidl_next::TwoWayMethod for Get2 {
3726 type Response = ::fidl_next::wire::Result<
3727 'static,
3728 crate::wire::ItemsGet2Response<'static>,
3729 ::fidl_next::wire::fuchsia::Status,
3730 >;
3731 }
3732
3733 impl<___R> ::fidl_next::Respond<___R> for Get2 {
3734 type Output = ::core::result::Result<
3735 crate::generic::ItemsGet2Response<___R>,
3736 ::fidl_next::never::Never,
3737 >;
3738
3739 fn respond(response: ___R) -> Self::Output {
3740 ::core::result::Result::Ok(crate::generic::ItemsGet2Response {
3741 retrieved_items: response,
3742 })
3743 }
3744 }
3745
3746 impl<___R> ::fidl_next::RespondErr<___R> for Get2 {
3747 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3748
3749 fn respond_err(response: ___R) -> Self::Output {
3750 ::core::result::Result::Err(response)
3751 }
3752 }
3753
3754 pub struct GetBootloaderFile;
3755
3756 impl ::fidl_next::Method for GetBootloaderFile {
3757 const ORDINAL: u64 = 6485268897983860364;
3758 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3759 ::fidl_next::protocol::Flexibility::Strict;
3760
3761 type Protocol = crate::Items;
3762
3763 type Request = crate::wire::ItemsGetBootloaderFileRequest<'static>;
3764 }
3765
3766 impl ::fidl_next::TwoWayMethod for GetBootloaderFile {
3767 type Response = ::fidl_next::wire::Strict<crate::wire::ItemsGetBootloaderFileResponse>;
3768 }
3769
3770 impl<___R> ::fidl_next::Respond<___R> for GetBootloaderFile {
3771 type Output = ::fidl_next::Strict<crate::generic::ItemsGetBootloaderFileResponse<___R>>;
3772
3773 fn respond(response: ___R) -> Self::Output {
3774 ::fidl_next::Strict(crate::generic::ItemsGetBootloaderFileResponse {
3775 payload: response,
3776 })
3777 }
3778 }
3779
3780 mod ___detail {
3781 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Items
3782 where
3783 ___T: ::fidl_next::Transport,
3784 {
3785 type Client = ItemsClient<___T>;
3786 type Server = ItemsServer<___T>;
3787 }
3788
3789 #[repr(transparent)]
3791 pub struct ItemsClient<___T: ::fidl_next::Transport> {
3792 #[allow(dead_code)]
3793 client: ::fidl_next::protocol::Client<___T>,
3794 }
3795
3796 impl<___T> ItemsClient<___T>
3797 where
3798 ___T: ::fidl_next::Transport,
3799 {
3800 #[doc = " Get a `payload` for a boot item of `type` and `extra`.\n NOTE: We return the `length` of the item, as VMOs must be page-aligned.\n\n TODO: Refactor API: https://fxbug.dev/42109921\n\n For a list of `type`s, refer to <lib/zbi-format/zbi.h>.\n For a list of `extra`s, refer to <lib/zbi-format/driver-config.h>.\n"]
3801 pub fn get(
3802 &self,
3803
3804 type_: impl ::fidl_next::Encode<
3805 ::fidl_next::wire::Uint32,
3806 <___T as ::fidl_next::Transport>::SendBuffer,
3807 >,
3808
3809 extra: impl ::fidl_next::Encode<
3810 ::fidl_next::wire::Uint32,
3811 <___T as ::fidl_next::Transport>::SendBuffer,
3812 >,
3813 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
3814 where
3815 <___T as ::fidl_next::Transport>::SendBuffer:
3816 ::fidl_next::encoder::InternalHandleEncoder,
3817 {
3818 self.get_with(crate::generic::ItemsGetRequest { type_, extra })
3819 }
3820
3821 #[doc = " Get a `payload` for a boot item of `type` and `extra`.\n NOTE: We return the `length` of the item, as VMOs must be page-aligned.\n\n TODO: Refactor API: https://fxbug.dev/42109921\n\n For a list of `type`s, refer to <lib/zbi-format/zbi.h>.\n For a list of `extra`s, refer to <lib/zbi-format/driver-config.h>.\n"]
3822 pub fn get_with<___R>(
3823 &self,
3824 request: ___R,
3825 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
3826 where
3827 ___R: ::fidl_next::Encode<
3828 crate::wire::ItemsGetRequest,
3829 <___T as ::fidl_next::Transport>::SendBuffer,
3830 >,
3831 {
3832 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3833 6065702122792689372,
3834 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
3835 request,
3836 ))
3837 }
3838
3839 #[doc = " Get all stored items of `type`, optionally also restricted by `extra`. Note that\n length is returned for each item as VMOs are page-aligned.\n\n Returns ZX_ERR_NOT_SUPPORTED if this is an untracked item which will never be stored.\n"]
3840 pub fn get2(
3841 &self,
3842
3843 type_: impl ::fidl_next::Encode<
3844 ::fidl_next::wire::Uint32,
3845 <___T as ::fidl_next::Transport>::SendBuffer,
3846 >,
3847
3848 extra: impl ::fidl_next::Encode<
3849 ::fidl_next::wire::Box<'static, crate::wire::Extra>,
3850 <___T as ::fidl_next::Transport>::SendBuffer,
3851 >,
3852 ) -> ::fidl_next::TwoWayFuture<'_, super::Get2, ___T>
3853 where
3854 <___T as ::fidl_next::Transport>::SendBuffer:
3855 ::fidl_next::encoder::InternalHandleEncoder,
3856 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3857 {
3858 self.get2_with(crate::generic::ItemsGet2Request { type_, extra })
3859 }
3860
3861 #[doc = " Get all stored items of `type`, optionally also restricted by `extra`. Note that\n length is returned for each item as VMOs are page-aligned.\n\n Returns ZX_ERR_NOT_SUPPORTED if this is an untracked item which will never be stored.\n"]
3862 pub fn get2_with<___R>(
3863 &self,
3864 request: ___R,
3865 ) -> ::fidl_next::TwoWayFuture<'_, super::Get2, ___T>
3866 where
3867 ___R: ::fidl_next::Encode<
3868 crate::wire::ItemsGet2Request<'static>,
3869 <___T as ::fidl_next::Transport>::SendBuffer,
3870 >,
3871 {
3872 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3873 3054774473899786030,
3874 <super::Get2 as ::fidl_next::Method>::FLEXIBILITY,
3875 request,
3876 ))
3877 }
3878
3879 #[doc = " Gets the `payload` for a `ZBI_TYPE_BOOTLOADER_FILE` boot item.\n Note: ZX_PROP_VMO_CONTENT_SIZE will be set to the actual file content size\n"]
3880 pub fn get_bootloader_file(
3881 &self,
3882
3883 filename: impl ::fidl_next::Encode<
3884 ::fidl_next::wire::String<'static>,
3885 <___T as ::fidl_next::Transport>::SendBuffer,
3886 >,
3887 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBootloaderFile, ___T>
3888 where
3889 <___T as ::fidl_next::Transport>::SendBuffer:
3890 ::fidl_next::encoder::InternalHandleEncoder,
3891 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3892 {
3893 self.get_bootloader_file_with(crate::generic::ItemsGetBootloaderFileRequest {
3894 filename,
3895 })
3896 }
3897
3898 #[doc = " Gets the `payload` for a `ZBI_TYPE_BOOTLOADER_FILE` boot item.\n Note: ZX_PROP_VMO_CONTENT_SIZE will be set to the actual file content size\n"]
3899 pub fn get_bootloader_file_with<___R>(
3900 &self,
3901 request: ___R,
3902 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBootloaderFile, ___T>
3903 where
3904 ___R: ::fidl_next::Encode<
3905 crate::wire::ItemsGetBootloaderFileRequest<'static>,
3906 <___T as ::fidl_next::Transport>::SendBuffer,
3907 >,
3908 {
3909 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3910 6485268897983860364,
3911 <super::GetBootloaderFile as ::fidl_next::Method>::FLEXIBILITY,
3912 request,
3913 ))
3914 }
3915 }
3916
3917 #[repr(transparent)]
3919 pub struct ItemsServer<___T: ::fidl_next::Transport> {
3920 server: ::fidl_next::protocol::Server<___T>,
3921 }
3922
3923 impl<___T> ItemsServer<___T> where ___T: ::fidl_next::Transport {}
3924 }
3925}
3926
3927#[diagnostic::on_unimplemented(
3928 note = "If {Self} implements the non-local ItemsClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3929)]
3930
3931pub trait ItemsLocalClientHandler<
3935 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3936 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3937>
3938{
3939}
3940
3941impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Items
3942where
3943 ___H: ItemsLocalClientHandler<___T>,
3944 ___T: ::fidl_next::Transport,
3945{
3946 async fn on_event(
3947 handler: &mut ___H,
3948 mut message: ::fidl_next::Message<___T>,
3949 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3950 match *message.header().ordinal {
3951 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3952 }
3953 }
3954}
3955
3956#[diagnostic::on_unimplemented(
3957 note = "If {Self} implements the non-local ItemsServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3958)]
3959
3960pub trait ItemsLocalServerHandler<
3964 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3965 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3966>
3967{
3968 #[doc = " Get a `payload` for a boot item of `type` and `extra`.\n NOTE: We return the `length` of the item, as VMOs must be page-aligned.\n\n TODO: Refactor API: https://fxbug.dev/42109921\n\n For a list of `type`s, refer to <lib/zbi-format/zbi.h>.\n For a list of `extra`s, refer to <lib/zbi-format/driver-config.h>.\n"]
3969 fn get(
3970 &mut self,
3971
3972 request: ::fidl_next::Request<items::Get, ___T>,
3973
3974 responder: ::fidl_next::Responder<items::Get, ___T>,
3975 ) -> impl ::core::future::Future<Output = ()>;
3976
3977 #[doc = " Get all stored items of `type`, optionally also restricted by `extra`. Note that\n length is returned for each item as VMOs are page-aligned.\n\n Returns ZX_ERR_NOT_SUPPORTED if this is an untracked item which will never be stored.\n"]
3978 fn get2(
3979 &mut self,
3980
3981 request: ::fidl_next::Request<items::Get2, ___T>,
3982
3983 responder: ::fidl_next::Responder<items::Get2, ___T>,
3984 ) -> impl ::core::future::Future<Output = ()>;
3985
3986 #[doc = " Gets the `payload` for a `ZBI_TYPE_BOOTLOADER_FILE` boot item.\n Note: ZX_PROP_VMO_CONTENT_SIZE will be set to the actual file content size\n"]
3987 fn get_bootloader_file(
3988 &mut self,
3989
3990 request: ::fidl_next::Request<items::GetBootloaderFile, ___T>,
3991
3992 responder: ::fidl_next::Responder<items::GetBootloaderFile, ___T>,
3993 ) -> impl ::core::future::Future<Output = ()>;
3994}
3995
3996impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Items
3997where
3998 ___H: ItemsLocalServerHandler<___T>,
3999 ___T: ::fidl_next::Transport,
4000 for<'de> crate::wire::ItemsGetRequest: ::fidl_next::Decode<
4001 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4002 Constraint = (),
4003 >,
4004 for<'de> crate::wire::ItemsGet2Request<'de>: ::fidl_next::Decode<
4005 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4006 Constraint = (),
4007 >,
4008 for<'de> crate::wire::ItemsGetBootloaderFileRequest<'de>: ::fidl_next::Decode<
4009 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4010 Constraint = (),
4011 >,
4012{
4013 async fn on_one_way(
4014 handler: &mut ___H,
4015 mut message: ::fidl_next::Message<___T>,
4016 ) -> ::core::result::Result<
4017 (),
4018 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4019 > {
4020 match *message.header().ordinal {
4021 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4022 }
4023 }
4024
4025 async fn on_two_way(
4026 handler: &mut ___H,
4027 mut message: ::fidl_next::Message<___T>,
4028 responder: ::fidl_next::protocol::Responder<___T>,
4029 ) -> ::core::result::Result<
4030 (),
4031 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4032 > {
4033 match *message.header().ordinal {
4034 6065702122792689372 => {
4035 let responder = ::fidl_next::Responder::from_untyped(responder);
4036
4037 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4038 Ok(decoded) => {
4039 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
4040 Ok(())
4041 }
4042 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4043 ordinal: 6065702122792689372,
4044 error,
4045 }),
4046 }
4047 }
4048
4049 3054774473899786030 => {
4050 let responder = ::fidl_next::Responder::from_untyped(responder);
4051
4052 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4053 Ok(decoded) => {
4054 handler.get2(::fidl_next::Request::from_decoded(decoded), responder).await;
4055 Ok(())
4056 }
4057 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4058 ordinal: 3054774473899786030,
4059 error,
4060 }),
4061 }
4062 }
4063
4064 6485268897983860364 => {
4065 let responder = ::fidl_next::Responder::from_untyped(responder);
4066
4067 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4068 Ok(decoded) => {
4069 handler
4070 .get_bootloader_file(
4071 ::fidl_next::Request::from_decoded(decoded),
4072 responder,
4073 )
4074 .await;
4075 Ok(())
4076 }
4077 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4078 ordinal: 6485268897983860364,
4079 error,
4080 }),
4081 }
4082 }
4083
4084 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4085 }
4086 }
4087}
4088
4089pub trait ItemsClientHandler<
4093 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4094 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4095>
4096{
4097}
4098
4099impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Items
4100where
4101 ___H: ItemsClientHandler<___T> + ::core::marker::Send,
4102 ___T: ::fidl_next::Transport,
4103{
4104 async fn on_event(
4105 handler: &mut ___H,
4106 mut message: ::fidl_next::Message<___T>,
4107 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4108 match *message.header().ordinal {
4109 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4110 }
4111 }
4112}
4113
4114pub trait ItemsServerHandler<
4118 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4119 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4120>
4121{
4122 #[doc = " Get a `payload` for a boot item of `type` and `extra`.\n NOTE: We return the `length` of the item, as VMOs must be page-aligned.\n\n TODO: Refactor API: https://fxbug.dev/42109921\n\n For a list of `type`s, refer to <lib/zbi-format/zbi.h>.\n For a list of `extra`s, refer to <lib/zbi-format/driver-config.h>.\n"]
4123 fn get(
4124 &mut self,
4125
4126 request: ::fidl_next::Request<items::Get, ___T>,
4127
4128 responder: ::fidl_next::Responder<items::Get, ___T>,
4129 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4130
4131 #[doc = " Get all stored items of `type`, optionally also restricted by `extra`. Note that\n length is returned for each item as VMOs are page-aligned.\n\n Returns ZX_ERR_NOT_SUPPORTED if this is an untracked item which will never be stored.\n"]
4132 fn get2(
4133 &mut self,
4134
4135 request: ::fidl_next::Request<items::Get2, ___T>,
4136
4137 responder: ::fidl_next::Responder<items::Get2, ___T>,
4138 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4139
4140 #[doc = " Gets the `payload` for a `ZBI_TYPE_BOOTLOADER_FILE` boot item.\n Note: ZX_PROP_VMO_CONTENT_SIZE will be set to the actual file content size\n"]
4141 fn get_bootloader_file(
4142 &mut self,
4143
4144 request: ::fidl_next::Request<items::GetBootloaderFile, ___T>,
4145
4146 responder: ::fidl_next::Responder<items::GetBootloaderFile, ___T>,
4147 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4148}
4149
4150impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Items
4151where
4152 ___H: ItemsServerHandler<___T> + ::core::marker::Send,
4153 ___T: ::fidl_next::Transport,
4154 for<'de> crate::wire::ItemsGetRequest: ::fidl_next::Decode<
4155 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4156 Constraint = (),
4157 >,
4158 for<'de> crate::wire::ItemsGet2Request<'de>: ::fidl_next::Decode<
4159 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4160 Constraint = (),
4161 >,
4162 for<'de> crate::wire::ItemsGetBootloaderFileRequest<'de>: ::fidl_next::Decode<
4163 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4164 Constraint = (),
4165 >,
4166{
4167 async fn on_one_way(
4168 handler: &mut ___H,
4169 mut message: ::fidl_next::Message<___T>,
4170 ) -> ::core::result::Result<
4171 (),
4172 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4173 > {
4174 match *message.header().ordinal {
4175 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4176 }
4177 }
4178
4179 async fn on_two_way(
4180 handler: &mut ___H,
4181 mut message: ::fidl_next::Message<___T>,
4182 responder: ::fidl_next::protocol::Responder<___T>,
4183 ) -> ::core::result::Result<
4184 (),
4185 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4186 > {
4187 match *message.header().ordinal {
4188 6065702122792689372 => {
4189 let responder = ::fidl_next::Responder::from_untyped(responder);
4190
4191 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4192 Ok(decoded) => {
4193 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
4194 Ok(())
4195 }
4196 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4197 ordinal: 6065702122792689372,
4198 error,
4199 }),
4200 }
4201 }
4202
4203 3054774473899786030 => {
4204 let responder = ::fidl_next::Responder::from_untyped(responder);
4205
4206 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4207 Ok(decoded) => {
4208 handler.get2(::fidl_next::Request::from_decoded(decoded), responder).await;
4209 Ok(())
4210 }
4211 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4212 ordinal: 3054774473899786030,
4213 error,
4214 }),
4215 }
4216 }
4217
4218 6485268897983860364 => {
4219 let responder = ::fidl_next::Responder::from_untyped(responder);
4220
4221 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4222 Ok(decoded) => {
4223 handler
4224 .get_bootloader_file(
4225 ::fidl_next::Request::from_decoded(decoded),
4226 responder,
4227 )
4228 .await;
4229 Ok(())
4230 }
4231 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4232 ordinal: 6485268897983860364,
4233 error,
4234 }),
4235 }
4236 }
4237
4238 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4239 }
4240 }
4241}
4242
4243impl<___T> ItemsClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
4244
4245impl<___H, ___T> ItemsLocalClientHandler<___T> for ::fidl_next::Local<___H>
4246where
4247 ___H: ItemsClientHandler<___T>,
4248 ___T: ::fidl_next::Transport,
4249{
4250}
4251
4252impl<___H, ___T> ItemsLocalServerHandler<___T> for ::fidl_next::Local<___H>
4253where
4254 ___H: ItemsServerHandler<___T>,
4255 ___T: ::fidl_next::Transport,
4256{
4257 async fn get(
4258 &mut self,
4259
4260 request: ::fidl_next::Request<items::Get, ___T>,
4261
4262 responder: ::fidl_next::Responder<items::Get, ___T>,
4263 ) {
4264 ___H::get(&mut self.0, request, responder).await
4265 }
4266
4267 async fn get2(
4268 &mut self,
4269
4270 request: ::fidl_next::Request<items::Get2, ___T>,
4271
4272 responder: ::fidl_next::Responder<items::Get2, ___T>,
4273 ) {
4274 ___H::get2(&mut self.0, request, responder).await
4275 }
4276
4277 async fn get_bootloader_file(
4278 &mut self,
4279
4280 request: ::fidl_next::Request<items::GetBootloaderFile, ___T>,
4281
4282 responder: ::fidl_next::Responder<items::GetBootloaderFile, ___T>,
4283 ) {
4284 ___H::get_bootloader_file(&mut self.0, request, responder).await
4285 }
4286}
4287
4288#[doc = " Protocol for providing the kernel log, readable.\n"]
4290#[derive(PartialEq, Debug)]
4291pub struct ReadOnlyLog;
4292
4293impl ::fidl_next::Discoverable for ReadOnlyLog {
4294 const PROTOCOL_NAME: &'static str = "fuchsia.boot.ReadOnlyLog";
4295}
4296
4297#[cfg(target_os = "fuchsia")]
4298impl ::fidl_next::HasTransport for ReadOnlyLog {
4299 type Transport = ::fidl_next::fuchsia::zx::Channel;
4300}
4301
4302pub mod read_only_log {
4303 pub mod prelude {
4304 pub use crate::{
4305 ReadOnlyLog, ReadOnlyLogClientHandler, ReadOnlyLogLocalClientHandler,
4306 ReadOnlyLogLocalServerHandler, ReadOnlyLogServerHandler, read_only_log,
4307 };
4308
4309 pub use crate::natural::ReadOnlyLogGetResponse;
4310 }
4311
4312 pub struct Get;
4313
4314 impl ::fidl_next::Method for Get {
4315 const ORDINAL: u64 = 8015540534685233663;
4316 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4317 ::fidl_next::protocol::Flexibility::Strict;
4318
4319 type Protocol = crate::ReadOnlyLog;
4320
4321 type Request = ::fidl_next::wire::EmptyMessageBody;
4322 }
4323
4324 impl ::fidl_next::TwoWayMethod for Get {
4325 type Response = ::fidl_next::wire::Strict<crate::wire::ReadOnlyLogGetResponse>;
4326 }
4327
4328 impl<___R> ::fidl_next::Respond<___R> for Get {
4329 type Output = ::fidl_next::Strict<crate::generic::ReadOnlyLogGetResponse<___R>>;
4330
4331 fn respond(response: ___R) -> Self::Output {
4332 ::fidl_next::Strict(crate::generic::ReadOnlyLogGetResponse { log: response })
4333 }
4334 }
4335
4336 mod ___detail {
4337 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ReadOnlyLog
4338 where
4339 ___T: ::fidl_next::Transport,
4340 {
4341 type Client = ReadOnlyLogClient<___T>;
4342 type Server = ReadOnlyLogServer<___T>;
4343 }
4344
4345 #[repr(transparent)]
4347 pub struct ReadOnlyLogClient<___T: ::fidl_next::Transport> {
4348 #[allow(dead_code)]
4349 client: ::fidl_next::protocol::Client<___T>,
4350 }
4351
4352 impl<___T> ReadOnlyLogClient<___T>
4353 where
4354 ___T: ::fidl_next::Transport,
4355 {
4356 #[doc = " Get read-only handle to the kernel `log`.\n"]
4357 pub fn get(&self) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T> {
4358 ::fidl_next::TwoWayFuture::from_untyped(
4359 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4360 8015540534685233663,
4361 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
4362 (),
4363 ),
4364 )
4365 }
4366 }
4367
4368 #[repr(transparent)]
4370 pub struct ReadOnlyLogServer<___T: ::fidl_next::Transport> {
4371 server: ::fidl_next::protocol::Server<___T>,
4372 }
4373
4374 impl<___T> ReadOnlyLogServer<___T> where ___T: ::fidl_next::Transport {}
4375 }
4376}
4377
4378#[diagnostic::on_unimplemented(
4379 note = "If {Self} implements the non-local ReadOnlyLogClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4380)]
4381
4382pub trait ReadOnlyLogLocalClientHandler<
4386 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4387 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4388>
4389{
4390}
4391
4392impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ReadOnlyLog
4393where
4394 ___H: ReadOnlyLogLocalClientHandler<___T>,
4395 ___T: ::fidl_next::Transport,
4396{
4397 async fn on_event(
4398 handler: &mut ___H,
4399 mut message: ::fidl_next::Message<___T>,
4400 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4401 match *message.header().ordinal {
4402 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4403 }
4404 }
4405}
4406
4407#[diagnostic::on_unimplemented(
4408 note = "If {Self} implements the non-local ReadOnlyLogServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4409)]
4410
4411pub trait ReadOnlyLogLocalServerHandler<
4415 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4416 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4417>
4418{
4419 #[doc = " Get read-only handle to the kernel `log`.\n"]
4420 fn get(
4421 &mut self,
4422
4423 responder: ::fidl_next::Responder<read_only_log::Get, ___T>,
4424 ) -> impl ::core::future::Future<Output = ()>;
4425}
4426
4427impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ReadOnlyLog
4428where
4429 ___H: ReadOnlyLogLocalServerHandler<___T>,
4430 ___T: ::fidl_next::Transport,
4431{
4432 async fn on_one_way(
4433 handler: &mut ___H,
4434 mut message: ::fidl_next::Message<___T>,
4435 ) -> ::core::result::Result<
4436 (),
4437 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4438 > {
4439 match *message.header().ordinal {
4440 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4441 }
4442 }
4443
4444 async fn on_two_way(
4445 handler: &mut ___H,
4446 mut message: ::fidl_next::Message<___T>,
4447 responder: ::fidl_next::protocol::Responder<___T>,
4448 ) -> ::core::result::Result<
4449 (),
4450 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4451 > {
4452 match *message.header().ordinal {
4453 8015540534685233663 => {
4454 let responder = ::fidl_next::Responder::from_untyped(responder);
4455
4456 handler.get(responder).await;
4457 Ok(())
4458 }
4459
4460 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4461 }
4462 }
4463}
4464
4465pub trait ReadOnlyLogClientHandler<
4469 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4470 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4471>
4472{
4473}
4474
4475impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ReadOnlyLog
4476where
4477 ___H: ReadOnlyLogClientHandler<___T> + ::core::marker::Send,
4478 ___T: ::fidl_next::Transport,
4479{
4480 async fn on_event(
4481 handler: &mut ___H,
4482 mut message: ::fidl_next::Message<___T>,
4483 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4484 match *message.header().ordinal {
4485 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4486 }
4487 }
4488}
4489
4490pub trait ReadOnlyLogServerHandler<
4494 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4495 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4496>
4497{
4498 #[doc = " Get read-only handle to the kernel `log`.\n"]
4499 fn get(
4500 &mut self,
4501
4502 responder: ::fidl_next::Responder<read_only_log::Get, ___T>,
4503 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4504}
4505
4506impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ReadOnlyLog
4507where
4508 ___H: ReadOnlyLogServerHandler<___T> + ::core::marker::Send,
4509 ___T: ::fidl_next::Transport,
4510{
4511 async fn on_one_way(
4512 handler: &mut ___H,
4513 mut message: ::fidl_next::Message<___T>,
4514 ) -> ::core::result::Result<
4515 (),
4516 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4517 > {
4518 match *message.header().ordinal {
4519 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4520 }
4521 }
4522
4523 async fn on_two_way(
4524 handler: &mut ___H,
4525 mut message: ::fidl_next::Message<___T>,
4526 responder: ::fidl_next::protocol::Responder<___T>,
4527 ) -> ::core::result::Result<
4528 (),
4529 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4530 > {
4531 match *message.header().ordinal {
4532 8015540534685233663 => {
4533 let responder = ::fidl_next::Responder::from_untyped(responder);
4534
4535 handler.get(responder).await;
4536 Ok(())
4537 }
4538
4539 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4540 }
4541 }
4542}
4543
4544impl<___T> ReadOnlyLogClientHandler<___T> for ::fidl_next::IgnoreEvents where
4545 ___T: ::fidl_next::Transport
4546{
4547}
4548
4549impl<___H, ___T> ReadOnlyLogLocalClientHandler<___T> for ::fidl_next::Local<___H>
4550where
4551 ___H: ReadOnlyLogClientHandler<___T>,
4552 ___T: ::fidl_next::Transport,
4553{
4554}
4555
4556impl<___H, ___T> ReadOnlyLogLocalServerHandler<___T> for ::fidl_next::Local<___H>
4557where
4558 ___H: ReadOnlyLogServerHandler<___T>,
4559 ___T: ::fidl_next::Transport,
4560{
4561 async fn get(&mut self, responder: ::fidl_next::Responder<read_only_log::Get, ___T>) {
4562 ___H::get(&mut self.0, responder).await
4563 }
4564}
4565
4566#[doc = " Protocol for storing svc server ends of \'svc\' for later processing during early boot.\n"]
4568#[derive(PartialEq, Debug)]
4569pub struct SvcStash;
4570
4571#[cfg(target_os = "fuchsia")]
4572impl ::fidl_next::HasTransport for SvcStash {
4573 type Transport = ::fidl_next::fuchsia::zx::Channel;
4574}
4575
4576pub mod svc_stash {
4577 pub mod prelude {
4578 pub use crate::{
4579 SvcStash, SvcStashClientHandler, SvcStashLocalClientHandler,
4580 SvcStashLocalServerHandler, SvcStashServerHandler, svc_stash,
4581 };
4582
4583 pub use crate::natural::SvcStashStoreRequest;
4584 }
4585
4586 pub struct Store;
4587
4588 impl ::fidl_next::Method for Store {
4589 const ORDINAL: u64 = 875467318821005424;
4590 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4591 ::fidl_next::protocol::Flexibility::Strict;
4592
4593 type Protocol = crate::SvcStash;
4594
4595 type Request = crate::wire::SvcStashStoreRequest;
4596 }
4597
4598 mod ___detail {
4599 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::SvcStash
4600 where
4601 ___T: ::fidl_next::Transport,
4602 {
4603 type Client = SvcStashClient<___T>;
4604 type Server = SvcStashServer<___T>;
4605 }
4606
4607 #[repr(transparent)]
4609 pub struct SvcStashClient<___T: ::fidl_next::Transport> {
4610 #[allow(dead_code)]
4611 client: ::fidl_next::protocol::Client<___T>,
4612 }
4613
4614 impl<___T> SvcStashClient<___T>
4615 where
4616 ___T: ::fidl_next::Transport,
4617 {
4618 #[doc = " Store a svc_endpoint in the stash. Stored endpoints will remain in transit,\n since there might not be a server side implementation. The server end\n is retrieved by |SvcStashProvider/Get|.\n"]
4619 pub fn store(
4620 &self,
4621
4622 svc_endpoint: impl ::fidl_next::Encode<
4623 ::fidl_next::ServerEnd<
4624 ::fidl_next_fuchsia_io::Directory,
4625 ::fidl_next::wire::fuchsia::Channel,
4626 >,
4627 <___T as ::fidl_next::Transport>::SendBuffer,
4628 >,
4629 ) -> ::fidl_next::SendFuture<'_, ___T>
4630 where
4631 <___T as ::fidl_next::Transport>::SendBuffer:
4632 ::fidl_next::encoder::InternalHandleEncoder,
4633 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4634 {
4635 self.store_with(crate::generic::SvcStashStoreRequest { svc_endpoint })
4636 }
4637
4638 #[doc = " Store a svc_endpoint in the stash. Stored endpoints will remain in transit,\n since there might not be a server side implementation. The server end\n is retrieved by |SvcStashProvider/Get|.\n"]
4639 pub fn store_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
4640 where
4641 ___R: ::fidl_next::Encode<
4642 crate::wire::SvcStashStoreRequest,
4643 <___T as ::fidl_next::Transport>::SendBuffer,
4644 >,
4645 {
4646 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
4647 875467318821005424,
4648 <super::Store as ::fidl_next::Method>::FLEXIBILITY,
4649 request,
4650 ))
4651 }
4652 }
4653
4654 #[repr(transparent)]
4656 pub struct SvcStashServer<___T: ::fidl_next::Transport> {
4657 server: ::fidl_next::protocol::Server<___T>,
4658 }
4659
4660 impl<___T> SvcStashServer<___T> where ___T: ::fidl_next::Transport {}
4661 }
4662}
4663
4664#[diagnostic::on_unimplemented(
4665 note = "If {Self} implements the non-local SvcStashClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4666)]
4667
4668pub trait SvcStashLocalClientHandler<
4672 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4673 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4674>
4675{
4676}
4677
4678impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for SvcStash
4679where
4680 ___H: SvcStashLocalClientHandler<___T>,
4681 ___T: ::fidl_next::Transport,
4682{
4683 async fn on_event(
4684 handler: &mut ___H,
4685 mut message: ::fidl_next::Message<___T>,
4686 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4687 match *message.header().ordinal {
4688 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4689 }
4690 }
4691}
4692
4693#[diagnostic::on_unimplemented(
4694 note = "If {Self} implements the non-local SvcStashServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4695)]
4696
4697pub trait SvcStashLocalServerHandler<
4701 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4702 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4703>
4704{
4705 #[doc = " Store a svc_endpoint in the stash. Stored endpoints will remain in transit,\n since there might not be a server side implementation. The server end\n is retrieved by |SvcStashProvider/Get|.\n"]
4706 fn store(
4707 &mut self,
4708
4709 request: ::fidl_next::Request<svc_stash::Store, ___T>,
4710 ) -> impl ::core::future::Future<Output = ()>;
4711}
4712
4713impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for SvcStash
4714where
4715 ___H: SvcStashLocalServerHandler<___T>,
4716 ___T: ::fidl_next::Transport,
4717 for<'de> crate::wire::SvcStashStoreRequest: ::fidl_next::Decode<
4718 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4719 Constraint = (),
4720 >,
4721{
4722 async fn on_one_way(
4723 handler: &mut ___H,
4724 mut message: ::fidl_next::Message<___T>,
4725 ) -> ::core::result::Result<
4726 (),
4727 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4728 > {
4729 match *message.header().ordinal {
4730 875467318821005424 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4731 Ok(decoded) => {
4732 handler.store(::fidl_next::Request::from_decoded(decoded)).await;
4733 Ok(())
4734 }
4735 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4736 ordinal: 875467318821005424,
4737 error,
4738 }),
4739 },
4740
4741 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4742 }
4743 }
4744
4745 async fn on_two_way(
4746 handler: &mut ___H,
4747 mut message: ::fidl_next::Message<___T>,
4748 responder: ::fidl_next::protocol::Responder<___T>,
4749 ) -> ::core::result::Result<
4750 (),
4751 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4752 > {
4753 match *message.header().ordinal {
4754 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4755 }
4756 }
4757}
4758
4759pub trait SvcStashClientHandler<
4763 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4764 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4765>
4766{
4767}
4768
4769impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for SvcStash
4770where
4771 ___H: SvcStashClientHandler<___T> + ::core::marker::Send,
4772 ___T: ::fidl_next::Transport,
4773{
4774 async fn on_event(
4775 handler: &mut ___H,
4776 mut message: ::fidl_next::Message<___T>,
4777 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4778 match *message.header().ordinal {
4779 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4780 }
4781 }
4782}
4783
4784pub trait SvcStashServerHandler<
4788 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4789 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4790>
4791{
4792 #[doc = " Store a svc_endpoint in the stash. Stored endpoints will remain in transit,\n since there might not be a server side implementation. The server end\n is retrieved by |SvcStashProvider/Get|.\n"]
4793 fn store(
4794 &mut self,
4795
4796 request: ::fidl_next::Request<svc_stash::Store, ___T>,
4797 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4798}
4799
4800impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for SvcStash
4801where
4802 ___H: SvcStashServerHandler<___T> + ::core::marker::Send,
4803 ___T: ::fidl_next::Transport,
4804 for<'de> crate::wire::SvcStashStoreRequest: ::fidl_next::Decode<
4805 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4806 Constraint = (),
4807 >,
4808{
4809 async fn on_one_way(
4810 handler: &mut ___H,
4811 mut message: ::fidl_next::Message<___T>,
4812 ) -> ::core::result::Result<
4813 (),
4814 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4815 > {
4816 match *message.header().ordinal {
4817 875467318821005424 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
4818 Ok(decoded) => {
4819 handler.store(::fidl_next::Request::from_decoded(decoded)).await;
4820 Ok(())
4821 }
4822 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4823 ordinal: 875467318821005424,
4824 error,
4825 }),
4826 },
4827
4828 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4829 }
4830 }
4831
4832 async fn on_two_way(
4833 handler: &mut ___H,
4834 mut message: ::fidl_next::Message<___T>,
4835 responder: ::fidl_next::protocol::Responder<___T>,
4836 ) -> ::core::result::Result<
4837 (),
4838 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4839 > {
4840 match *message.header().ordinal {
4841 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4842 }
4843 }
4844}
4845
4846impl<___T> SvcStashClientHandler<___T> for ::fidl_next::IgnoreEvents where
4847 ___T: ::fidl_next::Transport
4848{
4849}
4850
4851impl<___H, ___T> SvcStashLocalClientHandler<___T> for ::fidl_next::Local<___H>
4852where
4853 ___H: SvcStashClientHandler<___T>,
4854 ___T: ::fidl_next::Transport,
4855{
4856}
4857
4858impl<___H, ___T> SvcStashLocalServerHandler<___T> for ::fidl_next::Local<___H>
4859where
4860 ___H: SvcStashServerHandler<___T>,
4861 ___T: ::fidl_next::Transport,
4862{
4863 async fn store(&mut self, request: ::fidl_next::Request<svc_stash::Store, ___T>) {
4864 ___H::store(&mut self.0, request).await
4865 }
4866}
4867
4868#[doc = " Protocol for providing the server end of the \'SvcStash\'.\n"]
4870#[derive(PartialEq, Debug)]
4871pub struct SvcStashProvider;
4872
4873impl ::fidl_next::Discoverable for SvcStashProvider {
4874 const PROTOCOL_NAME: &'static str = "fuchsia.boot.SvcStashProvider";
4875}
4876
4877#[cfg(target_os = "fuchsia")]
4878impl ::fidl_next::HasTransport for SvcStashProvider {
4879 type Transport = ::fidl_next::fuchsia::zx::Channel;
4880}
4881
4882pub mod svc_stash_provider {
4883 pub mod prelude {
4884 pub use crate::{
4885 SvcStashProvider, SvcStashProviderClientHandler, SvcStashProviderLocalClientHandler,
4886 SvcStashProviderLocalServerHandler, SvcStashProviderServerHandler, svc_stash_provider,
4887 };
4888
4889 pub use crate::natural::SvcStashProviderGetResponse;
4890 }
4891
4892 pub struct Get;
4893
4894 impl ::fidl_next::Method for Get {
4895 const ORDINAL: u64 = 4072866865090984067;
4896 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4897 ::fidl_next::protocol::Flexibility::Strict;
4898
4899 type Protocol = crate::SvcStashProvider;
4900
4901 type Request = ::fidl_next::wire::EmptyMessageBody;
4902 }
4903
4904 impl ::fidl_next::TwoWayMethod for Get {
4905 type Response = ::fidl_next::wire::Result<
4906 'static,
4907 crate::wire::SvcStashProviderGetResponse,
4908 ::fidl_next::wire::fuchsia::Status,
4909 >;
4910 }
4911
4912 impl<___R> ::fidl_next::Respond<___R> for Get {
4913 type Output = ::core::result::Result<
4914 crate::generic::SvcStashProviderGetResponse<___R>,
4915 ::fidl_next::never::Never,
4916 >;
4917
4918 fn respond(response: ___R) -> Self::Output {
4919 ::core::result::Result::Ok(crate::generic::SvcStashProviderGetResponse {
4920 resource: response,
4921 })
4922 }
4923 }
4924
4925 impl<___R> ::fidl_next::RespondErr<___R> for Get {
4926 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4927
4928 fn respond_err(response: ___R) -> Self::Output {
4929 ::core::result::Result::Err(response)
4930 }
4931 }
4932
4933 mod ___detail {
4934 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::SvcStashProvider
4935 where
4936 ___T: ::fidl_next::Transport,
4937 {
4938 type Client = SvcStashProviderClient<___T>;
4939 type Server = SvcStashProviderServer<___T>;
4940 }
4941
4942 #[repr(transparent)]
4944 pub struct SvcStashProviderClient<___T: ::fidl_next::Transport> {
4945 #[allow(dead_code)]
4946 client: ::fidl_next::protocol::Client<___T>,
4947 }
4948
4949 impl<___T> SvcStashProviderClient<___T>
4950 where
4951 ___T: ::fidl_next::Transport,
4952 {
4953 #[doc = " Get the SvcStash server endpoint.\n\n There is at most one instance for the system, meaning only the first caller\n may consume the handle.\n"]
4954 pub fn get(&self) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T> {
4955 ::fidl_next::TwoWayFuture::from_untyped(
4956 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4957 4072866865090984067,
4958 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
4959 (),
4960 ),
4961 )
4962 }
4963 }
4964
4965 #[repr(transparent)]
4967 pub struct SvcStashProviderServer<___T: ::fidl_next::Transport> {
4968 server: ::fidl_next::protocol::Server<___T>,
4969 }
4970
4971 impl<___T> SvcStashProviderServer<___T> where ___T: ::fidl_next::Transport {}
4972 }
4973}
4974
4975#[diagnostic::on_unimplemented(
4976 note = "If {Self} implements the non-local SvcStashProviderClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4977)]
4978
4979pub trait SvcStashProviderLocalClientHandler<
4983 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4984 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4985>
4986{
4987}
4988
4989impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for SvcStashProvider
4990where
4991 ___H: SvcStashProviderLocalClientHandler<___T>,
4992 ___T: ::fidl_next::Transport,
4993{
4994 async fn on_event(
4995 handler: &mut ___H,
4996 mut message: ::fidl_next::Message<___T>,
4997 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4998 match *message.header().ordinal {
4999 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5000 }
5001 }
5002}
5003
5004#[diagnostic::on_unimplemented(
5005 note = "If {Self} implements the non-local SvcStashProviderServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5006)]
5007
5008pub trait SvcStashProviderLocalServerHandler<
5012 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5013 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5014>
5015{
5016 #[doc = " Get the SvcStash server endpoint.\n\n There is at most one instance for the system, meaning only the first caller\n may consume the handle.\n"]
5017 fn get(
5018 &mut self,
5019
5020 responder: ::fidl_next::Responder<svc_stash_provider::Get, ___T>,
5021 ) -> impl ::core::future::Future<Output = ()>;
5022}
5023
5024impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for SvcStashProvider
5025where
5026 ___H: SvcStashProviderLocalServerHandler<___T>,
5027 ___T: ::fidl_next::Transport,
5028{
5029 async fn on_one_way(
5030 handler: &mut ___H,
5031 mut message: ::fidl_next::Message<___T>,
5032 ) -> ::core::result::Result<
5033 (),
5034 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5035 > {
5036 match *message.header().ordinal {
5037 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5038 }
5039 }
5040
5041 async fn on_two_way(
5042 handler: &mut ___H,
5043 mut message: ::fidl_next::Message<___T>,
5044 responder: ::fidl_next::protocol::Responder<___T>,
5045 ) -> ::core::result::Result<
5046 (),
5047 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5048 > {
5049 match *message.header().ordinal {
5050 4072866865090984067 => {
5051 let responder = ::fidl_next::Responder::from_untyped(responder);
5052
5053 handler.get(responder).await;
5054 Ok(())
5055 }
5056
5057 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5058 }
5059 }
5060}
5061
5062pub trait SvcStashProviderClientHandler<
5066 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5067 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5068>
5069{
5070}
5071
5072impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for SvcStashProvider
5073where
5074 ___H: SvcStashProviderClientHandler<___T> + ::core::marker::Send,
5075 ___T: ::fidl_next::Transport,
5076{
5077 async fn on_event(
5078 handler: &mut ___H,
5079 mut message: ::fidl_next::Message<___T>,
5080 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5081 match *message.header().ordinal {
5082 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5083 }
5084 }
5085}
5086
5087pub trait SvcStashProviderServerHandler<
5091 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5092 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5093>
5094{
5095 #[doc = " Get the SvcStash server endpoint.\n\n There is at most one instance for the system, meaning only the first caller\n may consume the handle.\n"]
5096 fn get(
5097 &mut self,
5098
5099 responder: ::fidl_next::Responder<svc_stash_provider::Get, ___T>,
5100 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5101}
5102
5103impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for SvcStashProvider
5104where
5105 ___H: SvcStashProviderServerHandler<___T> + ::core::marker::Send,
5106 ___T: ::fidl_next::Transport,
5107{
5108 async fn on_one_way(
5109 handler: &mut ___H,
5110 mut message: ::fidl_next::Message<___T>,
5111 ) -> ::core::result::Result<
5112 (),
5113 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5114 > {
5115 match *message.header().ordinal {
5116 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5117 }
5118 }
5119
5120 async fn on_two_way(
5121 handler: &mut ___H,
5122 mut message: ::fidl_next::Message<___T>,
5123 responder: ::fidl_next::protocol::Responder<___T>,
5124 ) -> ::core::result::Result<
5125 (),
5126 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5127 > {
5128 match *message.header().ordinal {
5129 4072866865090984067 => {
5130 let responder = ::fidl_next::Responder::from_untyped(responder);
5131
5132 handler.get(responder).await;
5133 Ok(())
5134 }
5135
5136 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5137 }
5138 }
5139}
5140
5141impl<___T> SvcStashProviderClientHandler<___T> for ::fidl_next::IgnoreEvents where
5142 ___T: ::fidl_next::Transport
5143{
5144}
5145
5146impl<___H, ___T> SvcStashProviderLocalClientHandler<___T> for ::fidl_next::Local<___H>
5147where
5148 ___H: SvcStashProviderClientHandler<___T>,
5149 ___T: ::fidl_next::Transport,
5150{
5151}
5152
5153impl<___H, ___T> SvcStashProviderLocalServerHandler<___T> for ::fidl_next::Local<___H>
5154where
5155 ___H: SvcStashProviderServerHandler<___T>,
5156 ___T: ::fidl_next::Transport,
5157{
5158 async fn get(&mut self, responder: ::fidl_next::Responder<svc_stash_provider::Get, ___T>) {
5159 ___H::get(&mut self.0, responder).await
5160 }
5161}
5162
5163#[doc = " Protocol for communication between `userboot` and the process booted by userboot.\n\n The userboot process will act as a client, pipelining requests containing information and/or handles that might\n be useful for the booted process. The booted process, or whoever processes the server endpoint of this protocol,\n will then process the pipelined requests from userboot.\n"]
5165#[derive(PartialEq, Debug)]
5166pub struct Userboot;
5167
5168#[cfg(target_os = "fuchsia")]
5169impl ::fidl_next::HasTransport for Userboot {
5170 type Transport = ::fidl_next::fuchsia::zx::Channel;
5171}
5172
5173pub mod userboot {
5174 pub mod prelude {
5175 pub use crate::{
5176 Userboot, UserbootClientHandler, UserbootLocalClientHandler,
5177 UserbootLocalServerHandler, UserbootServerHandler, userboot,
5178 };
5179
5180 pub use crate::natural::UserbootPostBootHandlesRequest;
5181
5182 pub use crate::natural::UserbootPostBootfsFilesRequest;
5183
5184 pub use crate::natural::UserbootPostBootfsVmoRequest;
5185
5186 pub use crate::natural::UserbootPostStashSvcRequest;
5187 }
5188
5189 pub struct PostBootfsVmo;
5190
5191 impl ::fidl_next::Method for PostBootfsVmo {
5192 const ORDINAL: u64 = 4298509372112764915;
5193 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5194 ::fidl_next::protocol::Flexibility::Strict;
5195
5196 type Protocol = crate::Userboot;
5197
5198 type Request = crate::wire::UserbootPostBootfsVmoRequest;
5199 }
5200
5201 pub struct PostBootfsFiles;
5202
5203 impl ::fidl_next::Method for PostBootfsFiles {
5204 const ORDINAL: u64 = 2985117035928536724;
5205 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5206 ::fidl_next::protocol::Flexibility::Strict;
5207
5208 type Protocol = crate::Userboot;
5209
5210 type Request = crate::wire::UserbootPostBootfsFilesRequest<'static>;
5211 }
5212
5213 pub struct PostBootHandles;
5214
5215 impl ::fidl_next::Method for PostBootHandles {
5216 const ORDINAL: u64 = 6990348864384659947;
5217 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5218 ::fidl_next::protocol::Flexibility::Strict;
5219
5220 type Protocol = crate::Userboot;
5221
5222 type Request = crate::wire::UserbootPostBootHandlesRequest<'static>;
5223 }
5224
5225 pub struct PostStashSvc;
5226
5227 impl ::fidl_next::Method for PostStashSvc {
5228 const ORDINAL: u64 = 5795797909204819628;
5229 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5230 ::fidl_next::protocol::Flexibility::Strict;
5231
5232 type Protocol = crate::Userboot;
5233
5234 type Request = crate::wire::UserbootPostStashSvcRequest;
5235 }
5236
5237 mod ___detail {
5238 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Userboot
5239 where
5240 ___T: ::fidl_next::Transport,
5241 {
5242 type Client = UserbootClient<___T>;
5243 type Server = UserbootServer<___T>;
5244 }
5245
5246 #[repr(transparent)]
5248 pub struct UserbootClient<___T: ::fidl_next::Transport> {
5249 #[allow(dead_code)]
5250 client: ::fidl_next::protocol::Client<___T>,
5251 }
5252
5253 impl<___T> UserbootClient<___T>
5254 where
5255 ___T: ::fidl_next::Transport,
5256 {
5257 #[doc = " Posts the uncompressed bootfs VMO.\n"]
5258 pub fn post_bootfs_vmo(
5259 &self,
5260
5261 bootfs: impl ::fidl_next::Encode<
5262 ::fidl_next::wire::fuchsia::Vmo,
5263 <___T as ::fidl_next::Transport>::SendBuffer,
5264 >,
5265 ) -> ::fidl_next::SendFuture<'_, ___T>
5266 where
5267 <___T as ::fidl_next::Transport>::SendBuffer:
5268 ::fidl_next::encoder::InternalHandleEncoder,
5269 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5270 {
5271 self.post_bootfs_vmo_with(crate::generic::UserbootPostBootfsVmoRequest { bootfs })
5272 }
5273
5274 #[doc = " Posts the uncompressed bootfs VMO.\n"]
5275 pub fn post_bootfs_vmo_with<___R>(
5276 &self,
5277 request: ___R,
5278 ) -> ::fidl_next::SendFuture<'_, ___T>
5279 where
5280 ___R: ::fidl_next::Encode<
5281 crate::wire::UserbootPostBootfsVmoRequest,
5282 <___T as ::fidl_next::Transport>::SendBuffer,
5283 >,
5284 {
5285 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5286 4298509372112764915,
5287 <super::PostBootfsVmo as ::fidl_next::Method>::FLEXIBILITY,
5288 request,
5289 ))
5290 }
5291
5292 #[doc = " Posts a set of `BootfsFileVmo` that were used for launching the `userboot.next=` program and are no longer\n available in the big BootfsVmo.\n\n Messages will only become available after the `Userboot` protocol client end (userboot\'s handle)\n has been closed.\n"]
5293 pub fn post_bootfs_files(
5294 &self,
5295
5296 files: impl ::fidl_next::Encode<
5297 ::fidl_next::wire::Vector<'static, crate::wire::BootfsFileVmo>,
5298 <___T as ::fidl_next::Transport>::SendBuffer,
5299 >,
5300 ) -> ::fidl_next::SendFuture<'_, ___T>
5301 where
5302 <___T as ::fidl_next::Transport>::SendBuffer:
5303 ::fidl_next::encoder::InternalHandleEncoder,
5304 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5305 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5306 {
5307 self.post_bootfs_files_with(crate::generic::UserbootPostBootfsFilesRequest {
5308 files,
5309 })
5310 }
5311
5312 #[doc = " Posts a set of `BootfsFileVmo` that were used for launching the `userboot.next=` program and are no longer\n available in the big BootfsVmo.\n\n Messages will only become available after the `Userboot` protocol client end (userboot\'s handle)\n has been closed.\n"]
5313 pub fn post_bootfs_files_with<___R>(
5314 &self,
5315 request: ___R,
5316 ) -> ::fidl_next::SendFuture<'_, ___T>
5317 where
5318 ___R: ::fidl_next::Encode<
5319 crate::wire::UserbootPostBootfsFilesRequest<'static>,
5320 <___T as ::fidl_next::Transport>::SendBuffer,
5321 >,
5322 {
5323 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5324 2985117035928536724,
5325 <super::PostBootfsFiles as ::fidl_next::Method>::FLEXIBILITY,
5326 request,
5327 ))
5328 }
5329
5330 #[doc = " Posts non-bootstrap handles provided by the kernel to the booted process.\n"]
5331 pub fn post_boot_handles_with<___R>(
5332 &self,
5333 request: ___R,
5334 ) -> ::fidl_next::SendFuture<'_, ___T>
5335 where
5336 ___R: ::fidl_next::Encode<
5337 crate::wire::UserbootPostBootHandlesRequest<'static>,
5338 <___T as ::fidl_next::Transport>::SendBuffer,
5339 >,
5340 {
5341 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5342 6990348864384659947,
5343 <super::PostBootHandles as ::fidl_next::Method>::FLEXIBILITY,
5344 request,
5345 ))
5346 }
5347
5348 #[doc = " Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`.\n"]
5349 pub fn post_stash_svc(
5350 &self,
5351
5352 stash_svc_endpoint: impl ::fidl_next::Encode<
5353 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
5354 <___T as ::fidl_next::Transport>::SendBuffer,
5355 >,
5356 ) -> ::fidl_next::SendFuture<'_, ___T>
5357 where
5358 <___T as ::fidl_next::Transport>::SendBuffer:
5359 ::fidl_next::encoder::InternalHandleEncoder,
5360 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5361 {
5362 self.post_stash_svc_with(crate::generic::UserbootPostStashSvcRequest {
5363 stash_svc_endpoint,
5364 })
5365 }
5366
5367 #[doc = " Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`.\n"]
5368 pub fn post_stash_svc_with<___R>(
5369 &self,
5370 request: ___R,
5371 ) -> ::fidl_next::SendFuture<'_, ___T>
5372 where
5373 ___R: ::fidl_next::Encode<
5374 crate::wire::UserbootPostStashSvcRequest,
5375 <___T as ::fidl_next::Transport>::SendBuffer,
5376 >,
5377 {
5378 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5379 5795797909204819628,
5380 <super::PostStashSvc as ::fidl_next::Method>::FLEXIBILITY,
5381 request,
5382 ))
5383 }
5384 }
5385
5386 #[repr(transparent)]
5388 pub struct UserbootServer<___T: ::fidl_next::Transport> {
5389 server: ::fidl_next::protocol::Server<___T>,
5390 }
5391
5392 impl<___T> UserbootServer<___T> where ___T: ::fidl_next::Transport {}
5393 }
5394}
5395
5396#[diagnostic::on_unimplemented(
5397 note = "If {Self} implements the non-local UserbootClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5398)]
5399
5400pub trait UserbootLocalClientHandler<
5404 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5405 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5406>
5407{
5408}
5409
5410impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Userboot
5411where
5412 ___H: UserbootLocalClientHandler<___T>,
5413 ___T: ::fidl_next::Transport,
5414{
5415 async fn on_event(
5416 handler: &mut ___H,
5417 mut message: ::fidl_next::Message<___T>,
5418 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5419 match *message.header().ordinal {
5420 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5421 }
5422 }
5423}
5424
5425#[diagnostic::on_unimplemented(
5426 note = "If {Self} implements the non-local UserbootServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5427)]
5428
5429pub trait UserbootLocalServerHandler<
5433 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5434 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5435>
5436{
5437 #[doc = " Posts the uncompressed bootfs VMO.\n"]
5438 fn post_bootfs_vmo(
5439 &mut self,
5440
5441 request: ::fidl_next::Request<userboot::PostBootfsVmo, ___T>,
5442 ) -> impl ::core::future::Future<Output = ()>;
5443
5444 #[doc = " Posts a set of `BootfsFileVmo` that were used for launching the `userboot.next=` program and are no longer\n available in the big BootfsVmo.\n\n Messages will only become available after the `Userboot` protocol client end (userboot\'s handle)\n has been closed.\n"]
5445 fn post_bootfs_files(
5446 &mut self,
5447
5448 request: ::fidl_next::Request<userboot::PostBootfsFiles, ___T>,
5449 ) -> impl ::core::future::Future<Output = ()>;
5450
5451 #[doc = " Posts non-bootstrap handles provided by the kernel to the booted process.\n"]
5452 fn post_boot_handles(
5453 &mut self,
5454
5455 request: ::fidl_next::Request<userboot::PostBootHandles, ___T>,
5456 ) -> impl ::core::future::Future<Output = ()>;
5457
5458 #[doc = " Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`.\n"]
5459 fn post_stash_svc(
5460 &mut self,
5461
5462 request: ::fidl_next::Request<userboot::PostStashSvc, ___T>,
5463 ) -> impl ::core::future::Future<Output = ()>;
5464}
5465
5466impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Userboot
5467where
5468 ___H: UserbootLocalServerHandler<___T>,
5469 ___T: ::fidl_next::Transport,
5470 for<'de> crate::wire::UserbootPostBootfsVmoRequest: ::fidl_next::Decode<
5471 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5472 Constraint = (),
5473 >,
5474 for<'de> crate::wire::UserbootPostBootfsFilesRequest<'de>: ::fidl_next::Decode<
5475 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5476 Constraint = (),
5477 >,
5478 for<'de> crate::wire::UserbootPostBootHandlesRequest<'de>: ::fidl_next::Decode<
5479 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5480 Constraint = (),
5481 >,
5482 for<'de> crate::wire::UserbootPostStashSvcRequest: ::fidl_next::Decode<
5483 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5484 Constraint = (),
5485 >,
5486{
5487 async fn on_one_way(
5488 handler: &mut ___H,
5489 mut message: ::fidl_next::Message<___T>,
5490 ) -> ::core::result::Result<
5491 (),
5492 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5493 > {
5494 match *message.header().ordinal {
5495 4298509372112764915 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5496 Ok(decoded) => {
5497 handler.post_bootfs_vmo(::fidl_next::Request::from_decoded(decoded)).await;
5498 Ok(())
5499 }
5500 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5501 ordinal: 4298509372112764915,
5502 error,
5503 }),
5504 },
5505
5506 2985117035928536724 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5507 Ok(decoded) => {
5508 handler.post_bootfs_files(::fidl_next::Request::from_decoded(decoded)).await;
5509 Ok(())
5510 }
5511 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5512 ordinal: 2985117035928536724,
5513 error,
5514 }),
5515 },
5516
5517 6990348864384659947 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5518 Ok(decoded) => {
5519 handler.post_boot_handles(::fidl_next::Request::from_decoded(decoded)).await;
5520 Ok(())
5521 }
5522 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5523 ordinal: 6990348864384659947,
5524 error,
5525 }),
5526 },
5527
5528 5795797909204819628 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5529 Ok(decoded) => {
5530 handler.post_stash_svc(::fidl_next::Request::from_decoded(decoded)).await;
5531 Ok(())
5532 }
5533 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5534 ordinal: 5795797909204819628,
5535 error,
5536 }),
5537 },
5538
5539 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5540 }
5541 }
5542
5543 async fn on_two_way(
5544 handler: &mut ___H,
5545 mut message: ::fidl_next::Message<___T>,
5546 responder: ::fidl_next::protocol::Responder<___T>,
5547 ) -> ::core::result::Result<
5548 (),
5549 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5550 > {
5551 match *message.header().ordinal {
5552 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5553 }
5554 }
5555}
5556
5557pub trait UserbootClientHandler<
5561 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5562 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5563>
5564{
5565}
5566
5567impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Userboot
5568where
5569 ___H: UserbootClientHandler<___T> + ::core::marker::Send,
5570 ___T: ::fidl_next::Transport,
5571{
5572 async fn on_event(
5573 handler: &mut ___H,
5574 mut message: ::fidl_next::Message<___T>,
5575 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5576 match *message.header().ordinal {
5577 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5578 }
5579 }
5580}
5581
5582pub trait UserbootServerHandler<
5586 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5587 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5588>
5589{
5590 #[doc = " Posts the uncompressed bootfs VMO.\n"]
5591 fn post_bootfs_vmo(
5592 &mut self,
5593
5594 request: ::fidl_next::Request<userboot::PostBootfsVmo, ___T>,
5595 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5596
5597 #[doc = " Posts a set of `BootfsFileVmo` that were used for launching the `userboot.next=` program and are no longer\n available in the big BootfsVmo.\n\n Messages will only become available after the `Userboot` protocol client end (userboot\'s handle)\n has been closed.\n"]
5598 fn post_bootfs_files(
5599 &mut self,
5600
5601 request: ::fidl_next::Request<userboot::PostBootfsFiles, ___T>,
5602 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5603
5604 #[doc = " Posts non-bootstrap handles provided by the kernel to the booted process.\n"]
5605 fn post_boot_handles(
5606 &mut self,
5607
5608 request: ::fidl_next::Request<userboot::PostBootHandles, ___T>,
5609 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5610
5611 #[doc = " Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`.\n"]
5612 fn post_stash_svc(
5613 &mut self,
5614
5615 request: ::fidl_next::Request<userboot::PostStashSvc, ___T>,
5616 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5617}
5618
5619impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Userboot
5620where
5621 ___H: UserbootServerHandler<___T> + ::core::marker::Send,
5622 ___T: ::fidl_next::Transport,
5623 for<'de> crate::wire::UserbootPostBootfsVmoRequest: ::fidl_next::Decode<
5624 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5625 Constraint = (),
5626 >,
5627 for<'de> crate::wire::UserbootPostBootfsFilesRequest<'de>: ::fidl_next::Decode<
5628 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5629 Constraint = (),
5630 >,
5631 for<'de> crate::wire::UserbootPostBootHandlesRequest<'de>: ::fidl_next::Decode<
5632 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5633 Constraint = (),
5634 >,
5635 for<'de> crate::wire::UserbootPostStashSvcRequest: ::fidl_next::Decode<
5636 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5637 Constraint = (),
5638 >,
5639{
5640 async fn on_one_way(
5641 handler: &mut ___H,
5642 mut message: ::fidl_next::Message<___T>,
5643 ) -> ::core::result::Result<
5644 (),
5645 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5646 > {
5647 match *message.header().ordinal {
5648 4298509372112764915 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5649 Ok(decoded) => {
5650 handler.post_bootfs_vmo(::fidl_next::Request::from_decoded(decoded)).await;
5651 Ok(())
5652 }
5653 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5654 ordinal: 4298509372112764915,
5655 error,
5656 }),
5657 },
5658
5659 2985117035928536724 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5660 Ok(decoded) => {
5661 handler.post_bootfs_files(::fidl_next::Request::from_decoded(decoded)).await;
5662 Ok(())
5663 }
5664 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5665 ordinal: 2985117035928536724,
5666 error,
5667 }),
5668 },
5669
5670 6990348864384659947 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5671 Ok(decoded) => {
5672 handler.post_boot_handles(::fidl_next::Request::from_decoded(decoded)).await;
5673 Ok(())
5674 }
5675 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5676 ordinal: 6990348864384659947,
5677 error,
5678 }),
5679 },
5680
5681 5795797909204819628 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5682 Ok(decoded) => {
5683 handler.post_stash_svc(::fidl_next::Request::from_decoded(decoded)).await;
5684 Ok(())
5685 }
5686 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5687 ordinal: 5795797909204819628,
5688 error,
5689 }),
5690 },
5691
5692 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5693 }
5694 }
5695
5696 async fn on_two_way(
5697 handler: &mut ___H,
5698 mut message: ::fidl_next::Message<___T>,
5699 responder: ::fidl_next::protocol::Responder<___T>,
5700 ) -> ::core::result::Result<
5701 (),
5702 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5703 > {
5704 match *message.header().ordinal {
5705 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5706 }
5707 }
5708}
5709
5710impl<___T> UserbootClientHandler<___T> for ::fidl_next::IgnoreEvents where
5711 ___T: ::fidl_next::Transport
5712{
5713}
5714
5715impl<___H, ___T> UserbootLocalClientHandler<___T> for ::fidl_next::Local<___H>
5716where
5717 ___H: UserbootClientHandler<___T>,
5718 ___T: ::fidl_next::Transport,
5719{
5720}
5721
5722impl<___H, ___T> UserbootLocalServerHandler<___T> for ::fidl_next::Local<___H>
5723where
5724 ___H: UserbootServerHandler<___T>,
5725 ___T: ::fidl_next::Transport,
5726{
5727 async fn post_bootfs_vmo(
5728 &mut self,
5729
5730 request: ::fidl_next::Request<userboot::PostBootfsVmo, ___T>,
5731 ) {
5732 ___H::post_bootfs_vmo(&mut self.0, request).await
5733 }
5734
5735 async fn post_bootfs_files(
5736 &mut self,
5737
5738 request: ::fidl_next::Request<userboot::PostBootfsFiles, ___T>,
5739 ) {
5740 ___H::post_bootfs_files(&mut self.0, request).await
5741 }
5742
5743 async fn post_boot_handles(
5744 &mut self,
5745
5746 request: ::fidl_next::Request<userboot::PostBootHandles, ___T>,
5747 ) {
5748 ___H::post_boot_handles(&mut self.0, request).await
5749 }
5750
5751 async fn post_stash_svc(
5752 &mut self,
5753
5754 request: ::fidl_next::Request<userboot::PostStashSvc, ___T>,
5755 ) {
5756 ___H::post_stash_svc(&mut self.0, request).await
5757 }
5758}
5759
5760#[doc = " Protocol for providing the kernel log, writable.\n"]
5762#[derive(PartialEq, Debug)]
5763pub struct WriteOnlyLog;
5764
5765impl ::fidl_next::Discoverable for WriteOnlyLog {
5766 const PROTOCOL_NAME: &'static str = "fuchsia.boot.WriteOnlyLog";
5767}
5768
5769#[cfg(target_os = "fuchsia")]
5770impl ::fidl_next::HasTransport for WriteOnlyLog {
5771 type Transport = ::fidl_next::fuchsia::zx::Channel;
5772}
5773
5774pub mod write_only_log {
5775 pub mod prelude {
5776 pub use crate::{
5777 WriteOnlyLog, WriteOnlyLogClientHandler, WriteOnlyLogLocalClientHandler,
5778 WriteOnlyLogLocalServerHandler, WriteOnlyLogServerHandler, write_only_log,
5779 };
5780
5781 pub use crate::natural::WriteOnlyLogGetResponse;
5782 }
5783
5784 pub struct Get;
5785
5786 impl ::fidl_next::Method for Get {
5787 const ORDINAL: u64 = 312892061866864647;
5788 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5789 ::fidl_next::protocol::Flexibility::Strict;
5790
5791 type Protocol = crate::WriteOnlyLog;
5792
5793 type Request = ::fidl_next::wire::EmptyMessageBody;
5794 }
5795
5796 impl ::fidl_next::TwoWayMethod for Get {
5797 type Response = ::fidl_next::wire::Strict<crate::wire::WriteOnlyLogGetResponse>;
5798 }
5799
5800 impl<___R> ::fidl_next::Respond<___R> for Get {
5801 type Output = ::fidl_next::Strict<crate::generic::WriteOnlyLogGetResponse<___R>>;
5802
5803 fn respond(response: ___R) -> Self::Output {
5804 ::fidl_next::Strict(crate::generic::WriteOnlyLogGetResponse { log: response })
5805 }
5806 }
5807
5808 mod ___detail {
5809 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::WriteOnlyLog
5810 where
5811 ___T: ::fidl_next::Transport,
5812 {
5813 type Client = WriteOnlyLogClient<___T>;
5814 type Server = WriteOnlyLogServer<___T>;
5815 }
5816
5817 #[repr(transparent)]
5819 pub struct WriteOnlyLogClient<___T: ::fidl_next::Transport> {
5820 #[allow(dead_code)]
5821 client: ::fidl_next::protocol::Client<___T>,
5822 }
5823
5824 impl<___T> WriteOnlyLogClient<___T>
5825 where
5826 ___T: ::fidl_next::Transport,
5827 {
5828 #[doc = " Get write-only handle to the kernel `log`.\n"]
5829 pub fn get(&self) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T> {
5830 ::fidl_next::TwoWayFuture::from_untyped(
5831 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
5832 312892061866864647,
5833 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
5834 (),
5835 ),
5836 )
5837 }
5838 }
5839
5840 #[repr(transparent)]
5842 pub struct WriteOnlyLogServer<___T: ::fidl_next::Transport> {
5843 server: ::fidl_next::protocol::Server<___T>,
5844 }
5845
5846 impl<___T> WriteOnlyLogServer<___T> where ___T: ::fidl_next::Transport {}
5847 }
5848}
5849
5850#[diagnostic::on_unimplemented(
5851 note = "If {Self} implements the non-local WriteOnlyLogClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5852)]
5853
5854pub trait WriteOnlyLogLocalClientHandler<
5858 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5859 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5860>
5861{
5862}
5863
5864impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for WriteOnlyLog
5865where
5866 ___H: WriteOnlyLogLocalClientHandler<___T>,
5867 ___T: ::fidl_next::Transport,
5868{
5869 async fn on_event(
5870 handler: &mut ___H,
5871 mut message: ::fidl_next::Message<___T>,
5872 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5873 match *message.header().ordinal {
5874 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5875 }
5876 }
5877}
5878
5879#[diagnostic::on_unimplemented(
5880 note = "If {Self} implements the non-local WriteOnlyLogServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5881)]
5882
5883pub trait WriteOnlyLogLocalServerHandler<
5887 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5888 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5889>
5890{
5891 #[doc = " Get write-only handle to the kernel `log`.\n"]
5892 fn get(
5893 &mut self,
5894
5895 responder: ::fidl_next::Responder<write_only_log::Get, ___T>,
5896 ) -> impl ::core::future::Future<Output = ()>;
5897}
5898
5899impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for WriteOnlyLog
5900where
5901 ___H: WriteOnlyLogLocalServerHandler<___T>,
5902 ___T: ::fidl_next::Transport,
5903{
5904 async fn on_one_way(
5905 handler: &mut ___H,
5906 mut message: ::fidl_next::Message<___T>,
5907 ) -> ::core::result::Result<
5908 (),
5909 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5910 > {
5911 match *message.header().ordinal {
5912 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5913 }
5914 }
5915
5916 async fn on_two_way(
5917 handler: &mut ___H,
5918 mut message: ::fidl_next::Message<___T>,
5919 responder: ::fidl_next::protocol::Responder<___T>,
5920 ) -> ::core::result::Result<
5921 (),
5922 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5923 > {
5924 match *message.header().ordinal {
5925 312892061866864647 => {
5926 let responder = ::fidl_next::Responder::from_untyped(responder);
5927
5928 handler.get(responder).await;
5929 Ok(())
5930 }
5931
5932 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5933 }
5934 }
5935}
5936
5937pub trait WriteOnlyLogClientHandler<
5941 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5942 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5943>
5944{
5945}
5946
5947impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for WriteOnlyLog
5948where
5949 ___H: WriteOnlyLogClientHandler<___T> + ::core::marker::Send,
5950 ___T: ::fidl_next::Transport,
5951{
5952 async fn on_event(
5953 handler: &mut ___H,
5954 mut message: ::fidl_next::Message<___T>,
5955 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5956 match *message.header().ordinal {
5957 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5958 }
5959 }
5960}
5961
5962pub trait WriteOnlyLogServerHandler<
5966 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5967 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5968>
5969{
5970 #[doc = " Get write-only handle to the kernel `log`.\n"]
5971 fn get(
5972 &mut self,
5973
5974 responder: ::fidl_next::Responder<write_only_log::Get, ___T>,
5975 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5976}
5977
5978impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for WriteOnlyLog
5979where
5980 ___H: WriteOnlyLogServerHandler<___T> + ::core::marker::Send,
5981 ___T: ::fidl_next::Transport,
5982{
5983 async fn on_one_way(
5984 handler: &mut ___H,
5985 mut message: ::fidl_next::Message<___T>,
5986 ) -> ::core::result::Result<
5987 (),
5988 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5989 > {
5990 match *message.header().ordinal {
5991 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5992 }
5993 }
5994
5995 async fn on_two_way(
5996 handler: &mut ___H,
5997 mut message: ::fidl_next::Message<___T>,
5998 responder: ::fidl_next::protocol::Responder<___T>,
5999 ) -> ::core::result::Result<
6000 (),
6001 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6002 > {
6003 match *message.header().ordinal {
6004 312892061866864647 => {
6005 let responder = ::fidl_next::Responder::from_untyped(responder);
6006
6007 handler.get(responder).await;
6008 Ok(())
6009 }
6010
6011 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6012 }
6013 }
6014}
6015
6016impl<___T> WriteOnlyLogClientHandler<___T> for ::fidl_next::IgnoreEvents where
6017 ___T: ::fidl_next::Transport
6018{
6019}
6020
6021impl<___H, ___T> WriteOnlyLogLocalClientHandler<___T> for ::fidl_next::Local<___H>
6022where
6023 ___H: WriteOnlyLogClientHandler<___T>,
6024 ___T: ::fidl_next::Transport,
6025{
6026}
6027
6028impl<___H, ___T> WriteOnlyLogLocalServerHandler<___T> for ::fidl_next::Local<___H>
6029where
6030 ___H: WriteOnlyLogServerHandler<___T>,
6031 ___T: ::fidl_next::Transport,
6032{
6033 async fn get(&mut self, responder: ::fidl_next::Responder<write_only_log::Get, ___T>) {
6034 ___H::get(&mut self.0, responder).await
6035 }
6036}
6037
6038pub use fidl_next_common_fuchsia_boot::*;