1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8 pub struct LoaderLoadObjectRequest {
9 pub object_name: ::std::string::String,
10 }
11
12 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>
13 for LoaderLoadObjectRequest
14 where
15 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16 ___E: ::fidl_next::Encoder,
17 {
18 #[inline]
19 fn encode(
20 self,
21 encoder_: &mut ___E,
22 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderLoadObjectRequest<'static>>,
23 _: (),
24 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
25 ::fidl_next::munge! {
26 let crate::wire::LoaderLoadObjectRequest {
27 object_name,
28
29 } = out_;
30 }
31
32 ::fidl_next::Encode::encode(self.object_name, encoder_, object_name, 1024)?;
33
34 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object_name.as_mut_ptr()) };
35 ::fidl_next::Constrained::validate(_field, 1024)?;
36
37 Ok(())
38 }
39 }
40
41 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>
42 for &'a LoaderLoadObjectRequest
43 where
44 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
45 ___E: ::fidl_next::Encoder,
46 {
47 #[inline]
48 fn encode(
49 self,
50 encoder_: &mut ___E,
51 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderLoadObjectRequest<'static>>,
52 _: (),
53 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
54 ::fidl_next::munge! {
55 let crate::wire::LoaderLoadObjectRequest {
56 object_name,
57
58 } = out_;
59 }
60
61 ::fidl_next::Encode::encode(&self.object_name, encoder_, object_name, 1024)?;
62
63 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object_name.as_mut_ptr()) };
64 ::fidl_next::Constrained::validate(_field, 1024)?;
65
66 Ok(())
67 }
68 }
69
70 unsafe impl<___E>
71 ::fidl_next::EncodeOption<
72 ::fidl_next::wire::Box<'static, crate::wire::LoaderLoadObjectRequest<'static>>,
73 ___E,
74 > for LoaderLoadObjectRequest
75 where
76 ___E: ::fidl_next::Encoder + ?Sized,
77 LoaderLoadObjectRequest:
78 ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>,
79 {
80 #[inline]
81 fn encode_option(
82 this: ::core::option::Option<Self>,
83 encoder: &mut ___E,
84 out: &mut ::core::mem::MaybeUninit<
85 ::fidl_next::wire::Box<'static, crate::wire::LoaderLoadObjectRequest<'static>>,
86 >,
87 _: (),
88 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
89 if let Some(inner) = this {
90 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
91 ::fidl_next::wire::Box::encode_present(out);
92 } else {
93 ::fidl_next::wire::Box::encode_absent(out);
94 }
95
96 Ok(())
97 }
98 }
99
100 unsafe impl<'a, ___E>
101 ::fidl_next::EncodeOption<
102 ::fidl_next::wire::Box<'static, crate::wire::LoaderLoadObjectRequest<'static>>,
103 ___E,
104 > for &'a LoaderLoadObjectRequest
105 where
106 ___E: ::fidl_next::Encoder + ?Sized,
107 &'a LoaderLoadObjectRequest:
108 ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>,
109 {
110 #[inline]
111 fn encode_option(
112 this: ::core::option::Option<Self>,
113 encoder: &mut ___E,
114 out: &mut ::core::mem::MaybeUninit<
115 ::fidl_next::wire::Box<'static, crate::wire::LoaderLoadObjectRequest<'static>>,
116 >,
117 _: (),
118 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
119 if let Some(inner) = this {
120 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
121 ::fidl_next::wire::Box::encode_present(out);
122 } else {
123 ::fidl_next::wire::Box::encode_absent(out);
124 }
125
126 Ok(())
127 }
128 }
129
130 impl<'de> ::fidl_next::FromWire<crate::wire::LoaderLoadObjectRequest<'de>>
131 for LoaderLoadObjectRequest
132 {
133 #[inline]
134 fn from_wire(wire: crate::wire::LoaderLoadObjectRequest<'de>) -> Self {
135 Self { object_name: ::fidl_next::FromWire::from_wire(wire.object_name) }
136 }
137 }
138
139 impl<'de> ::fidl_next::FromWireRef<crate::wire::LoaderLoadObjectRequest<'de>>
140 for LoaderLoadObjectRequest
141 {
142 #[inline]
143 fn from_wire_ref(wire: &crate::wire::LoaderLoadObjectRequest<'de>) -> Self {
144 Self { object_name: ::fidl_next::FromWireRef::from_wire_ref(&wire.object_name) }
145 }
146 }
147
148 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
149 pub struct LoaderConfigRequest {
150 pub config: ::std::string::String,
151 }
152
153 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>
154 for LoaderConfigRequest
155 where
156 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
157 ___E: ::fidl_next::Encoder,
158 {
159 #[inline]
160 fn encode(
161 self,
162 encoder_: &mut ___E,
163 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigRequest<'static>>,
164 _: (),
165 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
166 ::fidl_next::munge! {
167 let crate::wire::LoaderConfigRequest {
168 config,
169
170 } = out_;
171 }
172
173 ::fidl_next::Encode::encode(self.config, encoder_, config, 1024)?;
174
175 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(config.as_mut_ptr()) };
176 ::fidl_next::Constrained::validate(_field, 1024)?;
177
178 Ok(())
179 }
180 }
181
182 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>
183 for &'a LoaderConfigRequest
184 where
185 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
186 ___E: ::fidl_next::Encoder,
187 {
188 #[inline]
189 fn encode(
190 self,
191 encoder_: &mut ___E,
192 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigRequest<'static>>,
193 _: (),
194 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
195 ::fidl_next::munge! {
196 let crate::wire::LoaderConfigRequest {
197 config,
198
199 } = out_;
200 }
201
202 ::fidl_next::Encode::encode(&self.config, encoder_, config, 1024)?;
203
204 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(config.as_mut_ptr()) };
205 ::fidl_next::Constrained::validate(_field, 1024)?;
206
207 Ok(())
208 }
209 }
210
211 unsafe impl<___E>
212 ::fidl_next::EncodeOption<
213 ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigRequest<'static>>,
214 ___E,
215 > for LoaderConfigRequest
216 where
217 ___E: ::fidl_next::Encoder + ?Sized,
218 LoaderConfigRequest: ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>,
219 {
220 #[inline]
221 fn encode_option(
222 this: ::core::option::Option<Self>,
223 encoder: &mut ___E,
224 out: &mut ::core::mem::MaybeUninit<
225 ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigRequest<'static>>,
226 >,
227 _: (),
228 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
229 if let Some(inner) = this {
230 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
231 ::fidl_next::wire::Box::encode_present(out);
232 } else {
233 ::fidl_next::wire::Box::encode_absent(out);
234 }
235
236 Ok(())
237 }
238 }
239
240 unsafe impl<'a, ___E>
241 ::fidl_next::EncodeOption<
242 ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigRequest<'static>>,
243 ___E,
244 > for &'a LoaderConfigRequest
245 where
246 ___E: ::fidl_next::Encoder + ?Sized,
247 &'a LoaderConfigRequest:
248 ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>,
249 {
250 #[inline]
251 fn encode_option(
252 this: ::core::option::Option<Self>,
253 encoder: &mut ___E,
254 out: &mut ::core::mem::MaybeUninit<
255 ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigRequest<'static>>,
256 >,
257 _: (),
258 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
259 if let Some(inner) = this {
260 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
261 ::fidl_next::wire::Box::encode_present(out);
262 } else {
263 ::fidl_next::wire::Box::encode_absent(out);
264 }
265
266 Ok(())
267 }
268 }
269
270 impl<'de> ::fidl_next::FromWire<crate::wire::LoaderConfigRequest<'de>> for LoaderConfigRequest {
271 #[inline]
272 fn from_wire(wire: crate::wire::LoaderConfigRequest<'de>) -> Self {
273 Self { config: ::fidl_next::FromWire::from_wire(wire.config) }
274 }
275 }
276
277 impl<'de> ::fidl_next::FromWireRef<crate::wire::LoaderConfigRequest<'de>> for LoaderConfigRequest {
278 #[inline]
279 fn from_wire_ref(wire: &crate::wire::LoaderConfigRequest<'de>) -> Self {
280 Self { config: ::fidl_next::FromWireRef::from_wire_ref(&wire.config) }
281 }
282 }
283
284 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
285 #[repr(C)]
286 pub struct LoaderConfigResponse {
287 pub rv: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
288 }
289
290 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
291 for LoaderConfigResponse
292 where
293 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
294 {
295 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
296 Self,
297 crate::wire::LoaderConfigResponse,
298 > = unsafe {
299 ::fidl_next::CopyOptimization::enable_if(
300 true
301
302 && <
303 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
304 >::COPY_OPTIMIZATION.is_enabled()
305
306 )
307 };
308
309 #[inline]
310 fn encode(
311 self,
312 encoder_: &mut ___E,
313 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
314 _: (),
315 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
316 ::fidl_next::munge! {
317 let crate::wire::LoaderConfigResponse {
318 rv,
319
320 } = out_;
321 }
322
323 ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
324
325 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
326
327 Ok(())
328 }
329 }
330
331 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
332 for &'a LoaderConfigResponse
333 where
334 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
335 {
336 #[inline]
337 fn encode(
338 self,
339 encoder_: &mut ___E,
340 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
341 _: (),
342 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
343 ::fidl_next::munge! {
344 let crate::wire::LoaderConfigResponse {
345 rv,
346
347 } = out_;
348 }
349
350 ::fidl_next::Encode::encode(&self.rv, encoder_, rv, ())?;
351
352 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
353
354 Ok(())
355 }
356 }
357
358 unsafe impl<___E>
359 ::fidl_next::EncodeOption<
360 ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigResponse>,
361 ___E,
362 > for LoaderConfigResponse
363 where
364 ___E: ::fidl_next::Encoder + ?Sized,
365 LoaderConfigResponse: ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>,
366 {
367 #[inline]
368 fn encode_option(
369 this: ::core::option::Option<Self>,
370 encoder: &mut ___E,
371 out: &mut ::core::mem::MaybeUninit<
372 ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigResponse>,
373 >,
374 _: (),
375 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
376 if let Some(inner) = this {
377 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
378 ::fidl_next::wire::Box::encode_present(out);
379 } else {
380 ::fidl_next::wire::Box::encode_absent(out);
381 }
382
383 Ok(())
384 }
385 }
386
387 unsafe impl<'a, ___E>
388 ::fidl_next::EncodeOption<
389 ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigResponse>,
390 ___E,
391 > for &'a LoaderConfigResponse
392 where
393 ___E: ::fidl_next::Encoder + ?Sized,
394 &'a LoaderConfigResponse: ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>,
395 {
396 #[inline]
397 fn encode_option(
398 this: ::core::option::Option<Self>,
399 encoder: &mut ___E,
400 out: &mut ::core::mem::MaybeUninit<
401 ::fidl_next::wire::Box<'static, crate::wire::LoaderConfigResponse>,
402 >,
403 _: (),
404 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
405 if let Some(inner) = this {
406 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
407 ::fidl_next::wire::Box::encode_present(out);
408 } else {
409 ::fidl_next::wire::Box::encode_absent(out);
410 }
411
412 Ok(())
413 }
414 }
415
416 impl ::fidl_next::FromWire<crate::wire::LoaderConfigResponse> for LoaderConfigResponse {
417 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
418 crate::wire::LoaderConfigResponse,
419 Self,
420 > = unsafe {
421 ::fidl_next::CopyOptimization::enable_if(
422 true
423
424 && <
425 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
426 >::COPY_OPTIMIZATION.is_enabled()
427
428 )
429 };
430
431 #[inline]
432 fn from_wire(wire: crate::wire::LoaderConfigResponse) -> Self {
433 Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
434 }
435 }
436
437 impl ::fidl_next::FromWireRef<crate::wire::LoaderConfigResponse> for LoaderConfigResponse {
438 #[inline]
439 fn from_wire_ref(wire: &crate::wire::LoaderConfigResponse) -> Self {
440 Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
441 }
442 }
443
444 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
445 #[repr(C)]
446 pub struct LoaderCloneResponse {
447 pub rv: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
448 }
449
450 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
451 for LoaderCloneResponse
452 where
453 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
454 {
455 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
456 Self,
457 crate::wire::LoaderCloneResponse,
458 > = unsafe {
459 ::fidl_next::CopyOptimization::enable_if(
460 true
461
462 && <
463 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
464 >::COPY_OPTIMIZATION.is_enabled()
465
466 )
467 };
468
469 #[inline]
470 fn encode(
471 self,
472 encoder_: &mut ___E,
473 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
474 _: (),
475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
476 ::fidl_next::munge! {
477 let crate::wire::LoaderCloneResponse {
478 rv,
479
480 } = out_;
481 }
482
483 ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
484
485 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
486
487 Ok(())
488 }
489 }
490
491 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
492 for &'a LoaderCloneResponse
493 where
494 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
495 {
496 #[inline]
497 fn encode(
498 self,
499 encoder_: &mut ___E,
500 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
501 _: (),
502 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
503 ::fidl_next::munge! {
504 let crate::wire::LoaderCloneResponse {
505 rv,
506
507 } = out_;
508 }
509
510 ::fidl_next::Encode::encode(&self.rv, encoder_, rv, ())?;
511
512 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rv.as_mut_ptr()) };
513
514 Ok(())
515 }
516 }
517
518 unsafe impl<___E>
519 ::fidl_next::EncodeOption<
520 ::fidl_next::wire::Box<'static, crate::wire::LoaderCloneResponse>,
521 ___E,
522 > for LoaderCloneResponse
523 where
524 ___E: ::fidl_next::Encoder + ?Sized,
525 LoaderCloneResponse: ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>,
526 {
527 #[inline]
528 fn encode_option(
529 this: ::core::option::Option<Self>,
530 encoder: &mut ___E,
531 out: &mut ::core::mem::MaybeUninit<
532 ::fidl_next::wire::Box<'static, crate::wire::LoaderCloneResponse>,
533 >,
534 _: (),
535 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
536 if let Some(inner) = this {
537 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
538 ::fidl_next::wire::Box::encode_present(out);
539 } else {
540 ::fidl_next::wire::Box::encode_absent(out);
541 }
542
543 Ok(())
544 }
545 }
546
547 unsafe impl<'a, ___E>
548 ::fidl_next::EncodeOption<
549 ::fidl_next::wire::Box<'static, crate::wire::LoaderCloneResponse>,
550 ___E,
551 > for &'a LoaderCloneResponse
552 where
553 ___E: ::fidl_next::Encoder + ?Sized,
554 &'a LoaderCloneResponse: ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>,
555 {
556 #[inline]
557 fn encode_option(
558 this: ::core::option::Option<Self>,
559 encoder: &mut ___E,
560 out: &mut ::core::mem::MaybeUninit<
561 ::fidl_next::wire::Box<'static, crate::wire::LoaderCloneResponse>,
562 >,
563 _: (),
564 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
565 if let Some(inner) = this {
566 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
567 ::fidl_next::wire::Box::encode_present(out);
568 } else {
569 ::fidl_next::wire::Box::encode_absent(out);
570 }
571
572 Ok(())
573 }
574 }
575
576 impl ::fidl_next::FromWire<crate::wire::LoaderCloneResponse> for LoaderCloneResponse {
577 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
578 crate::wire::LoaderCloneResponse,
579 Self,
580 > = unsafe {
581 ::fidl_next::CopyOptimization::enable_if(
582 true
583
584 && <
585 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
586 >::COPY_OPTIMIZATION.is_enabled()
587
588 )
589 };
590
591 #[inline]
592 fn from_wire(wire: crate::wire::LoaderCloneResponse) -> Self {
593 Self { rv: ::fidl_next::FromWire::from_wire(wire.rv) }
594 }
595 }
596
597 impl ::fidl_next::FromWireRef<crate::wire::LoaderCloneResponse> for LoaderCloneResponse {
598 #[inline]
599 fn from_wire_ref(wire: &crate::wire::LoaderCloneResponse) -> Self {
600 Self { rv: ::fidl_next::FromWireRef::from_wire_ref(&wire.rv) }
601 }
602 }
603}
604
605pub mod wire {
606
607 #[derive(Debug)]
609 #[repr(C)]
610 pub struct LoaderLoadObjectRequest<'de> {
611 pub object_name: ::fidl_next::wire::String<'de>,
612 }
613
614 static_assertions::const_assert_eq!(std::mem::size_of::<LoaderLoadObjectRequest<'_>>(), 16);
615 static_assertions::const_assert_eq!(std::mem::align_of::<LoaderLoadObjectRequest<'_>>(), 8);
616
617 static_assertions::const_assert_eq!(
618 std::mem::offset_of!(LoaderLoadObjectRequest<'_>, object_name),
619 0
620 );
621
622 impl ::fidl_next::Constrained for LoaderLoadObjectRequest<'_> {
623 type Constraint = ();
624
625 fn validate(
626 _: ::fidl_next::Slot<'_, Self>,
627 _: Self::Constraint,
628 ) -> Result<(), ::fidl_next::ValidationError> {
629 Ok(())
630 }
631 }
632
633 unsafe impl ::fidl_next::Wire for LoaderLoadObjectRequest<'static> {
634 type Narrowed<'de> = LoaderLoadObjectRequest<'de>;
635
636 #[inline]
637 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
638 ::fidl_next::munge! {
639 let Self {
640 object_name,
641
642 } = &mut *out_;
643 }
644
645 ::fidl_next::Wire::zero_padding(object_name);
646 }
647 }
648
649 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LoaderLoadObjectRequest<'de>
650 where
651 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
652 ___D: ::fidl_next::Decoder<'de>,
653 {
654 fn decode(
655 slot_: ::fidl_next::Slot<'_, Self>,
656 decoder_: &mut ___D,
657 _: (),
658 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
659 ::fidl_next::munge! {
660 let Self {
661 mut object_name,
662
663 } = slot_;
664 }
665
666 let _field = object_name.as_mut();
667 ::fidl_next::Constrained::validate(_field, 1024)?;
668 ::fidl_next::Decode::decode(object_name.as_mut(), decoder_, 1024)?;
669
670 let object_name = unsafe { object_name.deref_unchecked() };
671
672 if object_name.len() > 1024 {
673 return Err(::fidl_next::DecodeError::VectorTooLong {
674 size: object_name.len() as u64,
675 limit: 1024,
676 });
677 }
678
679 Ok(())
680 }
681 }
682
683 impl<'de> ::fidl_next::IntoNatural for LoaderLoadObjectRequest<'de> {
684 type Natural = crate::natural::LoaderLoadObjectRequest;
685 }
686
687 #[derive(Debug)]
689 #[repr(C)]
690 pub struct LoaderConfigRequest<'de> {
691 pub config: ::fidl_next::wire::String<'de>,
692 }
693
694 static_assertions::const_assert_eq!(std::mem::size_of::<LoaderConfigRequest<'_>>(), 16);
695 static_assertions::const_assert_eq!(std::mem::align_of::<LoaderConfigRequest<'_>>(), 8);
696
697 static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderConfigRequest<'_>, config), 0);
698
699 impl ::fidl_next::Constrained for LoaderConfigRequest<'_> {
700 type Constraint = ();
701
702 fn validate(
703 _: ::fidl_next::Slot<'_, Self>,
704 _: Self::Constraint,
705 ) -> Result<(), ::fidl_next::ValidationError> {
706 Ok(())
707 }
708 }
709
710 unsafe impl ::fidl_next::Wire for LoaderConfigRequest<'static> {
711 type Narrowed<'de> = LoaderConfigRequest<'de>;
712
713 #[inline]
714 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
715 ::fidl_next::munge! {
716 let Self {
717 config,
718
719 } = &mut *out_;
720 }
721
722 ::fidl_next::Wire::zero_padding(config);
723 }
724 }
725
726 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LoaderConfigRequest<'de>
727 where
728 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
729 ___D: ::fidl_next::Decoder<'de>,
730 {
731 fn decode(
732 slot_: ::fidl_next::Slot<'_, Self>,
733 decoder_: &mut ___D,
734 _: (),
735 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
736 ::fidl_next::munge! {
737 let Self {
738 mut config,
739
740 } = slot_;
741 }
742
743 let _field = config.as_mut();
744 ::fidl_next::Constrained::validate(_field, 1024)?;
745 ::fidl_next::Decode::decode(config.as_mut(), decoder_, 1024)?;
746
747 let config = unsafe { config.deref_unchecked() };
748
749 if config.len() > 1024 {
750 return Err(::fidl_next::DecodeError::VectorTooLong {
751 size: config.len() as u64,
752 limit: 1024,
753 });
754 }
755
756 Ok(())
757 }
758 }
759
760 impl<'de> ::fidl_next::IntoNatural for LoaderConfigRequest<'de> {
761 type Natural = crate::natural::LoaderConfigRequest;
762 }
763
764 #[derive(Clone, Debug)]
766 #[repr(C)]
767 pub struct LoaderConfigResponse {
768 pub rv: ::fidl_next::wire::fuchsia::StatusResult,
769 }
770
771 static_assertions::const_assert_eq!(std::mem::size_of::<LoaderConfigResponse>(), 4);
772 static_assertions::const_assert_eq!(std::mem::align_of::<LoaderConfigResponse>(), 4);
773
774 static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderConfigResponse, rv), 0);
775
776 impl ::fidl_next::Constrained for LoaderConfigResponse {
777 type Constraint = ();
778
779 fn validate(
780 _: ::fidl_next::Slot<'_, Self>,
781 _: Self::Constraint,
782 ) -> Result<(), ::fidl_next::ValidationError> {
783 Ok(())
784 }
785 }
786
787 unsafe impl ::fidl_next::Wire for LoaderConfigResponse {
788 type Narrowed<'de> = LoaderConfigResponse;
789
790 #[inline]
791 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
792 ::fidl_next::munge! {
793 let Self {
794 rv,
795
796 } = &mut *out_;
797 }
798
799 ::fidl_next::Wire::zero_padding(rv);
800 }
801 }
802
803 unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderConfigResponse
804 where
805 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
806 {
807 fn decode(
808 slot_: ::fidl_next::Slot<'_, Self>,
809 decoder_: &mut ___D,
810 _: (),
811 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
812 ::fidl_next::munge! {
813 let Self {
814 mut rv,
815
816 } = slot_;
817 }
818
819 let _field = rv.as_mut();
820
821 ::fidl_next::Decode::decode(rv.as_mut(), decoder_, ())?;
822
823 Ok(())
824 }
825 }
826
827 impl ::fidl_next::IntoNatural for LoaderConfigResponse {
828 type Natural = crate::natural::LoaderConfigResponse;
829 }
830
831 #[derive(Clone, Debug)]
833 #[repr(C)]
834 pub struct LoaderCloneResponse {
835 pub rv: ::fidl_next::wire::fuchsia::StatusResult,
836 }
837
838 static_assertions::const_assert_eq!(std::mem::size_of::<LoaderCloneResponse>(), 4);
839 static_assertions::const_assert_eq!(std::mem::align_of::<LoaderCloneResponse>(), 4);
840
841 static_assertions::const_assert_eq!(std::mem::offset_of!(LoaderCloneResponse, rv), 0);
842
843 impl ::fidl_next::Constrained for LoaderCloneResponse {
844 type Constraint = ();
845
846 fn validate(
847 _: ::fidl_next::Slot<'_, Self>,
848 _: Self::Constraint,
849 ) -> Result<(), ::fidl_next::ValidationError> {
850 Ok(())
851 }
852 }
853
854 unsafe impl ::fidl_next::Wire for LoaderCloneResponse {
855 type Narrowed<'de> = LoaderCloneResponse;
856
857 #[inline]
858 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
859 ::fidl_next::munge! {
860 let Self {
861 rv,
862
863 } = &mut *out_;
864 }
865
866 ::fidl_next::Wire::zero_padding(rv);
867 }
868 }
869
870 unsafe impl<___D> ::fidl_next::Decode<___D> for LoaderCloneResponse
871 where
872 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
873 {
874 fn decode(
875 slot_: ::fidl_next::Slot<'_, Self>,
876 decoder_: &mut ___D,
877 _: (),
878 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
879 ::fidl_next::munge! {
880 let Self {
881 mut rv,
882
883 } = slot_;
884 }
885
886 let _field = rv.as_mut();
887
888 ::fidl_next::Decode::decode(rv.as_mut(), decoder_, ())?;
889
890 Ok(())
891 }
892 }
893
894 impl ::fidl_next::IntoNatural for LoaderCloneResponse {
895 type Natural = crate::natural::LoaderCloneResponse;
896 }
897}
898
899pub mod wire_optional {}
900
901pub mod generic {
902
903 pub struct LoaderLoadObjectRequest<T0> {
905 pub object_name: T0,
906 }
907
908 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderLoadObjectRequest<'static>, ___E>
909 for LoaderLoadObjectRequest<T0>
910 where
911 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
912 ___E: ::fidl_next::Encoder,
913 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
914 {
915 #[inline]
916 fn encode(
917 self,
918 encoder_: &mut ___E,
919 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderLoadObjectRequest<'static>>,
920 _: (),
921 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
922 ::fidl_next::munge! {
923 let crate::wire::LoaderLoadObjectRequest {
924 object_name,
925
926 } = out_;
927 }
928
929 ::fidl_next::Encode::encode(self.object_name, encoder_, object_name, 1024)?;
930
931 Ok(())
932 }
933 }
934
935 pub struct LoaderConfigRequest<T0> {
937 pub config: T0,
938 }
939
940 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderConfigRequest<'static>, ___E>
941 for LoaderConfigRequest<T0>
942 where
943 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
944 ___E: ::fidl_next::Encoder,
945 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
946 {
947 #[inline]
948 fn encode(
949 self,
950 encoder_: &mut ___E,
951 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigRequest<'static>>,
952 _: (),
953 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
954 ::fidl_next::munge! {
955 let crate::wire::LoaderConfigRequest {
956 config,
957
958 } = out_;
959 }
960
961 ::fidl_next::Encode::encode(self.config, encoder_, config, 1024)?;
962
963 Ok(())
964 }
965 }
966
967 pub struct LoaderConfigResponse<T0> {
969 pub rv: T0,
970 }
971
972 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderConfigResponse, ___E>
973 for LoaderConfigResponse<T0>
974 where
975 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
976 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
977 {
978 #[inline]
979 fn encode(
980 self,
981 encoder_: &mut ___E,
982 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderConfigResponse>,
983 _: (),
984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
985 ::fidl_next::munge! {
986 let crate::wire::LoaderConfigResponse {
987 rv,
988
989 } = out_;
990 }
991
992 ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
993
994 Ok(())
995 }
996 }
997
998 pub struct LoaderCloneResponse<T0> {
1000 pub rv: T0,
1001 }
1002
1003 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LoaderCloneResponse, ___E>
1004 for LoaderCloneResponse<T0>
1005 where
1006 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1007 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
1008 {
1009 #[inline]
1010 fn encode(
1011 self,
1012 encoder_: &mut ___E,
1013 out_: &mut ::core::mem::MaybeUninit<crate::wire::LoaderCloneResponse>,
1014 _: (),
1015 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1016 ::fidl_next::munge! {
1017 let crate::wire::LoaderCloneResponse {
1018 rv,
1019
1020 } = out_;
1021 }
1022
1023 ::fidl_next::Encode::encode(self.rv, encoder_, rv, ())?;
1024
1025 Ok(())
1026 }
1027 }
1028}
1029
1030pub use self::natural::*;