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 unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::BootfsFileVmo, ___E>
2880 for &'a BootfsFileVmo<T0, T1>
2881 where
2882 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2883 ___E: ::fidl_next::fuchsia::HandleEncoder,
2884 &'a T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2885 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2886 {
2887 #[inline]
2888 fn encode(
2889 self,
2890 encoder_: &mut ___E,
2891 out_: &mut ::core::mem::MaybeUninit<crate::wire::BootfsFileVmo>,
2892 _: (),
2893 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2894 ::fidl_next::munge! {
2895 let crate::wire::BootfsFileVmo {
2896 offset,
2897 contents,
2898
2899 } = out_;
2900 }
2901
2902 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
2903
2904 ::fidl_next::Encode::encode(&self.contents, encoder_, contents, ())?;
2905
2906 Ok(())
2907 }
2908 }
2909
2910 pub struct FactoryItemsGetResponse<T0, T1> {
2912 pub payload: T0,
2913
2914 pub length: T1,
2915 }
2916
2917 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FactoryItemsGetResponse, ___E>
2918 for FactoryItemsGetResponse<T0, T1>
2919 where
2920 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2921 ___E: ::fidl_next::fuchsia::HandleEncoder,
2922 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
2923 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2924 {
2925 #[inline]
2926 fn encode(
2927 self,
2928 encoder_: &mut ___E,
2929 out_: &mut ::core::mem::MaybeUninit<crate::wire::FactoryItemsGetResponse>,
2930 _: (),
2931 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2932 ::fidl_next::munge! {
2933 let crate::wire::FactoryItemsGetResponse {
2934 payload,
2935 length,
2936
2937 } = out_;
2938 }
2939
2940 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
2941
2942 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
2943
2944 Ok(())
2945 }
2946 }
2947
2948 unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::FactoryItemsGetResponse, ___E>
2949 for &'a FactoryItemsGetResponse<T0, T1>
2950 where
2951 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2952 ___E: ::fidl_next::fuchsia::HandleEncoder,
2953 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
2954 &'a T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2955 {
2956 #[inline]
2957 fn encode(
2958 self,
2959 encoder_: &mut ___E,
2960 out_: &mut ::core::mem::MaybeUninit<crate::wire::FactoryItemsGetResponse>,
2961 _: (),
2962 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2963 ::fidl_next::munge! {
2964 let crate::wire::FactoryItemsGetResponse {
2965 payload,
2966 length,
2967
2968 } = out_;
2969 }
2970
2971 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
2972
2973 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
2974
2975 Ok(())
2976 }
2977 }
2978
2979 pub struct ItemsGetResponse<T0, T1> {
2981 pub payload: T0,
2982
2983 pub length: T1,
2984 }
2985
2986 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ItemsGetResponse, ___E>
2987 for ItemsGetResponse<T0, T1>
2988 where
2989 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2990 ___E: ::fidl_next::fuchsia::HandleEncoder,
2991 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
2992 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2993 {
2994 #[inline]
2995 fn encode(
2996 self,
2997 encoder_: &mut ___E,
2998 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGetResponse>,
2999 _: (),
3000 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3001 ::fidl_next::munge! {
3002 let crate::wire::ItemsGetResponse {
3003 payload,
3004 length,
3005
3006 } = out_;
3007 }
3008
3009 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3010
3011 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
3012
3013 Ok(())
3014 }
3015 }
3016
3017 unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::ItemsGetResponse, ___E>
3018 for &'a ItemsGetResponse<T0, T1>
3019 where
3020 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3021 ___E: ::fidl_next::fuchsia::HandleEncoder,
3022 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
3023 &'a T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3024 {
3025 #[inline]
3026 fn encode(
3027 self,
3028 encoder_: &mut ___E,
3029 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGetResponse>,
3030 _: (),
3031 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3032 ::fidl_next::munge! {
3033 let crate::wire::ItemsGetResponse {
3034 payload,
3035 length,
3036
3037 } = out_;
3038 }
3039
3040 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3041
3042 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
3043
3044 Ok(())
3045 }
3046 }
3047
3048 pub struct RetrievedItems<T0, T1, T2> {
3050 pub payload: T0,
3051
3052 pub length: T1,
3053
3054 pub extra: T2,
3055 }
3056
3057 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::RetrievedItems, ___E>
3058 for RetrievedItems<T0, T1, T2>
3059 where
3060 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3061 ___E: ::fidl_next::fuchsia::HandleEncoder,
3062 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3063 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3064 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3065 {
3066 #[inline]
3067 fn encode(
3068 self,
3069 encoder_: &mut ___E,
3070 out_: &mut ::core::mem::MaybeUninit<crate::wire::RetrievedItems>,
3071 _: (),
3072 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3073 ::fidl_next::munge! {
3074 let crate::wire::RetrievedItems {
3075 payload,
3076 length,
3077 extra,
3078
3079 } = out_;
3080 }
3081
3082 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3083
3084 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
3085
3086 ::fidl_next::Encode::encode(self.extra, encoder_, extra, ())?;
3087
3088 Ok(())
3089 }
3090 }
3091
3092 unsafe impl<'a, ___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::RetrievedItems, ___E>
3093 for &'a RetrievedItems<T0, T1, T2>
3094 where
3095 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3096 ___E: ::fidl_next::fuchsia::HandleEncoder,
3097 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3098 &'a T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3099 &'a T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3100 {
3101 #[inline]
3102 fn encode(
3103 self,
3104 encoder_: &mut ___E,
3105 out_: &mut ::core::mem::MaybeUninit<crate::wire::RetrievedItems>,
3106 _: (),
3107 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3108 ::fidl_next::munge! {
3109 let crate::wire::RetrievedItems {
3110 payload,
3111 length,
3112 extra,
3113
3114 } = out_;
3115 }
3116
3117 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3118
3119 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
3120
3121 ::fidl_next::Encode::encode(&self.extra, encoder_, extra, ())?;
3122
3123 Ok(())
3124 }
3125 }
3126
3127 pub struct ItemsGet2Response<T0> {
3129 pub retrieved_items: T0,
3130 }
3131
3132 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ItemsGet2Response<'static>, ___E>
3133 for ItemsGet2Response<T0>
3134 where
3135 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3136 ___E: ::fidl_next::Encoder,
3137 ___E: ::fidl_next::fuchsia::HandleEncoder,
3138 T0: ::fidl_next::Encode<
3139 ::fidl_next::wire::Vector<'static, crate::wire::RetrievedItems>,
3140 ___E,
3141 >,
3142 {
3143 #[inline]
3144 fn encode(
3145 self,
3146 encoder_: &mut ___E,
3147 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGet2Response<'static>>,
3148 _: (),
3149 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3150 ::fidl_next::munge! {
3151 let crate::wire::ItemsGet2Response {
3152 retrieved_items,
3153
3154 } = out_;
3155 }
3156
3157 ::fidl_next::Encode::encode(
3158 self.retrieved_items,
3159 encoder_,
3160 retrieved_items,
3161 (4294967295, ()),
3162 )?;
3163
3164 Ok(())
3165 }
3166 }
3167
3168 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ItemsGet2Response<'static>, ___E>
3169 for &'a ItemsGet2Response<T0>
3170 where
3171 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3172 ___E: ::fidl_next::Encoder,
3173 ___E: ::fidl_next::fuchsia::HandleEncoder,
3174 &'a T0: ::fidl_next::Encode<
3175 ::fidl_next::wire::Vector<'static, crate::wire::RetrievedItems>,
3176 ___E,
3177 >,
3178 {
3179 #[inline]
3180 fn encode(
3181 self,
3182 encoder_: &mut ___E,
3183 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGet2Response<'static>>,
3184 _: (),
3185 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3186 ::fidl_next::munge! {
3187 let crate::wire::ItemsGet2Response {
3188 retrieved_items,
3189
3190 } = out_;
3191 }
3192
3193 ::fidl_next::Encode::encode(
3194 &self.retrieved_items,
3195 encoder_,
3196 retrieved_items,
3197 (4294967295, ()),
3198 )?;
3199
3200 Ok(())
3201 }
3202 }
3203
3204 pub struct ItemsGetBootloaderFileResponse<T0> {
3206 pub payload: T0,
3207 }
3208
3209 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ItemsGetBootloaderFileResponse, ___E>
3210 for ItemsGetBootloaderFileResponse<T0>
3211 where
3212 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3213 ___E: ::fidl_next::fuchsia::HandleEncoder,
3214 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
3215 {
3216 #[inline]
3217 fn encode(
3218 self,
3219 encoder_: &mut ___E,
3220 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGetBootloaderFileResponse>,
3221 _: (),
3222 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3223 ::fidl_next::munge! {
3224 let crate::wire::ItemsGetBootloaderFileResponse {
3225 payload,
3226
3227 } = out_;
3228 }
3229
3230 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3231
3232 Ok(())
3233 }
3234 }
3235
3236 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ItemsGetBootloaderFileResponse, ___E>
3237 for &'a ItemsGetBootloaderFileResponse<T0>
3238 where
3239 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3240 ___E: ::fidl_next::fuchsia::HandleEncoder,
3241 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalVmo, ___E>,
3242 {
3243 #[inline]
3244 fn encode(
3245 self,
3246 encoder_: &mut ___E,
3247 out_: &mut ::core::mem::MaybeUninit<crate::wire::ItemsGetBootloaderFileResponse>,
3248 _: (),
3249 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3250 ::fidl_next::munge! {
3251 let crate::wire::ItemsGetBootloaderFileResponse {
3252 payload,
3253
3254 } = out_;
3255 }
3256
3257 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3258
3259 Ok(())
3260 }
3261 }
3262
3263 pub struct ReadOnlyLogGetResponse<T0> {
3265 pub log: T0,
3266 }
3267
3268 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadOnlyLogGetResponse, ___E>
3269 for ReadOnlyLogGetResponse<T0>
3270 where
3271 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3272 ___E: ::fidl_next::fuchsia::HandleEncoder,
3273 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::DebugLog, ___E>,
3274 {
3275 #[inline]
3276 fn encode(
3277 self,
3278 encoder_: &mut ___E,
3279 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadOnlyLogGetResponse>,
3280 _: (),
3281 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3282 ::fidl_next::munge! {
3283 let crate::wire::ReadOnlyLogGetResponse {
3284 log,
3285
3286 } = out_;
3287 }
3288
3289 ::fidl_next::Encode::encode(self.log, encoder_, log, ())?;
3290
3291 Ok(())
3292 }
3293 }
3294
3295 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::ReadOnlyLogGetResponse, ___E>
3296 for &'a ReadOnlyLogGetResponse<T0>
3297 where
3298 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3299 ___E: ::fidl_next::fuchsia::HandleEncoder,
3300 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::DebugLog, ___E>,
3301 {
3302 #[inline]
3303 fn encode(
3304 self,
3305 encoder_: &mut ___E,
3306 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadOnlyLogGetResponse>,
3307 _: (),
3308 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3309 ::fidl_next::munge! {
3310 let crate::wire::ReadOnlyLogGetResponse {
3311 log,
3312
3313 } = out_;
3314 }
3315
3316 ::fidl_next::Encode::encode(&self.log, encoder_, log, ())?;
3317
3318 Ok(())
3319 }
3320 }
3321
3322 pub struct SvcStashStoreRequest<T0> {
3324 pub svc_endpoint: T0,
3325 }
3326
3327 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SvcStashStoreRequest, ___E>
3328 for SvcStashStoreRequest<T0>
3329 where
3330 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3331 ___E: ::fidl_next::fuchsia::HandleEncoder,
3332 T0: ::fidl_next::Encode<
3333 ::fidl_next::ServerEnd<
3334 ::fidl_next_fuchsia_io::Directory,
3335 ::fidl_next::wire::fuchsia::Channel,
3336 >,
3337 ___E,
3338 >,
3339 {
3340 #[inline]
3341 fn encode(
3342 self,
3343 encoder_: &mut ___E,
3344 out_: &mut ::core::mem::MaybeUninit<crate::wire::SvcStashStoreRequest>,
3345 _: (),
3346 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3347 ::fidl_next::munge! {
3348 let crate::wire::SvcStashStoreRequest {
3349 svc_endpoint,
3350
3351 } = out_;
3352 }
3353
3354 ::fidl_next::Encode::encode(self.svc_endpoint, encoder_, svc_endpoint, ())?;
3355
3356 Ok(())
3357 }
3358 }
3359
3360 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::SvcStashStoreRequest, ___E>
3361 for &'a SvcStashStoreRequest<T0>
3362 where
3363 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3364 ___E: ::fidl_next::fuchsia::HandleEncoder,
3365 &'a T0: ::fidl_next::Encode<
3366 ::fidl_next::ServerEnd<
3367 ::fidl_next_fuchsia_io::Directory,
3368 ::fidl_next::wire::fuchsia::Channel,
3369 >,
3370 ___E,
3371 >,
3372 {
3373 #[inline]
3374 fn encode(
3375 self,
3376 encoder_: &mut ___E,
3377 out_: &mut ::core::mem::MaybeUninit<crate::wire::SvcStashStoreRequest>,
3378 _: (),
3379 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3380 ::fidl_next::munge! {
3381 let crate::wire::SvcStashStoreRequest {
3382 svc_endpoint,
3383
3384 } = out_;
3385 }
3386
3387 ::fidl_next::Encode::encode(&self.svc_endpoint, encoder_, svc_endpoint, ())?;
3388
3389 Ok(())
3390 }
3391 }
3392
3393 pub struct SvcStashProviderGetResponse<T0> {
3395 pub resource: T0,
3396 }
3397
3398 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SvcStashProviderGetResponse, ___E>
3399 for SvcStashProviderGetResponse<T0>
3400 where
3401 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3402 ___E: ::fidl_next::fuchsia::HandleEncoder,
3403 T0: ::fidl_next::Encode<
3404 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
3405 ___E,
3406 >,
3407 {
3408 #[inline]
3409 fn encode(
3410 self,
3411 encoder_: &mut ___E,
3412 out_: &mut ::core::mem::MaybeUninit<crate::wire::SvcStashProviderGetResponse>,
3413 _: (),
3414 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3415 ::fidl_next::munge! {
3416 let crate::wire::SvcStashProviderGetResponse {
3417 resource,
3418
3419 } = out_;
3420 }
3421
3422 ::fidl_next::Encode::encode(self.resource, encoder_, resource, ())?;
3423
3424 Ok(())
3425 }
3426 }
3427
3428 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::SvcStashProviderGetResponse, ___E>
3429 for &'a SvcStashProviderGetResponse<T0>
3430 where
3431 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3432 ___E: ::fidl_next::fuchsia::HandleEncoder,
3433 &'a T0: ::fidl_next::Encode<
3434 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
3435 ___E,
3436 >,
3437 {
3438 #[inline]
3439 fn encode(
3440 self,
3441 encoder_: &mut ___E,
3442 out_: &mut ::core::mem::MaybeUninit<crate::wire::SvcStashProviderGetResponse>,
3443 _: (),
3444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3445 ::fidl_next::munge! {
3446 let crate::wire::SvcStashProviderGetResponse {
3447 resource,
3448
3449 } = out_;
3450 }
3451
3452 ::fidl_next::Encode::encode(&self.resource, encoder_, resource, ())?;
3453
3454 Ok(())
3455 }
3456 }
3457
3458 pub struct UserbootPostBootfsVmoRequest<T0> {
3460 pub bootfs: T0,
3461 }
3462
3463 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UserbootPostBootfsVmoRequest, ___E>
3464 for UserbootPostBootfsVmoRequest<T0>
3465 where
3466 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3467 ___E: ::fidl_next::fuchsia::HandleEncoder,
3468 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3469 {
3470 #[inline]
3471 fn encode(
3472 self,
3473 encoder_: &mut ___E,
3474 out_: &mut ::core::mem::MaybeUninit<crate::wire::UserbootPostBootfsVmoRequest>,
3475 _: (),
3476 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3477 ::fidl_next::munge! {
3478 let crate::wire::UserbootPostBootfsVmoRequest {
3479 bootfs,
3480
3481 } = out_;
3482 }
3483
3484 ::fidl_next::Encode::encode(self.bootfs, encoder_, bootfs, ())?;
3485
3486 Ok(())
3487 }
3488 }
3489
3490 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::UserbootPostBootfsVmoRequest, ___E>
3491 for &'a UserbootPostBootfsVmoRequest<T0>
3492 where
3493 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3494 ___E: ::fidl_next::fuchsia::HandleEncoder,
3495 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3496 {
3497 #[inline]
3498 fn encode(
3499 self,
3500 encoder_: &mut ___E,
3501 out_: &mut ::core::mem::MaybeUninit<crate::wire::UserbootPostBootfsVmoRequest>,
3502 _: (),
3503 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3504 ::fidl_next::munge! {
3505 let crate::wire::UserbootPostBootfsVmoRequest {
3506 bootfs,
3507
3508 } = out_;
3509 }
3510
3511 ::fidl_next::Encode::encode(&self.bootfs, encoder_, bootfs, ())?;
3512
3513 Ok(())
3514 }
3515 }
3516
3517 pub struct UserbootPostBootfsFilesRequest<T0> {
3519 pub files: T0,
3520 }
3521
3522 unsafe impl<___E, T0>
3523 ::fidl_next::Encode<crate::wire::UserbootPostBootfsFilesRequest<'static>, ___E>
3524 for UserbootPostBootfsFilesRequest<T0>
3525 where
3526 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3527 ___E: ::fidl_next::Encoder,
3528 ___E: ::fidl_next::fuchsia::HandleEncoder,
3529 T0: ::fidl_next::Encode<
3530 ::fidl_next::wire::Vector<'static, crate::wire::BootfsFileVmo>,
3531 ___E,
3532 >,
3533 {
3534 #[inline]
3535 fn encode(
3536 self,
3537 encoder_: &mut ___E,
3538 out_: &mut ::core::mem::MaybeUninit<
3539 crate::wire::UserbootPostBootfsFilesRequest<'static>,
3540 >,
3541 _: (),
3542 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3543 ::fidl_next::munge! {
3544 let crate::wire::UserbootPostBootfsFilesRequest {
3545 files,
3546
3547 } = out_;
3548 }
3549
3550 ::fidl_next::Encode::encode(self.files, encoder_, files, (64, ()))?;
3551
3552 Ok(())
3553 }
3554 }
3555
3556 unsafe impl<'a, ___E, T0>
3557 ::fidl_next::Encode<crate::wire::UserbootPostBootfsFilesRequest<'static>, ___E>
3558 for &'a UserbootPostBootfsFilesRequest<T0>
3559 where
3560 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3561 ___E: ::fidl_next::Encoder,
3562 ___E: ::fidl_next::fuchsia::HandleEncoder,
3563 &'a T0: ::fidl_next::Encode<
3564 ::fidl_next::wire::Vector<'static, crate::wire::BootfsFileVmo>,
3565 ___E,
3566 >,
3567 {
3568 #[inline]
3569 fn encode(
3570 self,
3571 encoder_: &mut ___E,
3572 out_: &mut ::core::mem::MaybeUninit<
3573 crate::wire::UserbootPostBootfsFilesRequest<'static>,
3574 >,
3575 _: (),
3576 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3577 ::fidl_next::munge! {
3578 let crate::wire::UserbootPostBootfsFilesRequest {
3579 files,
3580
3581 } = out_;
3582 }
3583
3584 ::fidl_next::Encode::encode(&self.files, encoder_, files, (64, ()))?;
3585
3586 Ok(())
3587 }
3588 }
3589
3590 pub struct UserbootPostStashSvcRequest<T0> {
3592 pub stash_svc_endpoint: T0,
3593 }
3594
3595 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::UserbootPostStashSvcRequest, ___E>
3596 for UserbootPostStashSvcRequest<T0>
3597 where
3598 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3599 ___E: ::fidl_next::fuchsia::HandleEncoder,
3600 T0: ::fidl_next::Encode<
3601 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
3602 ___E,
3603 >,
3604 {
3605 #[inline]
3606 fn encode(
3607 self,
3608 encoder_: &mut ___E,
3609 out_: &mut ::core::mem::MaybeUninit<crate::wire::UserbootPostStashSvcRequest>,
3610 _: (),
3611 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3612 ::fidl_next::munge! {
3613 let crate::wire::UserbootPostStashSvcRequest {
3614 stash_svc_endpoint,
3615
3616 } = out_;
3617 }
3618
3619 ::fidl_next::Encode::encode(self.stash_svc_endpoint, encoder_, stash_svc_endpoint, ())?;
3620
3621 Ok(())
3622 }
3623 }
3624
3625 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::UserbootPostStashSvcRequest, ___E>
3626 for &'a UserbootPostStashSvcRequest<T0>
3627 where
3628 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3629 ___E: ::fidl_next::fuchsia::HandleEncoder,
3630 &'a T0: ::fidl_next::Encode<
3631 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
3632 ___E,
3633 >,
3634 {
3635 #[inline]
3636 fn encode(
3637 self,
3638 encoder_: &mut ___E,
3639 out_: &mut ::core::mem::MaybeUninit<crate::wire::UserbootPostStashSvcRequest>,
3640 _: (),
3641 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3642 ::fidl_next::munge! {
3643 let crate::wire::UserbootPostStashSvcRequest {
3644 stash_svc_endpoint,
3645
3646 } = out_;
3647 }
3648
3649 ::fidl_next::Encode::encode(
3650 &self.stash_svc_endpoint,
3651 encoder_,
3652 stash_svc_endpoint,
3653 (),
3654 )?;
3655
3656 Ok(())
3657 }
3658 }
3659
3660 pub struct WriteOnlyLogGetResponse<T0> {
3662 pub log: T0,
3663 }
3664
3665 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WriteOnlyLogGetResponse, ___E>
3666 for WriteOnlyLogGetResponse<T0>
3667 where
3668 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3669 ___E: ::fidl_next::fuchsia::HandleEncoder,
3670 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::DebugLog, ___E>,
3671 {
3672 #[inline]
3673 fn encode(
3674 self,
3675 encoder_: &mut ___E,
3676 out_: &mut ::core::mem::MaybeUninit<crate::wire::WriteOnlyLogGetResponse>,
3677 _: (),
3678 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3679 ::fidl_next::munge! {
3680 let crate::wire::WriteOnlyLogGetResponse {
3681 log,
3682
3683 } = out_;
3684 }
3685
3686 ::fidl_next::Encode::encode(self.log, encoder_, log, ())?;
3687
3688 Ok(())
3689 }
3690 }
3691
3692 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::WriteOnlyLogGetResponse, ___E>
3693 for &'a WriteOnlyLogGetResponse<T0>
3694 where
3695 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3696 ___E: ::fidl_next::fuchsia::HandleEncoder,
3697 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::DebugLog, ___E>,
3698 {
3699 #[inline]
3700 fn encode(
3701 self,
3702 encoder_: &mut ___E,
3703 out_: &mut ::core::mem::MaybeUninit<crate::wire::WriteOnlyLogGetResponse>,
3704 _: (),
3705 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3706 ::fidl_next::munge! {
3707 let crate::wire::WriteOnlyLogGetResponse {
3708 log,
3709
3710 } = out_;
3711 }
3712
3713 ::fidl_next::Encode::encode(&self.log, encoder_, log, ())?;
3714
3715 Ok(())
3716 }
3717 }
3718}
3719
3720pub use self::natural::*;
3721
3722#[doc = " Protocol for retrieving factory boot item payloads.\n"]
3724#[derive(PartialEq, Debug)]
3725pub struct FactoryItems;
3726
3727impl ::fidl_next::Discoverable for FactoryItems {
3728 const PROTOCOL_NAME: &'static str = "fuchsia.boot.FactoryItems";
3729}
3730
3731#[cfg(target_os = "fuchsia")]
3732impl ::fidl_next::HasTransport for FactoryItems {
3733 type Transport = ::fidl_next::fuchsia::zx::Channel;
3734}
3735
3736pub mod factory_items {
3737 pub mod prelude {
3738 pub use crate::{
3739 FactoryItems, FactoryItemsClientHandler, FactoryItemsLocalClientHandler,
3740 FactoryItemsLocalServerHandler, FactoryItemsServerHandler, factory_items,
3741 };
3742
3743 pub use crate::natural::FactoryItemsGetRequest;
3744
3745 pub use crate::natural::FactoryItemsGetResponse;
3746 }
3747
3748 pub struct Get;
3749
3750 impl ::fidl_next::Method for Get {
3751 const ORDINAL: u64 = 3390589410134308569;
3752 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3753 ::fidl_next::protocol::Flexibility::Strict;
3754
3755 type Protocol = crate::FactoryItems;
3756
3757 type Request = crate::wire::FactoryItemsGetRequest;
3758 }
3759
3760 impl ::fidl_next::TwoWayMethod for Get {
3761 type Response = ::fidl_next::wire::Strict<crate::wire::FactoryItemsGetResponse>;
3762 }
3763
3764 impl<___R> ::fidl_next::Respond<___R> for Get {
3765 type Output = ::fidl_next::Strict<___R>;
3766
3767 fn respond(response: ___R) -> Self::Output {
3768 ::fidl_next::Strict(response)
3769 }
3770 }
3771
3772 mod ___detail {
3773 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::FactoryItems
3774 where
3775 ___T: ::fidl_next::Transport,
3776 {
3777 type Client = FactoryItemsClient<___T>;
3778 type Server = FactoryItemsServer<___T>;
3779 }
3780
3781 #[repr(transparent)]
3783 pub struct FactoryItemsClient<___T: ::fidl_next::Transport> {
3784 #[allow(dead_code)]
3785 client: ::fidl_next::protocol::Client<___T>,
3786 }
3787
3788 impl<___T> FactoryItemsClient<___T>
3789 where
3790 ___T: ::fidl_next::Transport,
3791 {
3792 #[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"]
3793 pub fn get(
3794 &self,
3795
3796 extra: impl ::fidl_next::Encode<
3797 ::fidl_next::wire::Uint32,
3798 <___T as ::fidl_next::Transport>::SendBuffer,
3799 >,
3800 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
3801 where
3802 <___T as ::fidl_next::Transport>::SendBuffer:
3803 ::fidl_next::encoder::InternalHandleEncoder,
3804 {
3805 self.get_with(crate::generic::FactoryItemsGetRequest { extra })
3806 }
3807
3808 #[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"]
3809 pub fn get_with<___R>(
3810 &self,
3811 request: ___R,
3812 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
3813 where
3814 ___R: ::fidl_next::Encode<
3815 crate::wire::FactoryItemsGetRequest,
3816 <___T as ::fidl_next::Transport>::SendBuffer,
3817 >,
3818 {
3819 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3820 3390589410134308569,
3821 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
3822 request,
3823 ))
3824 }
3825 }
3826
3827 #[repr(transparent)]
3829 pub struct FactoryItemsServer<___T: ::fidl_next::Transport> {
3830 server: ::fidl_next::protocol::Server<___T>,
3831 }
3832
3833 impl<___T> FactoryItemsServer<___T> where ___T: ::fidl_next::Transport {}
3834 }
3835}
3836
3837#[diagnostic::on_unimplemented(
3838 note = "If {Self} implements the non-local FactoryItemsClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
3839)]
3840
3841pub trait FactoryItemsLocalClientHandler<
3845 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3846 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3847>
3848{
3849}
3850
3851impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for FactoryItems
3852where
3853 ___H: FactoryItemsLocalClientHandler<___T>,
3854 ___T: ::fidl_next::Transport,
3855{
3856 async fn on_event(
3857 handler: &mut ___H,
3858 mut message: ::fidl_next::Message<___T>,
3859 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3860 match *message.header().ordinal {
3861 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3862 }
3863 }
3864}
3865
3866#[diagnostic::on_unimplemented(
3867 note = "If {Self} implements the non-local FactoryItemsServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
3868)]
3869
3870pub trait FactoryItemsLocalServerHandler<
3874 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3875 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3876>
3877{
3878 #[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"]
3879 fn get(
3880 &mut self,
3881
3882 request: ::fidl_next::Request<factory_items::Get, ___T>,
3883
3884 responder: ::fidl_next::Responder<factory_items::Get, ___T>,
3885 ) -> impl ::core::future::Future<Output = ()>;
3886}
3887
3888impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for FactoryItems
3889where
3890 ___H: FactoryItemsLocalServerHandler<___T>,
3891 ___T: ::fidl_next::Transport,
3892 for<'de> crate::wire::FactoryItemsGetRequest: ::fidl_next::Decode<
3893 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3894 Constraint = (),
3895 >,
3896{
3897 async fn on_one_way(
3898 handler: &mut ___H,
3899 mut message: ::fidl_next::Message<___T>,
3900 ) -> ::core::result::Result<
3901 (),
3902 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3903 > {
3904 match *message.header().ordinal {
3905 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3906 }
3907 }
3908
3909 async fn on_two_way(
3910 handler: &mut ___H,
3911 mut message: ::fidl_next::Message<___T>,
3912 responder: ::fidl_next::protocol::Responder<___T>,
3913 ) -> ::core::result::Result<
3914 (),
3915 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3916 > {
3917 match *message.header().ordinal {
3918 3390589410134308569 => {
3919 let responder = ::fidl_next::Responder::from_untyped(responder);
3920
3921 match ::fidl_next::AsDecoderExt::into_decoded(message) {
3922 Ok(decoded) => {
3923 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
3924 Ok(())
3925 }
3926 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3927 ordinal: 3390589410134308569,
3928 error,
3929 }),
3930 }
3931 }
3932
3933 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3934 }
3935 }
3936}
3937
3938pub trait FactoryItemsClientHandler<
3942 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3943 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3944>
3945{
3946}
3947
3948impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for FactoryItems
3949where
3950 ___H: FactoryItemsClientHandler<___T> + ::core::marker::Send,
3951 ___T: ::fidl_next::Transport,
3952{
3953 async fn on_event(
3954 handler: &mut ___H,
3955 mut message: ::fidl_next::Message<___T>,
3956 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3957 match *message.header().ordinal {
3958 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3959 }
3960 }
3961}
3962
3963pub trait FactoryItemsServerHandler<
3967 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3968 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3969>
3970{
3971 #[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"]
3972 fn get(
3973 &mut self,
3974
3975 request: ::fidl_next::Request<factory_items::Get, ___T>,
3976
3977 responder: ::fidl_next::Responder<factory_items::Get, ___T>,
3978 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3979}
3980
3981impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for FactoryItems
3982where
3983 ___H: FactoryItemsServerHandler<___T> + ::core::marker::Send,
3984 ___T: ::fidl_next::Transport,
3985 for<'de> crate::wire::FactoryItemsGetRequest: ::fidl_next::Decode<
3986 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3987 Constraint = (),
3988 >,
3989{
3990 async fn on_one_way(
3991 handler: &mut ___H,
3992 mut message: ::fidl_next::Message<___T>,
3993 ) -> ::core::result::Result<
3994 (),
3995 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3996 > {
3997 match *message.header().ordinal {
3998 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3999 }
4000 }
4001
4002 async fn on_two_way(
4003 handler: &mut ___H,
4004 mut message: ::fidl_next::Message<___T>,
4005 responder: ::fidl_next::protocol::Responder<___T>,
4006 ) -> ::core::result::Result<
4007 (),
4008 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4009 > {
4010 match *message.header().ordinal {
4011 3390589410134308569 => {
4012 let responder = ::fidl_next::Responder::from_untyped(responder);
4013
4014 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4015 Ok(decoded) => {
4016 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
4017 Ok(())
4018 }
4019 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4020 ordinal: 3390589410134308569,
4021 error,
4022 }),
4023 }
4024 }
4025
4026 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4027 }
4028 }
4029}
4030
4031impl<___T> FactoryItemsClientHandler<___T> for ::fidl_next::IgnoreEvents where
4032 ___T: ::fidl_next::Transport
4033{
4034}
4035
4036impl<___H, ___T> FactoryItemsLocalClientHandler<___T> for ::fidl_next::Local<___H>
4037where
4038 ___H: FactoryItemsClientHandler<___T>,
4039 ___T: ::fidl_next::Transport,
4040{
4041}
4042
4043impl<___H, ___T> FactoryItemsLocalServerHandler<___T> for ::fidl_next::Local<___H>
4044where
4045 ___H: FactoryItemsServerHandler<___T>,
4046 ___T: ::fidl_next::Transport,
4047{
4048 async fn get(
4049 &mut self,
4050
4051 request: ::fidl_next::Request<factory_items::Get, ___T>,
4052
4053 responder: ::fidl_next::Responder<factory_items::Get, ___T>,
4054 ) {
4055 ___H::get(&mut self.0, request, responder).await
4056 }
4057}
4058
4059#[doc = " Protocol for retrieving boot item payloads.\n"]
4061#[derive(PartialEq, Debug)]
4062pub struct Items;
4063
4064impl ::fidl_next::Discoverable for Items {
4065 const PROTOCOL_NAME: &'static str = "fuchsia.boot.Items";
4066}
4067
4068#[cfg(target_os = "fuchsia")]
4069impl ::fidl_next::HasTransport for Items {
4070 type Transport = ::fidl_next::fuchsia::zx::Channel;
4071}
4072
4073pub mod items {
4074 pub mod prelude {
4075 pub use crate::{
4076 Items, ItemsClientHandler, ItemsLocalClientHandler, ItemsLocalServerHandler,
4077 ItemsServerHandler, items,
4078 };
4079
4080 pub use crate::natural::ItemsGet2Request;
4081
4082 pub use crate::natural::ItemsGetBootloaderFileRequest;
4083
4084 pub use crate::natural::ItemsGetBootloaderFileResponse;
4085
4086 pub use crate::natural::ItemsGetRequest;
4087
4088 pub use crate::natural::ItemsGetResponse;
4089
4090 pub use crate::natural::ItemsGet2Response;
4091 }
4092
4093 pub struct Get;
4094
4095 impl ::fidl_next::Method for Get {
4096 const ORDINAL: u64 = 6065702122792689372;
4097 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4098 ::fidl_next::protocol::Flexibility::Strict;
4099
4100 type Protocol = crate::Items;
4101
4102 type Request = crate::wire::ItemsGetRequest;
4103 }
4104
4105 impl ::fidl_next::TwoWayMethod for Get {
4106 type Response = ::fidl_next::wire::Strict<crate::wire::ItemsGetResponse>;
4107 }
4108
4109 impl<___R> ::fidl_next::Respond<___R> for Get {
4110 type Output = ::fidl_next::Strict<___R>;
4111
4112 fn respond(response: ___R) -> Self::Output {
4113 ::fidl_next::Strict(response)
4114 }
4115 }
4116
4117 pub struct Get2;
4118
4119 impl ::fidl_next::Method for Get2 {
4120 const ORDINAL: u64 = 3054774473899786030;
4121 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4122 ::fidl_next::protocol::Flexibility::Strict;
4123
4124 type Protocol = crate::Items;
4125
4126 type Request = crate::wire::ItemsGet2Request<'static>;
4127 }
4128
4129 impl ::fidl_next::TwoWayMethod for Get2 {
4130 type Response = ::fidl_next::wire::Result<
4131 'static,
4132 crate::wire::ItemsGet2Response<'static>,
4133 ::fidl_next::wire::fuchsia::Status,
4134 >;
4135 }
4136
4137 impl<___R> ::fidl_next::Respond<___R> for Get2 {
4138 type Output = ::core::result::Result<
4139 crate::generic::ItemsGet2Response<___R>,
4140 ::fidl_next::never::Never,
4141 >;
4142
4143 fn respond(response: ___R) -> Self::Output {
4144 ::core::result::Result::Ok(crate::generic::ItemsGet2Response {
4145 retrieved_items: response,
4146 })
4147 }
4148 }
4149
4150 impl<___R> ::fidl_next::RespondErr<___R> for Get2 {
4151 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4152
4153 fn respond_err(response: ___R) -> Self::Output {
4154 ::core::result::Result::Err(response)
4155 }
4156 }
4157
4158 pub struct GetBootloaderFile;
4159
4160 impl ::fidl_next::Method for GetBootloaderFile {
4161 const ORDINAL: u64 = 6485268897983860364;
4162 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4163 ::fidl_next::protocol::Flexibility::Strict;
4164
4165 type Protocol = crate::Items;
4166
4167 type Request = crate::wire::ItemsGetBootloaderFileRequest<'static>;
4168 }
4169
4170 impl ::fidl_next::TwoWayMethod for GetBootloaderFile {
4171 type Response = ::fidl_next::wire::Strict<crate::wire::ItemsGetBootloaderFileResponse>;
4172 }
4173
4174 impl<___R> ::fidl_next::Respond<___R> for GetBootloaderFile {
4175 type Output = ::fidl_next::Strict<crate::generic::ItemsGetBootloaderFileResponse<___R>>;
4176
4177 fn respond(response: ___R) -> Self::Output {
4178 ::fidl_next::Strict(crate::generic::ItemsGetBootloaderFileResponse {
4179 payload: response,
4180 })
4181 }
4182 }
4183
4184 mod ___detail {
4185 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Items
4186 where
4187 ___T: ::fidl_next::Transport,
4188 {
4189 type Client = ItemsClient<___T>;
4190 type Server = ItemsServer<___T>;
4191 }
4192
4193 #[repr(transparent)]
4195 pub struct ItemsClient<___T: ::fidl_next::Transport> {
4196 #[allow(dead_code)]
4197 client: ::fidl_next::protocol::Client<___T>,
4198 }
4199
4200 impl<___T> ItemsClient<___T>
4201 where
4202 ___T: ::fidl_next::Transport,
4203 {
4204 #[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"]
4205 pub fn get(
4206 &self,
4207
4208 type_: impl ::fidl_next::Encode<
4209 ::fidl_next::wire::Uint32,
4210 <___T as ::fidl_next::Transport>::SendBuffer,
4211 >,
4212
4213 extra: impl ::fidl_next::Encode<
4214 ::fidl_next::wire::Uint32,
4215 <___T as ::fidl_next::Transport>::SendBuffer,
4216 >,
4217 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
4218 where
4219 <___T as ::fidl_next::Transport>::SendBuffer:
4220 ::fidl_next::encoder::InternalHandleEncoder,
4221 {
4222 self.get_with(crate::generic::ItemsGetRequest { type_, extra })
4223 }
4224
4225 #[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"]
4226 pub fn get_with<___R>(
4227 &self,
4228 request: ___R,
4229 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
4230 where
4231 ___R: ::fidl_next::Encode<
4232 crate::wire::ItemsGetRequest,
4233 <___T as ::fidl_next::Transport>::SendBuffer,
4234 >,
4235 {
4236 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4237 6065702122792689372,
4238 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
4239 request,
4240 ))
4241 }
4242
4243 #[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"]
4244 pub fn get2(
4245 &self,
4246
4247 type_: impl ::fidl_next::Encode<
4248 ::fidl_next::wire::Uint32,
4249 <___T as ::fidl_next::Transport>::SendBuffer,
4250 >,
4251
4252 extra: impl ::fidl_next::Encode<
4253 ::fidl_next::wire::Box<'static, crate::wire::Extra>,
4254 <___T as ::fidl_next::Transport>::SendBuffer,
4255 >,
4256 ) -> ::fidl_next::TwoWayFuture<'_, super::Get2, ___T>
4257 where
4258 <___T as ::fidl_next::Transport>::SendBuffer:
4259 ::fidl_next::encoder::InternalHandleEncoder,
4260 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4261 {
4262 self.get2_with(crate::generic::ItemsGet2Request { type_, extra })
4263 }
4264
4265 #[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"]
4266 pub fn get2_with<___R>(
4267 &self,
4268 request: ___R,
4269 ) -> ::fidl_next::TwoWayFuture<'_, super::Get2, ___T>
4270 where
4271 ___R: ::fidl_next::Encode<
4272 crate::wire::ItemsGet2Request<'static>,
4273 <___T as ::fidl_next::Transport>::SendBuffer,
4274 >,
4275 {
4276 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4277 3054774473899786030,
4278 <super::Get2 as ::fidl_next::Method>::FLEXIBILITY,
4279 request,
4280 ))
4281 }
4282
4283 #[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"]
4284 pub fn get_bootloader_file(
4285 &self,
4286
4287 filename: impl ::fidl_next::Encode<
4288 ::fidl_next::wire::String<'static>,
4289 <___T as ::fidl_next::Transport>::SendBuffer,
4290 >,
4291 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBootloaderFile, ___T>
4292 where
4293 <___T as ::fidl_next::Transport>::SendBuffer:
4294 ::fidl_next::encoder::InternalHandleEncoder,
4295 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4296 {
4297 self.get_bootloader_file_with(crate::generic::ItemsGetBootloaderFileRequest {
4298 filename,
4299 })
4300 }
4301
4302 #[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"]
4303 pub fn get_bootloader_file_with<___R>(
4304 &self,
4305 request: ___R,
4306 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBootloaderFile, ___T>
4307 where
4308 ___R: ::fidl_next::Encode<
4309 crate::wire::ItemsGetBootloaderFileRequest<'static>,
4310 <___T as ::fidl_next::Transport>::SendBuffer,
4311 >,
4312 {
4313 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4314 6485268897983860364,
4315 <super::GetBootloaderFile as ::fidl_next::Method>::FLEXIBILITY,
4316 request,
4317 ))
4318 }
4319 }
4320
4321 #[repr(transparent)]
4323 pub struct ItemsServer<___T: ::fidl_next::Transport> {
4324 server: ::fidl_next::protocol::Server<___T>,
4325 }
4326
4327 impl<___T> ItemsServer<___T> where ___T: ::fidl_next::Transport {}
4328 }
4329}
4330
4331#[diagnostic::on_unimplemented(
4332 note = "If {Self} implements the non-local ItemsClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4333)]
4334
4335pub trait ItemsLocalClientHandler<
4339 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4340 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4341>
4342{
4343}
4344
4345impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Items
4346where
4347 ___H: ItemsLocalClientHandler<___T>,
4348 ___T: ::fidl_next::Transport,
4349{
4350 async fn on_event(
4351 handler: &mut ___H,
4352 mut message: ::fidl_next::Message<___T>,
4353 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4354 match *message.header().ordinal {
4355 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4356 }
4357 }
4358}
4359
4360#[diagnostic::on_unimplemented(
4361 note = "If {Self} implements the non-local ItemsServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4362)]
4363
4364pub trait ItemsLocalServerHandler<
4368 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4369 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4370>
4371{
4372 #[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"]
4373 fn get(
4374 &mut self,
4375
4376 request: ::fidl_next::Request<items::Get, ___T>,
4377
4378 responder: ::fidl_next::Responder<items::Get, ___T>,
4379 ) -> impl ::core::future::Future<Output = ()>;
4380
4381 #[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"]
4382 fn get2(
4383 &mut self,
4384
4385 request: ::fidl_next::Request<items::Get2, ___T>,
4386
4387 responder: ::fidl_next::Responder<items::Get2, ___T>,
4388 ) -> impl ::core::future::Future<Output = ()>;
4389
4390 #[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"]
4391 fn get_bootloader_file(
4392 &mut self,
4393
4394 request: ::fidl_next::Request<items::GetBootloaderFile, ___T>,
4395
4396 responder: ::fidl_next::Responder<items::GetBootloaderFile, ___T>,
4397 ) -> impl ::core::future::Future<Output = ()>;
4398}
4399
4400impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Items
4401where
4402 ___H: ItemsLocalServerHandler<___T>,
4403 ___T: ::fidl_next::Transport,
4404 for<'de> crate::wire::ItemsGetRequest: ::fidl_next::Decode<
4405 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4406 Constraint = (),
4407 >,
4408 for<'de> crate::wire::ItemsGet2Request<'de>: ::fidl_next::Decode<
4409 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4410 Constraint = (),
4411 >,
4412 for<'de> crate::wire::ItemsGetBootloaderFileRequest<'de>: ::fidl_next::Decode<
4413 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4414 Constraint = (),
4415 >,
4416{
4417 async fn on_one_way(
4418 handler: &mut ___H,
4419 mut message: ::fidl_next::Message<___T>,
4420 ) -> ::core::result::Result<
4421 (),
4422 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4423 > {
4424 match *message.header().ordinal {
4425 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4426 }
4427 }
4428
4429 async fn on_two_way(
4430 handler: &mut ___H,
4431 mut message: ::fidl_next::Message<___T>,
4432 responder: ::fidl_next::protocol::Responder<___T>,
4433 ) -> ::core::result::Result<
4434 (),
4435 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4436 > {
4437 match *message.header().ordinal {
4438 6065702122792689372 => {
4439 let responder = ::fidl_next::Responder::from_untyped(responder);
4440
4441 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4442 Ok(decoded) => {
4443 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
4444 Ok(())
4445 }
4446 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4447 ordinal: 6065702122792689372,
4448 error,
4449 }),
4450 }
4451 }
4452
4453 3054774473899786030 => {
4454 let responder = ::fidl_next::Responder::from_untyped(responder);
4455
4456 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4457 Ok(decoded) => {
4458 handler.get2(::fidl_next::Request::from_decoded(decoded), responder).await;
4459 Ok(())
4460 }
4461 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4462 ordinal: 3054774473899786030,
4463 error,
4464 }),
4465 }
4466 }
4467
4468 6485268897983860364 => {
4469 let responder = ::fidl_next::Responder::from_untyped(responder);
4470
4471 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4472 Ok(decoded) => {
4473 handler
4474 .get_bootloader_file(
4475 ::fidl_next::Request::from_decoded(decoded),
4476 responder,
4477 )
4478 .await;
4479 Ok(())
4480 }
4481 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4482 ordinal: 6485268897983860364,
4483 error,
4484 }),
4485 }
4486 }
4487
4488 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4489 }
4490 }
4491}
4492
4493pub trait ItemsClientHandler<
4497 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4498 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4499>
4500{
4501}
4502
4503impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Items
4504where
4505 ___H: ItemsClientHandler<___T> + ::core::marker::Send,
4506 ___T: ::fidl_next::Transport,
4507{
4508 async fn on_event(
4509 handler: &mut ___H,
4510 mut message: ::fidl_next::Message<___T>,
4511 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4512 match *message.header().ordinal {
4513 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4514 }
4515 }
4516}
4517
4518pub trait ItemsServerHandler<
4522 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4523 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4524>
4525{
4526 #[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"]
4527 fn get(
4528 &mut self,
4529
4530 request: ::fidl_next::Request<items::Get, ___T>,
4531
4532 responder: ::fidl_next::Responder<items::Get, ___T>,
4533 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4534
4535 #[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"]
4536 fn get2(
4537 &mut self,
4538
4539 request: ::fidl_next::Request<items::Get2, ___T>,
4540
4541 responder: ::fidl_next::Responder<items::Get2, ___T>,
4542 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4543
4544 #[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"]
4545 fn get_bootloader_file(
4546 &mut self,
4547
4548 request: ::fidl_next::Request<items::GetBootloaderFile, ___T>,
4549
4550 responder: ::fidl_next::Responder<items::GetBootloaderFile, ___T>,
4551 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4552}
4553
4554impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Items
4555where
4556 ___H: ItemsServerHandler<___T> + ::core::marker::Send,
4557 ___T: ::fidl_next::Transport,
4558 for<'de> crate::wire::ItemsGetRequest: ::fidl_next::Decode<
4559 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4560 Constraint = (),
4561 >,
4562 for<'de> crate::wire::ItemsGet2Request<'de>: ::fidl_next::Decode<
4563 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4564 Constraint = (),
4565 >,
4566 for<'de> crate::wire::ItemsGetBootloaderFileRequest<'de>: ::fidl_next::Decode<
4567 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4568 Constraint = (),
4569 >,
4570{
4571 async fn on_one_way(
4572 handler: &mut ___H,
4573 mut message: ::fidl_next::Message<___T>,
4574 ) -> ::core::result::Result<
4575 (),
4576 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4577 > {
4578 match *message.header().ordinal {
4579 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4580 }
4581 }
4582
4583 async fn on_two_way(
4584 handler: &mut ___H,
4585 mut message: ::fidl_next::Message<___T>,
4586 responder: ::fidl_next::protocol::Responder<___T>,
4587 ) -> ::core::result::Result<
4588 (),
4589 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4590 > {
4591 match *message.header().ordinal {
4592 6065702122792689372 => {
4593 let responder = ::fidl_next::Responder::from_untyped(responder);
4594
4595 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4596 Ok(decoded) => {
4597 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
4598 Ok(())
4599 }
4600 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4601 ordinal: 6065702122792689372,
4602 error,
4603 }),
4604 }
4605 }
4606
4607 3054774473899786030 => {
4608 let responder = ::fidl_next::Responder::from_untyped(responder);
4609
4610 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4611 Ok(decoded) => {
4612 handler.get2(::fidl_next::Request::from_decoded(decoded), responder).await;
4613 Ok(())
4614 }
4615 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4616 ordinal: 3054774473899786030,
4617 error,
4618 }),
4619 }
4620 }
4621
4622 6485268897983860364 => {
4623 let responder = ::fidl_next::Responder::from_untyped(responder);
4624
4625 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4626 Ok(decoded) => {
4627 handler
4628 .get_bootloader_file(
4629 ::fidl_next::Request::from_decoded(decoded),
4630 responder,
4631 )
4632 .await;
4633 Ok(())
4634 }
4635 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4636 ordinal: 6485268897983860364,
4637 error,
4638 }),
4639 }
4640 }
4641
4642 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4643 }
4644 }
4645}
4646
4647impl<___T> ItemsClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
4648
4649impl<___H, ___T> ItemsLocalClientHandler<___T> for ::fidl_next::Local<___H>
4650where
4651 ___H: ItemsClientHandler<___T>,
4652 ___T: ::fidl_next::Transport,
4653{
4654}
4655
4656impl<___H, ___T> ItemsLocalServerHandler<___T> for ::fidl_next::Local<___H>
4657where
4658 ___H: ItemsServerHandler<___T>,
4659 ___T: ::fidl_next::Transport,
4660{
4661 async fn get(
4662 &mut self,
4663
4664 request: ::fidl_next::Request<items::Get, ___T>,
4665
4666 responder: ::fidl_next::Responder<items::Get, ___T>,
4667 ) {
4668 ___H::get(&mut self.0, request, responder).await
4669 }
4670
4671 async fn get2(
4672 &mut self,
4673
4674 request: ::fidl_next::Request<items::Get2, ___T>,
4675
4676 responder: ::fidl_next::Responder<items::Get2, ___T>,
4677 ) {
4678 ___H::get2(&mut self.0, request, responder).await
4679 }
4680
4681 async fn get_bootloader_file(
4682 &mut self,
4683
4684 request: ::fidl_next::Request<items::GetBootloaderFile, ___T>,
4685
4686 responder: ::fidl_next::Responder<items::GetBootloaderFile, ___T>,
4687 ) {
4688 ___H::get_bootloader_file(&mut self.0, request, responder).await
4689 }
4690}
4691
4692#[doc = " Protocol for providing the kernel log, readable.\n"]
4694#[derive(PartialEq, Debug)]
4695pub struct ReadOnlyLog;
4696
4697impl ::fidl_next::Discoverable for ReadOnlyLog {
4698 const PROTOCOL_NAME: &'static str = "fuchsia.boot.ReadOnlyLog";
4699}
4700
4701#[cfg(target_os = "fuchsia")]
4702impl ::fidl_next::HasTransport for ReadOnlyLog {
4703 type Transport = ::fidl_next::fuchsia::zx::Channel;
4704}
4705
4706pub mod read_only_log {
4707 pub mod prelude {
4708 pub use crate::{
4709 ReadOnlyLog, ReadOnlyLogClientHandler, ReadOnlyLogLocalClientHandler,
4710 ReadOnlyLogLocalServerHandler, ReadOnlyLogServerHandler, read_only_log,
4711 };
4712
4713 pub use crate::natural::ReadOnlyLogGetResponse;
4714 }
4715
4716 pub struct Get;
4717
4718 impl ::fidl_next::Method for Get {
4719 const ORDINAL: u64 = 8015540534685233663;
4720 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4721 ::fidl_next::protocol::Flexibility::Strict;
4722
4723 type Protocol = crate::ReadOnlyLog;
4724
4725 type Request = ::fidl_next::wire::EmptyMessageBody;
4726 }
4727
4728 impl ::fidl_next::TwoWayMethod for Get {
4729 type Response = ::fidl_next::wire::Strict<crate::wire::ReadOnlyLogGetResponse>;
4730 }
4731
4732 impl<___R> ::fidl_next::Respond<___R> for Get {
4733 type Output = ::fidl_next::Strict<crate::generic::ReadOnlyLogGetResponse<___R>>;
4734
4735 fn respond(response: ___R) -> Self::Output {
4736 ::fidl_next::Strict(crate::generic::ReadOnlyLogGetResponse { log: response })
4737 }
4738 }
4739
4740 mod ___detail {
4741 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ReadOnlyLog
4742 where
4743 ___T: ::fidl_next::Transport,
4744 {
4745 type Client = ReadOnlyLogClient<___T>;
4746 type Server = ReadOnlyLogServer<___T>;
4747 }
4748
4749 #[repr(transparent)]
4751 pub struct ReadOnlyLogClient<___T: ::fidl_next::Transport> {
4752 #[allow(dead_code)]
4753 client: ::fidl_next::protocol::Client<___T>,
4754 }
4755
4756 impl<___T> ReadOnlyLogClient<___T>
4757 where
4758 ___T: ::fidl_next::Transport,
4759 {
4760 #[doc = " Get read-only handle to the kernel `log`.\n"]
4761 pub fn get(&self) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T> {
4762 ::fidl_next::TwoWayFuture::from_untyped(
4763 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4764 8015540534685233663,
4765 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
4766 (),
4767 ),
4768 )
4769 }
4770 }
4771
4772 #[repr(transparent)]
4774 pub struct ReadOnlyLogServer<___T: ::fidl_next::Transport> {
4775 server: ::fidl_next::protocol::Server<___T>,
4776 }
4777
4778 impl<___T> ReadOnlyLogServer<___T> where ___T: ::fidl_next::Transport {}
4779 }
4780}
4781
4782#[diagnostic::on_unimplemented(
4783 note = "If {Self} implements the non-local ReadOnlyLogClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4784)]
4785
4786pub trait ReadOnlyLogLocalClientHandler<
4790 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4791 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4792>
4793{
4794}
4795
4796impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ReadOnlyLog
4797where
4798 ___H: ReadOnlyLogLocalClientHandler<___T>,
4799 ___T: ::fidl_next::Transport,
4800{
4801 async fn on_event(
4802 handler: &mut ___H,
4803 mut message: ::fidl_next::Message<___T>,
4804 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4805 match *message.header().ordinal {
4806 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4807 }
4808 }
4809}
4810
4811#[diagnostic::on_unimplemented(
4812 note = "If {Self} implements the non-local ReadOnlyLogServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4813)]
4814
4815pub trait ReadOnlyLogLocalServerHandler<
4819 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4820 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4821>
4822{
4823 #[doc = " Get read-only handle to the kernel `log`.\n"]
4824 fn get(
4825 &mut self,
4826
4827 responder: ::fidl_next::Responder<read_only_log::Get, ___T>,
4828 ) -> impl ::core::future::Future<Output = ()>;
4829}
4830
4831impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ReadOnlyLog
4832where
4833 ___H: ReadOnlyLogLocalServerHandler<___T>,
4834 ___T: ::fidl_next::Transport,
4835{
4836 async fn on_one_way(
4837 handler: &mut ___H,
4838 mut message: ::fidl_next::Message<___T>,
4839 ) -> ::core::result::Result<
4840 (),
4841 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4842 > {
4843 match *message.header().ordinal {
4844 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4845 }
4846 }
4847
4848 async fn on_two_way(
4849 handler: &mut ___H,
4850 mut message: ::fidl_next::Message<___T>,
4851 responder: ::fidl_next::protocol::Responder<___T>,
4852 ) -> ::core::result::Result<
4853 (),
4854 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4855 > {
4856 match *message.header().ordinal {
4857 8015540534685233663 => {
4858 let responder = ::fidl_next::Responder::from_untyped(responder);
4859
4860 handler.get(responder).await;
4861 Ok(())
4862 }
4863
4864 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4865 }
4866 }
4867}
4868
4869pub trait ReadOnlyLogClientHandler<
4873 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4874 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4875>
4876{
4877}
4878
4879impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ReadOnlyLog
4880where
4881 ___H: ReadOnlyLogClientHandler<___T> + ::core::marker::Send,
4882 ___T: ::fidl_next::Transport,
4883{
4884 async fn on_event(
4885 handler: &mut ___H,
4886 mut message: ::fidl_next::Message<___T>,
4887 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4888 match *message.header().ordinal {
4889 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4890 }
4891 }
4892}
4893
4894pub trait ReadOnlyLogServerHandler<
4898 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4899 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4900>
4901{
4902 #[doc = " Get read-only handle to the kernel `log`.\n"]
4903 fn get(
4904 &mut self,
4905
4906 responder: ::fidl_next::Responder<read_only_log::Get, ___T>,
4907 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4908}
4909
4910impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ReadOnlyLog
4911where
4912 ___H: ReadOnlyLogServerHandler<___T> + ::core::marker::Send,
4913 ___T: ::fidl_next::Transport,
4914{
4915 async fn on_one_way(
4916 handler: &mut ___H,
4917 mut message: ::fidl_next::Message<___T>,
4918 ) -> ::core::result::Result<
4919 (),
4920 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4921 > {
4922 match *message.header().ordinal {
4923 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4924 }
4925 }
4926
4927 async fn on_two_way(
4928 handler: &mut ___H,
4929 mut message: ::fidl_next::Message<___T>,
4930 responder: ::fidl_next::protocol::Responder<___T>,
4931 ) -> ::core::result::Result<
4932 (),
4933 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4934 > {
4935 match *message.header().ordinal {
4936 8015540534685233663 => {
4937 let responder = ::fidl_next::Responder::from_untyped(responder);
4938
4939 handler.get(responder).await;
4940 Ok(())
4941 }
4942
4943 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4944 }
4945 }
4946}
4947
4948impl<___T> ReadOnlyLogClientHandler<___T> for ::fidl_next::IgnoreEvents where
4949 ___T: ::fidl_next::Transport
4950{
4951}
4952
4953impl<___H, ___T> ReadOnlyLogLocalClientHandler<___T> for ::fidl_next::Local<___H>
4954where
4955 ___H: ReadOnlyLogClientHandler<___T>,
4956 ___T: ::fidl_next::Transport,
4957{
4958}
4959
4960impl<___H, ___T> ReadOnlyLogLocalServerHandler<___T> for ::fidl_next::Local<___H>
4961where
4962 ___H: ReadOnlyLogServerHandler<___T>,
4963 ___T: ::fidl_next::Transport,
4964{
4965 async fn get(&mut self, responder: ::fidl_next::Responder<read_only_log::Get, ___T>) {
4966 ___H::get(&mut self.0, responder).await
4967 }
4968}
4969
4970#[doc = " Protocol for storing svc server ends of \'svc\' for later processing during early boot.\n"]
4972#[derive(PartialEq, Debug)]
4973pub struct SvcStash;
4974
4975#[cfg(target_os = "fuchsia")]
4976impl ::fidl_next::HasTransport for SvcStash {
4977 type Transport = ::fidl_next::fuchsia::zx::Channel;
4978}
4979
4980pub mod svc_stash {
4981 pub mod prelude {
4982 pub use crate::{
4983 SvcStash, SvcStashClientHandler, SvcStashLocalClientHandler,
4984 SvcStashLocalServerHandler, SvcStashServerHandler, svc_stash,
4985 };
4986
4987 pub use crate::natural::SvcStashStoreRequest;
4988 }
4989
4990 pub struct Store;
4991
4992 impl ::fidl_next::Method for Store {
4993 const ORDINAL: u64 = 875467318821005424;
4994 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4995 ::fidl_next::protocol::Flexibility::Strict;
4996
4997 type Protocol = crate::SvcStash;
4998
4999 type Request = crate::wire::SvcStashStoreRequest;
5000 }
5001
5002 mod ___detail {
5003 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::SvcStash
5004 where
5005 ___T: ::fidl_next::Transport,
5006 {
5007 type Client = SvcStashClient<___T>;
5008 type Server = SvcStashServer<___T>;
5009 }
5010
5011 #[repr(transparent)]
5013 pub struct SvcStashClient<___T: ::fidl_next::Transport> {
5014 #[allow(dead_code)]
5015 client: ::fidl_next::protocol::Client<___T>,
5016 }
5017
5018 impl<___T> SvcStashClient<___T>
5019 where
5020 ___T: ::fidl_next::Transport,
5021 {
5022 #[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"]
5023 pub fn store(
5024 &self,
5025
5026 svc_endpoint: impl ::fidl_next::Encode<
5027 ::fidl_next::ServerEnd<
5028 ::fidl_next_fuchsia_io::Directory,
5029 ::fidl_next::wire::fuchsia::Channel,
5030 >,
5031 <___T as ::fidl_next::Transport>::SendBuffer,
5032 >,
5033 ) -> ::fidl_next::SendFuture<'_, ___T>
5034 where
5035 <___T as ::fidl_next::Transport>::SendBuffer:
5036 ::fidl_next::encoder::InternalHandleEncoder,
5037 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5038 {
5039 self.store_with(crate::generic::SvcStashStoreRequest { svc_endpoint })
5040 }
5041
5042 #[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"]
5043 pub fn store_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
5044 where
5045 ___R: ::fidl_next::Encode<
5046 crate::wire::SvcStashStoreRequest,
5047 <___T as ::fidl_next::Transport>::SendBuffer,
5048 >,
5049 {
5050 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5051 875467318821005424,
5052 <super::Store as ::fidl_next::Method>::FLEXIBILITY,
5053 request,
5054 ))
5055 }
5056 }
5057
5058 #[repr(transparent)]
5060 pub struct SvcStashServer<___T: ::fidl_next::Transport> {
5061 server: ::fidl_next::protocol::Server<___T>,
5062 }
5063
5064 impl<___T> SvcStashServer<___T> where ___T: ::fidl_next::Transport {}
5065 }
5066}
5067
5068#[diagnostic::on_unimplemented(
5069 note = "If {Self} implements the non-local SvcStashClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5070)]
5071
5072pub trait SvcStashLocalClientHandler<
5076 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5077 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5078>
5079{
5080}
5081
5082impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for SvcStash
5083where
5084 ___H: SvcStashLocalClientHandler<___T>,
5085 ___T: ::fidl_next::Transport,
5086{
5087 async fn on_event(
5088 handler: &mut ___H,
5089 mut message: ::fidl_next::Message<___T>,
5090 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5091 match *message.header().ordinal {
5092 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5093 }
5094 }
5095}
5096
5097#[diagnostic::on_unimplemented(
5098 note = "If {Self} implements the non-local SvcStashServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5099)]
5100
5101pub trait SvcStashLocalServerHandler<
5105 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5106 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5107>
5108{
5109 #[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"]
5110 fn store(
5111 &mut self,
5112
5113 request: ::fidl_next::Request<svc_stash::Store, ___T>,
5114 ) -> impl ::core::future::Future<Output = ()>;
5115}
5116
5117impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for SvcStash
5118where
5119 ___H: SvcStashLocalServerHandler<___T>,
5120 ___T: ::fidl_next::Transport,
5121 for<'de> crate::wire::SvcStashStoreRequest: ::fidl_next::Decode<
5122 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5123 Constraint = (),
5124 >,
5125{
5126 async fn on_one_way(
5127 handler: &mut ___H,
5128 mut message: ::fidl_next::Message<___T>,
5129 ) -> ::core::result::Result<
5130 (),
5131 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5132 > {
5133 match *message.header().ordinal {
5134 875467318821005424 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5135 Ok(decoded) => {
5136 handler.store(::fidl_next::Request::from_decoded(decoded)).await;
5137 Ok(())
5138 }
5139 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5140 ordinal: 875467318821005424,
5141 error,
5142 }),
5143 },
5144
5145 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5146 }
5147 }
5148
5149 async fn on_two_way(
5150 handler: &mut ___H,
5151 mut message: ::fidl_next::Message<___T>,
5152 responder: ::fidl_next::protocol::Responder<___T>,
5153 ) -> ::core::result::Result<
5154 (),
5155 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5156 > {
5157 match *message.header().ordinal {
5158 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5159 }
5160 }
5161}
5162
5163pub trait SvcStashClientHandler<
5167 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5168 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5169>
5170{
5171}
5172
5173impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for SvcStash
5174where
5175 ___H: SvcStashClientHandler<___T> + ::core::marker::Send,
5176 ___T: ::fidl_next::Transport,
5177{
5178 async fn on_event(
5179 handler: &mut ___H,
5180 mut message: ::fidl_next::Message<___T>,
5181 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5182 match *message.header().ordinal {
5183 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5184 }
5185 }
5186}
5187
5188pub trait SvcStashServerHandler<
5192 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5193 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5194>
5195{
5196 #[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"]
5197 fn store(
5198 &mut self,
5199
5200 request: ::fidl_next::Request<svc_stash::Store, ___T>,
5201 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5202}
5203
5204impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for SvcStash
5205where
5206 ___H: SvcStashServerHandler<___T> + ::core::marker::Send,
5207 ___T: ::fidl_next::Transport,
5208 for<'de> crate::wire::SvcStashStoreRequest: ::fidl_next::Decode<
5209 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5210 Constraint = (),
5211 >,
5212{
5213 async fn on_one_way(
5214 handler: &mut ___H,
5215 mut message: ::fidl_next::Message<___T>,
5216 ) -> ::core::result::Result<
5217 (),
5218 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5219 > {
5220 match *message.header().ordinal {
5221 875467318821005424 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5222 Ok(decoded) => {
5223 handler.store(::fidl_next::Request::from_decoded(decoded)).await;
5224 Ok(())
5225 }
5226 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5227 ordinal: 875467318821005424,
5228 error,
5229 }),
5230 },
5231
5232 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5233 }
5234 }
5235
5236 async fn on_two_way(
5237 handler: &mut ___H,
5238 mut message: ::fidl_next::Message<___T>,
5239 responder: ::fidl_next::protocol::Responder<___T>,
5240 ) -> ::core::result::Result<
5241 (),
5242 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5243 > {
5244 match *message.header().ordinal {
5245 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5246 }
5247 }
5248}
5249
5250impl<___T> SvcStashClientHandler<___T> for ::fidl_next::IgnoreEvents where
5251 ___T: ::fidl_next::Transport
5252{
5253}
5254
5255impl<___H, ___T> SvcStashLocalClientHandler<___T> for ::fidl_next::Local<___H>
5256where
5257 ___H: SvcStashClientHandler<___T>,
5258 ___T: ::fidl_next::Transport,
5259{
5260}
5261
5262impl<___H, ___T> SvcStashLocalServerHandler<___T> for ::fidl_next::Local<___H>
5263where
5264 ___H: SvcStashServerHandler<___T>,
5265 ___T: ::fidl_next::Transport,
5266{
5267 async fn store(&mut self, request: ::fidl_next::Request<svc_stash::Store, ___T>) {
5268 ___H::store(&mut self.0, request).await
5269 }
5270}
5271
5272#[doc = " Protocol for providing the server end of the \'SvcStash\'.\n"]
5274#[derive(PartialEq, Debug)]
5275pub struct SvcStashProvider;
5276
5277impl ::fidl_next::Discoverable for SvcStashProvider {
5278 const PROTOCOL_NAME: &'static str = "fuchsia.boot.SvcStashProvider";
5279}
5280
5281#[cfg(target_os = "fuchsia")]
5282impl ::fidl_next::HasTransport for SvcStashProvider {
5283 type Transport = ::fidl_next::fuchsia::zx::Channel;
5284}
5285
5286pub mod svc_stash_provider {
5287 pub mod prelude {
5288 pub use crate::{
5289 SvcStashProvider, SvcStashProviderClientHandler, SvcStashProviderLocalClientHandler,
5290 SvcStashProviderLocalServerHandler, SvcStashProviderServerHandler, svc_stash_provider,
5291 };
5292
5293 pub use crate::natural::SvcStashProviderGetResponse;
5294 }
5295
5296 pub struct Get;
5297
5298 impl ::fidl_next::Method for Get {
5299 const ORDINAL: u64 = 4072866865090984067;
5300 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5301 ::fidl_next::protocol::Flexibility::Strict;
5302
5303 type Protocol = crate::SvcStashProvider;
5304
5305 type Request = ::fidl_next::wire::EmptyMessageBody;
5306 }
5307
5308 impl ::fidl_next::TwoWayMethod for Get {
5309 type Response = ::fidl_next::wire::Result<
5310 'static,
5311 crate::wire::SvcStashProviderGetResponse,
5312 ::fidl_next::wire::fuchsia::Status,
5313 >;
5314 }
5315
5316 impl<___R> ::fidl_next::Respond<___R> for Get {
5317 type Output = ::core::result::Result<
5318 crate::generic::SvcStashProviderGetResponse<___R>,
5319 ::fidl_next::never::Never,
5320 >;
5321
5322 fn respond(response: ___R) -> Self::Output {
5323 ::core::result::Result::Ok(crate::generic::SvcStashProviderGetResponse {
5324 resource: response,
5325 })
5326 }
5327 }
5328
5329 impl<___R> ::fidl_next::RespondErr<___R> for Get {
5330 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5331
5332 fn respond_err(response: ___R) -> Self::Output {
5333 ::core::result::Result::Err(response)
5334 }
5335 }
5336
5337 mod ___detail {
5338 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::SvcStashProvider
5339 where
5340 ___T: ::fidl_next::Transport,
5341 {
5342 type Client = SvcStashProviderClient<___T>;
5343 type Server = SvcStashProviderServer<___T>;
5344 }
5345
5346 #[repr(transparent)]
5348 pub struct SvcStashProviderClient<___T: ::fidl_next::Transport> {
5349 #[allow(dead_code)]
5350 client: ::fidl_next::protocol::Client<___T>,
5351 }
5352
5353 impl<___T> SvcStashProviderClient<___T>
5354 where
5355 ___T: ::fidl_next::Transport,
5356 {
5357 #[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"]
5358 pub fn get(&self) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T> {
5359 ::fidl_next::TwoWayFuture::from_untyped(
5360 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
5361 4072866865090984067,
5362 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
5363 (),
5364 ),
5365 )
5366 }
5367 }
5368
5369 #[repr(transparent)]
5371 pub struct SvcStashProviderServer<___T: ::fidl_next::Transport> {
5372 server: ::fidl_next::protocol::Server<___T>,
5373 }
5374
5375 impl<___T> SvcStashProviderServer<___T> where ___T: ::fidl_next::Transport {}
5376 }
5377}
5378
5379#[diagnostic::on_unimplemented(
5380 note = "If {Self} implements the non-local SvcStashProviderClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5381)]
5382
5383pub trait SvcStashProviderLocalClientHandler<
5387 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5388 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5389>
5390{
5391}
5392
5393impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for SvcStashProvider
5394where
5395 ___H: SvcStashProviderLocalClientHandler<___T>,
5396 ___T: ::fidl_next::Transport,
5397{
5398 async fn on_event(
5399 handler: &mut ___H,
5400 mut message: ::fidl_next::Message<___T>,
5401 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5402 match *message.header().ordinal {
5403 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5404 }
5405 }
5406}
5407
5408#[diagnostic::on_unimplemented(
5409 note = "If {Self} implements the non-local SvcStashProviderServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5410)]
5411
5412pub trait SvcStashProviderLocalServerHandler<
5416 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5417 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5418>
5419{
5420 #[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"]
5421 fn get(
5422 &mut self,
5423
5424 responder: ::fidl_next::Responder<svc_stash_provider::Get, ___T>,
5425 ) -> impl ::core::future::Future<Output = ()>;
5426}
5427
5428impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for SvcStashProvider
5429where
5430 ___H: SvcStashProviderLocalServerHandler<___T>,
5431 ___T: ::fidl_next::Transport,
5432{
5433 async fn on_one_way(
5434 handler: &mut ___H,
5435 mut message: ::fidl_next::Message<___T>,
5436 ) -> ::core::result::Result<
5437 (),
5438 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5439 > {
5440 match *message.header().ordinal {
5441 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5442 }
5443 }
5444
5445 async fn on_two_way(
5446 handler: &mut ___H,
5447 mut message: ::fidl_next::Message<___T>,
5448 responder: ::fidl_next::protocol::Responder<___T>,
5449 ) -> ::core::result::Result<
5450 (),
5451 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5452 > {
5453 match *message.header().ordinal {
5454 4072866865090984067 => {
5455 let responder = ::fidl_next::Responder::from_untyped(responder);
5456
5457 handler.get(responder).await;
5458 Ok(())
5459 }
5460
5461 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5462 }
5463 }
5464}
5465
5466pub trait SvcStashProviderClientHandler<
5470 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5471 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5472>
5473{
5474}
5475
5476impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for SvcStashProvider
5477where
5478 ___H: SvcStashProviderClientHandler<___T> + ::core::marker::Send,
5479 ___T: ::fidl_next::Transport,
5480{
5481 async fn on_event(
5482 handler: &mut ___H,
5483 mut message: ::fidl_next::Message<___T>,
5484 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5485 match *message.header().ordinal {
5486 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5487 }
5488 }
5489}
5490
5491pub trait SvcStashProviderServerHandler<
5495 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5496 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5497>
5498{
5499 #[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"]
5500 fn get(
5501 &mut self,
5502
5503 responder: ::fidl_next::Responder<svc_stash_provider::Get, ___T>,
5504 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5505}
5506
5507impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for SvcStashProvider
5508where
5509 ___H: SvcStashProviderServerHandler<___T> + ::core::marker::Send,
5510 ___T: ::fidl_next::Transport,
5511{
5512 async fn on_one_way(
5513 handler: &mut ___H,
5514 mut message: ::fidl_next::Message<___T>,
5515 ) -> ::core::result::Result<
5516 (),
5517 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5518 > {
5519 match *message.header().ordinal {
5520 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5521 }
5522 }
5523
5524 async fn on_two_way(
5525 handler: &mut ___H,
5526 mut message: ::fidl_next::Message<___T>,
5527 responder: ::fidl_next::protocol::Responder<___T>,
5528 ) -> ::core::result::Result<
5529 (),
5530 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5531 > {
5532 match *message.header().ordinal {
5533 4072866865090984067 => {
5534 let responder = ::fidl_next::Responder::from_untyped(responder);
5535
5536 handler.get(responder).await;
5537 Ok(())
5538 }
5539
5540 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5541 }
5542 }
5543}
5544
5545impl<___T> SvcStashProviderClientHandler<___T> for ::fidl_next::IgnoreEvents where
5546 ___T: ::fidl_next::Transport
5547{
5548}
5549
5550impl<___H, ___T> SvcStashProviderLocalClientHandler<___T> for ::fidl_next::Local<___H>
5551where
5552 ___H: SvcStashProviderClientHandler<___T>,
5553 ___T: ::fidl_next::Transport,
5554{
5555}
5556
5557impl<___H, ___T> SvcStashProviderLocalServerHandler<___T> for ::fidl_next::Local<___H>
5558where
5559 ___H: SvcStashProviderServerHandler<___T>,
5560 ___T: ::fidl_next::Transport,
5561{
5562 async fn get(&mut self, responder: ::fidl_next::Responder<svc_stash_provider::Get, ___T>) {
5563 ___H::get(&mut self.0, responder).await
5564 }
5565}
5566
5567#[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"]
5569#[derive(PartialEq, Debug)]
5570pub struct Userboot;
5571
5572#[cfg(target_os = "fuchsia")]
5573impl ::fidl_next::HasTransport for Userboot {
5574 type Transport = ::fidl_next::fuchsia::zx::Channel;
5575}
5576
5577pub mod userboot {
5578 pub mod prelude {
5579 pub use crate::{
5580 Userboot, UserbootClientHandler, UserbootLocalClientHandler,
5581 UserbootLocalServerHandler, UserbootServerHandler, userboot,
5582 };
5583
5584 pub use crate::natural::UserbootPostBootHandlesRequest;
5585
5586 pub use crate::natural::UserbootPostBootfsFilesRequest;
5587
5588 pub use crate::natural::UserbootPostBootfsVmoRequest;
5589
5590 pub use crate::natural::UserbootPostStashSvcRequest;
5591 }
5592
5593 pub struct PostBootfsVmo;
5594
5595 impl ::fidl_next::Method for PostBootfsVmo {
5596 const ORDINAL: u64 = 4298509372112764915;
5597 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5598 ::fidl_next::protocol::Flexibility::Strict;
5599
5600 type Protocol = crate::Userboot;
5601
5602 type Request = crate::wire::UserbootPostBootfsVmoRequest;
5603 }
5604
5605 pub struct PostBootfsFiles;
5606
5607 impl ::fidl_next::Method for PostBootfsFiles {
5608 const ORDINAL: u64 = 2985117035928536724;
5609 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5610 ::fidl_next::protocol::Flexibility::Strict;
5611
5612 type Protocol = crate::Userboot;
5613
5614 type Request = crate::wire::UserbootPostBootfsFilesRequest<'static>;
5615 }
5616
5617 pub struct PostBootHandles;
5618
5619 impl ::fidl_next::Method for PostBootHandles {
5620 const ORDINAL: u64 = 6990348864384659947;
5621 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5622 ::fidl_next::protocol::Flexibility::Strict;
5623
5624 type Protocol = crate::Userboot;
5625
5626 type Request = crate::wire::UserbootPostBootHandlesRequest<'static>;
5627 }
5628
5629 pub struct PostStashSvc;
5630
5631 impl ::fidl_next::Method for PostStashSvc {
5632 const ORDINAL: u64 = 5795797909204819628;
5633 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5634 ::fidl_next::protocol::Flexibility::Strict;
5635
5636 type Protocol = crate::Userboot;
5637
5638 type Request = crate::wire::UserbootPostStashSvcRequest;
5639 }
5640
5641 mod ___detail {
5642 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Userboot
5643 where
5644 ___T: ::fidl_next::Transport,
5645 {
5646 type Client = UserbootClient<___T>;
5647 type Server = UserbootServer<___T>;
5648 }
5649
5650 #[repr(transparent)]
5652 pub struct UserbootClient<___T: ::fidl_next::Transport> {
5653 #[allow(dead_code)]
5654 client: ::fidl_next::protocol::Client<___T>,
5655 }
5656
5657 impl<___T> UserbootClient<___T>
5658 where
5659 ___T: ::fidl_next::Transport,
5660 {
5661 #[doc = " Posts the uncompressed bootfs VMO.\n"]
5662 pub fn post_bootfs_vmo(
5663 &self,
5664
5665 bootfs: impl ::fidl_next::Encode<
5666 ::fidl_next::wire::fuchsia::Vmo,
5667 <___T as ::fidl_next::Transport>::SendBuffer,
5668 >,
5669 ) -> ::fidl_next::SendFuture<'_, ___T>
5670 where
5671 <___T as ::fidl_next::Transport>::SendBuffer:
5672 ::fidl_next::encoder::InternalHandleEncoder,
5673 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5674 {
5675 self.post_bootfs_vmo_with(crate::generic::UserbootPostBootfsVmoRequest { bootfs })
5676 }
5677
5678 #[doc = " Posts the uncompressed bootfs VMO.\n"]
5679 pub fn post_bootfs_vmo_with<___R>(
5680 &self,
5681 request: ___R,
5682 ) -> ::fidl_next::SendFuture<'_, ___T>
5683 where
5684 ___R: ::fidl_next::Encode<
5685 crate::wire::UserbootPostBootfsVmoRequest,
5686 <___T as ::fidl_next::Transport>::SendBuffer,
5687 >,
5688 {
5689 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5690 4298509372112764915,
5691 <super::PostBootfsVmo as ::fidl_next::Method>::FLEXIBILITY,
5692 request,
5693 ))
5694 }
5695
5696 #[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"]
5697 pub fn post_bootfs_files(
5698 &self,
5699
5700 files: impl ::fidl_next::Encode<
5701 ::fidl_next::wire::Vector<'static, crate::wire::BootfsFileVmo>,
5702 <___T as ::fidl_next::Transport>::SendBuffer,
5703 >,
5704 ) -> ::fidl_next::SendFuture<'_, ___T>
5705 where
5706 <___T as ::fidl_next::Transport>::SendBuffer:
5707 ::fidl_next::encoder::InternalHandleEncoder,
5708 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5709 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5710 {
5711 self.post_bootfs_files_with(crate::generic::UserbootPostBootfsFilesRequest {
5712 files,
5713 })
5714 }
5715
5716 #[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"]
5717 pub fn post_bootfs_files_with<___R>(
5718 &self,
5719 request: ___R,
5720 ) -> ::fidl_next::SendFuture<'_, ___T>
5721 where
5722 ___R: ::fidl_next::Encode<
5723 crate::wire::UserbootPostBootfsFilesRequest<'static>,
5724 <___T as ::fidl_next::Transport>::SendBuffer,
5725 >,
5726 {
5727 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5728 2985117035928536724,
5729 <super::PostBootfsFiles as ::fidl_next::Method>::FLEXIBILITY,
5730 request,
5731 ))
5732 }
5733
5734 #[doc = " Posts non-bootstrap handles provided by the kernel to the booted process.\n"]
5735 pub fn post_boot_handles_with<___R>(
5736 &self,
5737 request: ___R,
5738 ) -> ::fidl_next::SendFuture<'_, ___T>
5739 where
5740 ___R: ::fidl_next::Encode<
5741 crate::wire::UserbootPostBootHandlesRequest<'static>,
5742 <___T as ::fidl_next::Transport>::SendBuffer,
5743 >,
5744 {
5745 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5746 6990348864384659947,
5747 <super::PostBootHandles as ::fidl_next::Method>::FLEXIBILITY,
5748 request,
5749 ))
5750 }
5751
5752 #[doc = " Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`.\n"]
5753 pub fn post_stash_svc(
5754 &self,
5755
5756 stash_svc_endpoint: impl ::fidl_next::Encode<
5757 ::fidl_next::ServerEnd<crate::SvcStash, ::fidl_next::wire::fuchsia::Channel>,
5758 <___T as ::fidl_next::Transport>::SendBuffer,
5759 >,
5760 ) -> ::fidl_next::SendFuture<'_, ___T>
5761 where
5762 <___T as ::fidl_next::Transport>::SendBuffer:
5763 ::fidl_next::encoder::InternalHandleEncoder,
5764 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5765 {
5766 self.post_stash_svc_with(crate::generic::UserbootPostStashSvcRequest {
5767 stash_svc_endpoint,
5768 })
5769 }
5770
5771 #[doc = " Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`.\n"]
5772 pub fn post_stash_svc_with<___R>(
5773 &self,
5774 request: ___R,
5775 ) -> ::fidl_next::SendFuture<'_, ___T>
5776 where
5777 ___R: ::fidl_next::Encode<
5778 crate::wire::UserbootPostStashSvcRequest,
5779 <___T as ::fidl_next::Transport>::SendBuffer,
5780 >,
5781 {
5782 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5783 5795797909204819628,
5784 <super::PostStashSvc as ::fidl_next::Method>::FLEXIBILITY,
5785 request,
5786 ))
5787 }
5788 }
5789
5790 #[repr(transparent)]
5792 pub struct UserbootServer<___T: ::fidl_next::Transport> {
5793 server: ::fidl_next::protocol::Server<___T>,
5794 }
5795
5796 impl<___T> UserbootServer<___T> where ___T: ::fidl_next::Transport {}
5797 }
5798}
5799
5800#[diagnostic::on_unimplemented(
5801 note = "If {Self} implements the non-local UserbootClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5802)]
5803
5804pub trait UserbootLocalClientHandler<
5808 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5809 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5810>
5811{
5812}
5813
5814impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Userboot
5815where
5816 ___H: UserbootLocalClientHandler<___T>,
5817 ___T: ::fidl_next::Transport,
5818{
5819 async fn on_event(
5820 handler: &mut ___H,
5821 mut message: ::fidl_next::Message<___T>,
5822 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5823 match *message.header().ordinal {
5824 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5825 }
5826 }
5827}
5828
5829#[diagnostic::on_unimplemented(
5830 note = "If {Self} implements the non-local UserbootServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5831)]
5832
5833pub trait UserbootLocalServerHandler<
5837 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5838 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5839>
5840{
5841 #[doc = " Posts the uncompressed bootfs VMO.\n"]
5842 fn post_bootfs_vmo(
5843 &mut self,
5844
5845 request: ::fidl_next::Request<userboot::PostBootfsVmo, ___T>,
5846 ) -> impl ::core::future::Future<Output = ()>;
5847
5848 #[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"]
5849 fn post_bootfs_files(
5850 &mut self,
5851
5852 request: ::fidl_next::Request<userboot::PostBootfsFiles, ___T>,
5853 ) -> impl ::core::future::Future<Output = ()>;
5854
5855 #[doc = " Posts non-bootstrap handles provided by the kernel to the booted process.\n"]
5856 fn post_boot_handles(
5857 &mut self,
5858
5859 request: ::fidl_next::Request<userboot::PostBootHandles, ___T>,
5860 ) -> impl ::core::future::Future<Output = ()>;
5861
5862 #[doc = " Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`.\n"]
5863 fn post_stash_svc(
5864 &mut self,
5865
5866 request: ::fidl_next::Request<userboot::PostStashSvc, ___T>,
5867 ) -> impl ::core::future::Future<Output = ()>;
5868}
5869
5870impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Userboot
5871where
5872 ___H: UserbootLocalServerHandler<___T>,
5873 ___T: ::fidl_next::Transport,
5874 for<'de> crate::wire::UserbootPostBootfsVmoRequest: ::fidl_next::Decode<
5875 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5876 Constraint = (),
5877 >,
5878 for<'de> crate::wire::UserbootPostBootfsFilesRequest<'de>: ::fidl_next::Decode<
5879 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5880 Constraint = (),
5881 >,
5882 for<'de> crate::wire::UserbootPostBootHandlesRequest<'de>: ::fidl_next::Decode<
5883 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5884 Constraint = (),
5885 >,
5886 for<'de> crate::wire::UserbootPostStashSvcRequest: ::fidl_next::Decode<
5887 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5888 Constraint = (),
5889 >,
5890{
5891 async fn on_one_way(
5892 handler: &mut ___H,
5893 mut message: ::fidl_next::Message<___T>,
5894 ) -> ::core::result::Result<
5895 (),
5896 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5897 > {
5898 match *message.header().ordinal {
5899 4298509372112764915 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5900 Ok(decoded) => {
5901 handler.post_bootfs_vmo(::fidl_next::Request::from_decoded(decoded)).await;
5902 Ok(())
5903 }
5904 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5905 ordinal: 4298509372112764915,
5906 error,
5907 }),
5908 },
5909
5910 2985117035928536724 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5911 Ok(decoded) => {
5912 handler.post_bootfs_files(::fidl_next::Request::from_decoded(decoded)).await;
5913 Ok(())
5914 }
5915 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5916 ordinal: 2985117035928536724,
5917 error,
5918 }),
5919 },
5920
5921 6990348864384659947 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5922 Ok(decoded) => {
5923 handler.post_boot_handles(::fidl_next::Request::from_decoded(decoded)).await;
5924 Ok(())
5925 }
5926 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5927 ordinal: 6990348864384659947,
5928 error,
5929 }),
5930 },
5931
5932 5795797909204819628 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5933 Ok(decoded) => {
5934 handler.post_stash_svc(::fidl_next::Request::from_decoded(decoded)).await;
5935 Ok(())
5936 }
5937 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5938 ordinal: 5795797909204819628,
5939 error,
5940 }),
5941 },
5942
5943 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5944 }
5945 }
5946
5947 async fn on_two_way(
5948 handler: &mut ___H,
5949 mut message: ::fidl_next::Message<___T>,
5950 responder: ::fidl_next::protocol::Responder<___T>,
5951 ) -> ::core::result::Result<
5952 (),
5953 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5954 > {
5955 match *message.header().ordinal {
5956 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5957 }
5958 }
5959}
5960
5961pub trait UserbootClientHandler<
5965 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5966 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5967>
5968{
5969}
5970
5971impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Userboot
5972where
5973 ___H: UserbootClientHandler<___T> + ::core::marker::Send,
5974 ___T: ::fidl_next::Transport,
5975{
5976 async fn on_event(
5977 handler: &mut ___H,
5978 mut message: ::fidl_next::Message<___T>,
5979 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5980 match *message.header().ordinal {
5981 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5982 }
5983 }
5984}
5985
5986pub trait UserbootServerHandler<
5990 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5991 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5992>
5993{
5994 #[doc = " Posts the uncompressed bootfs VMO.\n"]
5995 fn post_bootfs_vmo(
5996 &mut self,
5997
5998 request: ::fidl_next::Request<userboot::PostBootfsVmo, ___T>,
5999 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6000
6001 #[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"]
6002 fn post_bootfs_files(
6003 &mut self,
6004
6005 request: ::fidl_next::Request<userboot::PostBootfsFiles, ___T>,
6006 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6007
6008 #[doc = " Posts non-bootstrap handles provided by the kernel to the booted process.\n"]
6009 fn post_boot_handles(
6010 &mut self,
6011
6012 request: ::fidl_next::Request<userboot::PostBootHandles, ___T>,
6013 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6014
6015 #[doc = " Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`.\n"]
6016 fn post_stash_svc(
6017 &mut self,
6018
6019 request: ::fidl_next::Request<userboot::PostStashSvc, ___T>,
6020 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6021}
6022
6023impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Userboot
6024where
6025 ___H: UserbootServerHandler<___T> + ::core::marker::Send,
6026 ___T: ::fidl_next::Transport,
6027 for<'de> crate::wire::UserbootPostBootfsVmoRequest: ::fidl_next::Decode<
6028 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6029 Constraint = (),
6030 >,
6031 for<'de> crate::wire::UserbootPostBootfsFilesRequest<'de>: ::fidl_next::Decode<
6032 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6033 Constraint = (),
6034 >,
6035 for<'de> crate::wire::UserbootPostBootHandlesRequest<'de>: ::fidl_next::Decode<
6036 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6037 Constraint = (),
6038 >,
6039 for<'de> crate::wire::UserbootPostStashSvcRequest: ::fidl_next::Decode<
6040 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6041 Constraint = (),
6042 >,
6043{
6044 async fn on_one_way(
6045 handler: &mut ___H,
6046 mut message: ::fidl_next::Message<___T>,
6047 ) -> ::core::result::Result<
6048 (),
6049 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6050 > {
6051 match *message.header().ordinal {
6052 4298509372112764915 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6053 Ok(decoded) => {
6054 handler.post_bootfs_vmo(::fidl_next::Request::from_decoded(decoded)).await;
6055 Ok(())
6056 }
6057 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6058 ordinal: 4298509372112764915,
6059 error,
6060 }),
6061 },
6062
6063 2985117035928536724 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6064 Ok(decoded) => {
6065 handler.post_bootfs_files(::fidl_next::Request::from_decoded(decoded)).await;
6066 Ok(())
6067 }
6068 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6069 ordinal: 2985117035928536724,
6070 error,
6071 }),
6072 },
6073
6074 6990348864384659947 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6075 Ok(decoded) => {
6076 handler.post_boot_handles(::fidl_next::Request::from_decoded(decoded)).await;
6077 Ok(())
6078 }
6079 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6080 ordinal: 6990348864384659947,
6081 error,
6082 }),
6083 },
6084
6085 5795797909204819628 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6086 Ok(decoded) => {
6087 handler.post_stash_svc(::fidl_next::Request::from_decoded(decoded)).await;
6088 Ok(())
6089 }
6090 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6091 ordinal: 5795797909204819628,
6092 error,
6093 }),
6094 },
6095
6096 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6097 }
6098 }
6099
6100 async fn on_two_way(
6101 handler: &mut ___H,
6102 mut message: ::fidl_next::Message<___T>,
6103 responder: ::fidl_next::protocol::Responder<___T>,
6104 ) -> ::core::result::Result<
6105 (),
6106 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6107 > {
6108 match *message.header().ordinal {
6109 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6110 }
6111 }
6112}
6113
6114impl<___T> UserbootClientHandler<___T> for ::fidl_next::IgnoreEvents where
6115 ___T: ::fidl_next::Transport
6116{
6117}
6118
6119impl<___H, ___T> UserbootLocalClientHandler<___T> for ::fidl_next::Local<___H>
6120where
6121 ___H: UserbootClientHandler<___T>,
6122 ___T: ::fidl_next::Transport,
6123{
6124}
6125
6126impl<___H, ___T> UserbootLocalServerHandler<___T> for ::fidl_next::Local<___H>
6127where
6128 ___H: UserbootServerHandler<___T>,
6129 ___T: ::fidl_next::Transport,
6130{
6131 async fn post_bootfs_vmo(
6132 &mut self,
6133
6134 request: ::fidl_next::Request<userboot::PostBootfsVmo, ___T>,
6135 ) {
6136 ___H::post_bootfs_vmo(&mut self.0, request).await
6137 }
6138
6139 async fn post_bootfs_files(
6140 &mut self,
6141
6142 request: ::fidl_next::Request<userboot::PostBootfsFiles, ___T>,
6143 ) {
6144 ___H::post_bootfs_files(&mut self.0, request).await
6145 }
6146
6147 async fn post_boot_handles(
6148 &mut self,
6149
6150 request: ::fidl_next::Request<userboot::PostBootHandles, ___T>,
6151 ) {
6152 ___H::post_boot_handles(&mut self.0, request).await
6153 }
6154
6155 async fn post_stash_svc(
6156 &mut self,
6157
6158 request: ::fidl_next::Request<userboot::PostStashSvc, ___T>,
6159 ) {
6160 ___H::post_stash_svc(&mut self.0, request).await
6161 }
6162}
6163
6164#[doc = " Protocol for providing the kernel log, writable.\n"]
6166#[derive(PartialEq, Debug)]
6167pub struct WriteOnlyLog;
6168
6169impl ::fidl_next::Discoverable for WriteOnlyLog {
6170 const PROTOCOL_NAME: &'static str = "fuchsia.boot.WriteOnlyLog";
6171}
6172
6173#[cfg(target_os = "fuchsia")]
6174impl ::fidl_next::HasTransport for WriteOnlyLog {
6175 type Transport = ::fidl_next::fuchsia::zx::Channel;
6176}
6177
6178pub mod write_only_log {
6179 pub mod prelude {
6180 pub use crate::{
6181 WriteOnlyLog, WriteOnlyLogClientHandler, WriteOnlyLogLocalClientHandler,
6182 WriteOnlyLogLocalServerHandler, WriteOnlyLogServerHandler, write_only_log,
6183 };
6184
6185 pub use crate::natural::WriteOnlyLogGetResponse;
6186 }
6187
6188 pub struct Get;
6189
6190 impl ::fidl_next::Method for Get {
6191 const ORDINAL: u64 = 312892061866864647;
6192 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6193 ::fidl_next::protocol::Flexibility::Strict;
6194
6195 type Protocol = crate::WriteOnlyLog;
6196
6197 type Request = ::fidl_next::wire::EmptyMessageBody;
6198 }
6199
6200 impl ::fidl_next::TwoWayMethod for Get {
6201 type Response = ::fidl_next::wire::Strict<crate::wire::WriteOnlyLogGetResponse>;
6202 }
6203
6204 impl<___R> ::fidl_next::Respond<___R> for Get {
6205 type Output = ::fidl_next::Strict<crate::generic::WriteOnlyLogGetResponse<___R>>;
6206
6207 fn respond(response: ___R) -> Self::Output {
6208 ::fidl_next::Strict(crate::generic::WriteOnlyLogGetResponse { log: response })
6209 }
6210 }
6211
6212 mod ___detail {
6213 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::WriteOnlyLog
6214 where
6215 ___T: ::fidl_next::Transport,
6216 {
6217 type Client = WriteOnlyLogClient<___T>;
6218 type Server = WriteOnlyLogServer<___T>;
6219 }
6220
6221 #[repr(transparent)]
6223 pub struct WriteOnlyLogClient<___T: ::fidl_next::Transport> {
6224 #[allow(dead_code)]
6225 client: ::fidl_next::protocol::Client<___T>,
6226 }
6227
6228 impl<___T> WriteOnlyLogClient<___T>
6229 where
6230 ___T: ::fidl_next::Transport,
6231 {
6232 #[doc = " Get write-only handle to the kernel `log`.\n"]
6233 pub fn get(&self) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T> {
6234 ::fidl_next::TwoWayFuture::from_untyped(
6235 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6236 312892061866864647,
6237 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
6238 (),
6239 ),
6240 )
6241 }
6242 }
6243
6244 #[repr(transparent)]
6246 pub struct WriteOnlyLogServer<___T: ::fidl_next::Transport> {
6247 server: ::fidl_next::protocol::Server<___T>,
6248 }
6249
6250 impl<___T> WriteOnlyLogServer<___T> where ___T: ::fidl_next::Transport {}
6251 }
6252}
6253
6254#[diagnostic::on_unimplemented(
6255 note = "If {Self} implements the non-local WriteOnlyLogClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6256)]
6257
6258pub trait WriteOnlyLogLocalClientHandler<
6262 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6263 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6264>
6265{
6266}
6267
6268impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for WriteOnlyLog
6269where
6270 ___H: WriteOnlyLogLocalClientHandler<___T>,
6271 ___T: ::fidl_next::Transport,
6272{
6273 async fn on_event(
6274 handler: &mut ___H,
6275 mut message: ::fidl_next::Message<___T>,
6276 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6277 match *message.header().ordinal {
6278 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6279 }
6280 }
6281}
6282
6283#[diagnostic::on_unimplemented(
6284 note = "If {Self} implements the non-local WriteOnlyLogServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6285)]
6286
6287pub trait WriteOnlyLogLocalServerHandler<
6291 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6292 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6293>
6294{
6295 #[doc = " Get write-only handle to the kernel `log`.\n"]
6296 fn get(
6297 &mut self,
6298
6299 responder: ::fidl_next::Responder<write_only_log::Get, ___T>,
6300 ) -> impl ::core::future::Future<Output = ()>;
6301}
6302
6303impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for WriteOnlyLog
6304where
6305 ___H: WriteOnlyLogLocalServerHandler<___T>,
6306 ___T: ::fidl_next::Transport,
6307{
6308 async fn on_one_way(
6309 handler: &mut ___H,
6310 mut message: ::fidl_next::Message<___T>,
6311 ) -> ::core::result::Result<
6312 (),
6313 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6314 > {
6315 match *message.header().ordinal {
6316 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6317 }
6318 }
6319
6320 async fn on_two_way(
6321 handler: &mut ___H,
6322 mut message: ::fidl_next::Message<___T>,
6323 responder: ::fidl_next::protocol::Responder<___T>,
6324 ) -> ::core::result::Result<
6325 (),
6326 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6327 > {
6328 match *message.header().ordinal {
6329 312892061866864647 => {
6330 let responder = ::fidl_next::Responder::from_untyped(responder);
6331
6332 handler.get(responder).await;
6333 Ok(())
6334 }
6335
6336 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6337 }
6338 }
6339}
6340
6341pub trait WriteOnlyLogClientHandler<
6345 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6346 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6347>
6348{
6349}
6350
6351impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for WriteOnlyLog
6352where
6353 ___H: WriteOnlyLogClientHandler<___T> + ::core::marker::Send,
6354 ___T: ::fidl_next::Transport,
6355{
6356 async fn on_event(
6357 handler: &mut ___H,
6358 mut message: ::fidl_next::Message<___T>,
6359 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6360 match *message.header().ordinal {
6361 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6362 }
6363 }
6364}
6365
6366pub trait WriteOnlyLogServerHandler<
6370 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6371 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6372>
6373{
6374 #[doc = " Get write-only handle to the kernel `log`.\n"]
6375 fn get(
6376 &mut self,
6377
6378 responder: ::fidl_next::Responder<write_only_log::Get, ___T>,
6379 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6380}
6381
6382impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for WriteOnlyLog
6383where
6384 ___H: WriteOnlyLogServerHandler<___T> + ::core::marker::Send,
6385 ___T: ::fidl_next::Transport,
6386{
6387 async fn on_one_way(
6388 handler: &mut ___H,
6389 mut message: ::fidl_next::Message<___T>,
6390 ) -> ::core::result::Result<
6391 (),
6392 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6393 > {
6394 match *message.header().ordinal {
6395 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6396 }
6397 }
6398
6399 async fn on_two_way(
6400 handler: &mut ___H,
6401 mut message: ::fidl_next::Message<___T>,
6402 responder: ::fidl_next::protocol::Responder<___T>,
6403 ) -> ::core::result::Result<
6404 (),
6405 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6406 > {
6407 match *message.header().ordinal {
6408 312892061866864647 => {
6409 let responder = ::fidl_next::Responder::from_untyped(responder);
6410
6411 handler.get(responder).await;
6412 Ok(())
6413 }
6414
6415 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6416 }
6417 }
6418}
6419
6420impl<___T> WriteOnlyLogClientHandler<___T> for ::fidl_next::IgnoreEvents where
6421 ___T: ::fidl_next::Transport
6422{
6423}
6424
6425impl<___H, ___T> WriteOnlyLogLocalClientHandler<___T> for ::fidl_next::Local<___H>
6426where
6427 ___H: WriteOnlyLogClientHandler<___T>,
6428 ___T: ::fidl_next::Transport,
6429{
6430}
6431
6432impl<___H, ___T> WriteOnlyLogLocalServerHandler<___T> for ::fidl_next::Local<___H>
6433where
6434 ___H: WriteOnlyLogServerHandler<___T>,
6435 ___T: ::fidl_next::Transport,
6436{
6437 async fn get(&mut self, responder: ::fidl_next::Responder<write_only_log::Get, ___T>) {
6438 ___H::get(&mut self.0, responder).await
6439 }
6440}
6441
6442pub use fidl_next_common_fuchsia_boot::*;