1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11pub const MAX_ARGS_COLLECT_LENGTH: u8 = 193;
12
13pub const MAX_ARGS_NAME_LENGTH: u8 = 64;
14
15pub const MAX_ARGS_VALUE_LENGTH: u8 = 128;
16
17pub const MAX_ARGS_VECTOR_LENGTH: u8 = 255;
18
19pub const MAX_FILE_NAME_LENGTH: u8 = 255;
20
21#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22pub struct ArgumentsCollectRequest {
23 pub prefix: String,
24}
25
26impl fidl::Persistable for ArgumentsCollectRequest {}
27
28#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29pub struct ArgumentsCollectResponse {
30 pub results: Vec<String>,
31}
32
33impl fidl::Persistable for ArgumentsCollectResponse {}
34
35#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36pub struct ArgumentsGetBoolRequest {
37 pub key: String,
38 pub defaultval: bool,
39}
40
41impl fidl::Persistable for ArgumentsGetBoolRequest {}
42
43#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44pub struct ArgumentsGetBoolResponse {
45 pub value: bool,
46}
47
48impl fidl::Persistable for ArgumentsGetBoolResponse {}
49
50#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
51pub struct ArgumentsGetBoolsRequest {
52 pub keys: Vec<BoolPair>,
53}
54
55impl fidl::Persistable for ArgumentsGetBoolsRequest {}
56
57#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
58pub struct ArgumentsGetBoolsResponse {
59 pub values: Vec<bool>,
60}
61
62impl fidl::Persistable for ArgumentsGetBoolsResponse {}
63
64#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
65pub struct ArgumentsGetStringRequest {
66 pub key: String,
67}
68
69impl fidl::Persistable for ArgumentsGetStringRequest {}
70
71#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
72pub struct ArgumentsGetStringResponse {
73 pub value: Option<String>,
74}
75
76impl fidl::Persistable for ArgumentsGetStringResponse {}
77
78#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
79pub struct ArgumentsGetStringsRequest {
80 pub keys: Vec<String>,
81}
82
83impl fidl::Persistable for ArgumentsGetStringsRequest {}
84
85#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
86pub struct ArgumentsGetStringsResponse {
87 pub values: Vec<Option<String>>,
88}
89
90impl fidl::Persistable for ArgumentsGetStringsResponse {}
91
92#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
93pub struct BoolPair {
94 pub key: String,
95 pub defaultval: bool,
96}
97
98impl fidl::Persistable for BoolPair {}
99
100#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
101#[repr(C)]
102pub struct Extra {
103 pub n: u32,
104}
105
106impl fidl::Persistable for Extra {}
107
108#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109#[repr(C)]
110pub struct FactoryItemsGetRequest {
111 pub extra: u32,
112}
113
114impl fidl::Persistable for FactoryItemsGetRequest {}
115
116#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
117pub struct ItemsGet2Request {
118 pub type_: u32,
119 pub extra: Option<Box<Extra>>,
120}
121
122impl fidl::Persistable for ItemsGet2Request {}
123
124#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
125pub struct ItemsGetBootloaderFileRequest {
126 pub filename: String,
127}
128
129impl fidl::Persistable for ItemsGetBootloaderFileRequest {}
130
131#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
132#[repr(C)]
133pub struct ItemsGetRequest {
134 pub type_: u32,
135 pub extra: u32,
136}
137
138impl fidl::Persistable for ItemsGetRequest {}
139
140mod internal {
141 use super::*;
142
143 impl fidl::encoding::ValueTypeMarker for ArgumentsCollectRequest {
144 type Borrowed<'a> = &'a Self;
145 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
146 value
147 }
148 }
149
150 unsafe impl fidl::encoding::TypeMarker for ArgumentsCollectRequest {
151 type Owned = Self;
152
153 #[inline(always)]
154 fn inline_align(_context: fidl::encoding::Context) -> usize {
155 8
156 }
157
158 #[inline(always)]
159 fn inline_size(_context: fidl::encoding::Context) -> usize {
160 16
161 }
162 }
163
164 unsafe impl<D: fidl::encoding::ResourceDialect>
165 fidl::encoding::Encode<ArgumentsCollectRequest, D> for &ArgumentsCollectRequest
166 {
167 #[inline]
168 unsafe fn encode(
169 self,
170 encoder: &mut fidl::encoding::Encoder<'_, D>,
171 offset: usize,
172 _depth: fidl::encoding::Depth,
173 ) -> fidl::Result<()> {
174 encoder.debug_check_bounds::<ArgumentsCollectRequest>(offset);
175 fidl::encoding::Encode::<ArgumentsCollectRequest, D>::encode(
177 (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
178 &self.prefix,
179 ),),
180 encoder,
181 offset,
182 _depth,
183 )
184 }
185 }
186 unsafe impl<
187 D: fidl::encoding::ResourceDialect,
188 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
189 > fidl::encoding::Encode<ArgumentsCollectRequest, D> for (T0,)
190 {
191 #[inline]
192 unsafe fn encode(
193 self,
194 encoder: &mut fidl::encoding::Encoder<'_, D>,
195 offset: usize,
196 depth: fidl::encoding::Depth,
197 ) -> fidl::Result<()> {
198 encoder.debug_check_bounds::<ArgumentsCollectRequest>(offset);
199 self.0.encode(encoder, offset + 0, depth)?;
203 Ok(())
204 }
205 }
206
207 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
208 for ArgumentsCollectRequest
209 {
210 #[inline(always)]
211 fn new_empty() -> Self {
212 Self { prefix: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
213 }
214
215 #[inline]
216 unsafe fn decode(
217 &mut self,
218 decoder: &mut fidl::encoding::Decoder<'_, D>,
219 offset: usize,
220 _depth: fidl::encoding::Depth,
221 ) -> fidl::Result<()> {
222 decoder.debug_check_bounds::<Self>(offset);
223 fidl::decode!(
225 fidl::encoding::BoundedString<64>,
226 D,
227 &mut self.prefix,
228 decoder,
229 offset + 0,
230 _depth
231 )?;
232 Ok(())
233 }
234 }
235
236 impl fidl::encoding::ValueTypeMarker for ArgumentsCollectResponse {
237 type Borrowed<'a> = &'a Self;
238 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
239 value
240 }
241 }
242
243 unsafe impl fidl::encoding::TypeMarker for ArgumentsCollectResponse {
244 type Owned = Self;
245
246 #[inline(always)]
247 fn inline_align(_context: fidl::encoding::Context) -> usize {
248 8
249 }
250
251 #[inline(always)]
252 fn inline_size(_context: fidl::encoding::Context) -> usize {
253 16
254 }
255 }
256
257 unsafe impl<D: fidl::encoding::ResourceDialect>
258 fidl::encoding::Encode<ArgumentsCollectResponse, D> for &ArgumentsCollectResponse
259 {
260 #[inline]
261 unsafe fn encode(
262 self,
263 encoder: &mut fidl::encoding::Encoder<'_, D>,
264 offset: usize,
265 _depth: fidl::encoding::Depth,
266 ) -> fidl::Result<()> {
267 encoder.debug_check_bounds::<ArgumentsCollectResponse>(offset);
268 fidl::encoding::Encode::<ArgumentsCollectResponse, D>::encode(
270 (
271 <fidl::encoding::Vector<fidl::encoding::BoundedString<193>, 255> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
272 ),
273 encoder, offset, _depth
274 )
275 }
276 }
277 unsafe impl<
278 D: fidl::encoding::ResourceDialect,
279 T0: fidl::encoding::Encode<
280 fidl::encoding::Vector<fidl::encoding::BoundedString<193>, 255>,
281 D,
282 >,
283 > fidl::encoding::Encode<ArgumentsCollectResponse, D> for (T0,)
284 {
285 #[inline]
286 unsafe fn encode(
287 self,
288 encoder: &mut fidl::encoding::Encoder<'_, D>,
289 offset: usize,
290 depth: fidl::encoding::Depth,
291 ) -> fidl::Result<()> {
292 encoder.debug_check_bounds::<ArgumentsCollectResponse>(offset);
293 self.0.encode(encoder, offset + 0, depth)?;
297 Ok(())
298 }
299 }
300
301 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
302 for ArgumentsCollectResponse
303 {
304 #[inline(always)]
305 fn new_empty() -> Self {
306 Self {
307 results: fidl::new_empty!(
308 fidl::encoding::Vector<fidl::encoding::BoundedString<193>, 255>,
309 D
310 ),
311 }
312 }
313
314 #[inline]
315 unsafe fn decode(
316 &mut self,
317 decoder: &mut fidl::encoding::Decoder<'_, D>,
318 offset: usize,
319 _depth: fidl::encoding::Depth,
320 ) -> fidl::Result<()> {
321 decoder.debug_check_bounds::<Self>(offset);
322 fidl::decode!(
324 fidl::encoding::Vector<fidl::encoding::BoundedString<193>, 255>,
325 D,
326 &mut self.results,
327 decoder,
328 offset + 0,
329 _depth
330 )?;
331 Ok(())
332 }
333 }
334
335 impl fidl::encoding::ValueTypeMarker for ArgumentsGetBoolRequest {
336 type Borrowed<'a> = &'a Self;
337 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
338 value
339 }
340 }
341
342 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetBoolRequest {
343 type Owned = Self;
344
345 #[inline(always)]
346 fn inline_align(_context: fidl::encoding::Context) -> usize {
347 8
348 }
349
350 #[inline(always)]
351 fn inline_size(_context: fidl::encoding::Context) -> usize {
352 24
353 }
354 }
355
356 unsafe impl<D: fidl::encoding::ResourceDialect>
357 fidl::encoding::Encode<ArgumentsGetBoolRequest, D> for &ArgumentsGetBoolRequest
358 {
359 #[inline]
360 unsafe fn encode(
361 self,
362 encoder: &mut fidl::encoding::Encoder<'_, D>,
363 offset: usize,
364 _depth: fidl::encoding::Depth,
365 ) -> fidl::Result<()> {
366 encoder.debug_check_bounds::<ArgumentsGetBoolRequest>(offset);
367 fidl::encoding::Encode::<ArgumentsGetBoolRequest, D>::encode(
369 (
370 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
371 &self.key,
372 ),
373 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.defaultval),
374 ),
375 encoder,
376 offset,
377 _depth,
378 )
379 }
380 }
381 unsafe impl<
382 D: fidl::encoding::ResourceDialect,
383 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
384 T1: fidl::encoding::Encode<bool, D>,
385 > fidl::encoding::Encode<ArgumentsGetBoolRequest, D> for (T0, T1)
386 {
387 #[inline]
388 unsafe fn encode(
389 self,
390 encoder: &mut fidl::encoding::Encoder<'_, D>,
391 offset: usize,
392 depth: fidl::encoding::Depth,
393 ) -> fidl::Result<()> {
394 encoder.debug_check_bounds::<ArgumentsGetBoolRequest>(offset);
395 unsafe {
398 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
399 (ptr as *mut u64).write_unaligned(0);
400 }
401 self.0.encode(encoder, offset + 0, depth)?;
403 self.1.encode(encoder, offset + 16, depth)?;
404 Ok(())
405 }
406 }
407
408 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
409 for ArgumentsGetBoolRequest
410 {
411 #[inline(always)]
412 fn new_empty() -> Self {
413 Self {
414 key: fidl::new_empty!(fidl::encoding::BoundedString<64>, D),
415 defaultval: fidl::new_empty!(bool, D),
416 }
417 }
418
419 #[inline]
420 unsafe fn decode(
421 &mut self,
422 decoder: &mut fidl::encoding::Decoder<'_, D>,
423 offset: usize,
424 _depth: fidl::encoding::Depth,
425 ) -> fidl::Result<()> {
426 decoder.debug_check_bounds::<Self>(offset);
427 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
429 let padval = unsafe { (ptr as *const u64).read_unaligned() };
430 let mask = 0xffffffffffffff00u64;
431 let maskedval = padval & mask;
432 if maskedval != 0 {
433 return Err(fidl::Error::NonZeroPadding {
434 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
435 });
436 }
437 fidl::decode!(
438 fidl::encoding::BoundedString<64>,
439 D,
440 &mut self.key,
441 decoder,
442 offset + 0,
443 _depth
444 )?;
445 fidl::decode!(bool, D, &mut self.defaultval, decoder, offset + 16, _depth)?;
446 Ok(())
447 }
448 }
449
450 impl fidl::encoding::ValueTypeMarker for ArgumentsGetBoolResponse {
451 type Borrowed<'a> = &'a Self;
452 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
453 value
454 }
455 }
456
457 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetBoolResponse {
458 type Owned = Self;
459
460 #[inline(always)]
461 fn inline_align(_context: fidl::encoding::Context) -> usize {
462 1
463 }
464
465 #[inline(always)]
466 fn inline_size(_context: fidl::encoding::Context) -> usize {
467 1
468 }
469 }
470
471 unsafe impl<D: fidl::encoding::ResourceDialect>
472 fidl::encoding::Encode<ArgumentsGetBoolResponse, D> for &ArgumentsGetBoolResponse
473 {
474 #[inline]
475 unsafe fn encode(
476 self,
477 encoder: &mut fidl::encoding::Encoder<'_, D>,
478 offset: usize,
479 _depth: fidl::encoding::Depth,
480 ) -> fidl::Result<()> {
481 encoder.debug_check_bounds::<ArgumentsGetBoolResponse>(offset);
482 fidl::encoding::Encode::<ArgumentsGetBoolResponse, D>::encode(
484 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
485 encoder,
486 offset,
487 _depth,
488 )
489 }
490 }
491 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
492 fidl::encoding::Encode<ArgumentsGetBoolResponse, D> for (T0,)
493 {
494 #[inline]
495 unsafe fn encode(
496 self,
497 encoder: &mut fidl::encoding::Encoder<'_, D>,
498 offset: usize,
499 depth: fidl::encoding::Depth,
500 ) -> fidl::Result<()> {
501 encoder.debug_check_bounds::<ArgumentsGetBoolResponse>(offset);
502 self.0.encode(encoder, offset + 0, depth)?;
506 Ok(())
507 }
508 }
509
510 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
511 for ArgumentsGetBoolResponse
512 {
513 #[inline(always)]
514 fn new_empty() -> Self {
515 Self { value: fidl::new_empty!(bool, D) }
516 }
517
518 #[inline]
519 unsafe fn decode(
520 &mut self,
521 decoder: &mut fidl::encoding::Decoder<'_, D>,
522 offset: usize,
523 _depth: fidl::encoding::Depth,
524 ) -> fidl::Result<()> {
525 decoder.debug_check_bounds::<Self>(offset);
526 fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
528 Ok(())
529 }
530 }
531
532 impl fidl::encoding::ValueTypeMarker for ArgumentsGetBoolsRequest {
533 type Borrowed<'a> = &'a Self;
534 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
535 value
536 }
537 }
538
539 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetBoolsRequest {
540 type Owned = Self;
541
542 #[inline(always)]
543 fn inline_align(_context: fidl::encoding::Context) -> usize {
544 8
545 }
546
547 #[inline(always)]
548 fn inline_size(_context: fidl::encoding::Context) -> usize {
549 16
550 }
551 }
552
553 unsafe impl<D: fidl::encoding::ResourceDialect>
554 fidl::encoding::Encode<ArgumentsGetBoolsRequest, D> for &ArgumentsGetBoolsRequest
555 {
556 #[inline]
557 unsafe fn encode(
558 self,
559 encoder: &mut fidl::encoding::Encoder<'_, D>,
560 offset: usize,
561 _depth: fidl::encoding::Depth,
562 ) -> fidl::Result<()> {
563 encoder.debug_check_bounds::<ArgumentsGetBoolsRequest>(offset);
564 fidl::encoding::Encode::<ArgumentsGetBoolsRequest, D>::encode(
566 (
567 <fidl::encoding::Vector<BoolPair, 255> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
568 ),
569 encoder, offset, _depth
570 )
571 }
572 }
573 unsafe impl<
574 D: fidl::encoding::ResourceDialect,
575 T0: fidl::encoding::Encode<fidl::encoding::Vector<BoolPair, 255>, D>,
576 > fidl::encoding::Encode<ArgumentsGetBoolsRequest, D> for (T0,)
577 {
578 #[inline]
579 unsafe fn encode(
580 self,
581 encoder: &mut fidl::encoding::Encoder<'_, D>,
582 offset: usize,
583 depth: fidl::encoding::Depth,
584 ) -> fidl::Result<()> {
585 encoder.debug_check_bounds::<ArgumentsGetBoolsRequest>(offset);
586 self.0.encode(encoder, offset + 0, depth)?;
590 Ok(())
591 }
592 }
593
594 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
595 for ArgumentsGetBoolsRequest
596 {
597 #[inline(always)]
598 fn new_empty() -> Self {
599 Self { keys: fidl::new_empty!(fidl::encoding::Vector<BoolPair, 255>, D) }
600 }
601
602 #[inline]
603 unsafe fn decode(
604 &mut self,
605 decoder: &mut fidl::encoding::Decoder<'_, D>,
606 offset: usize,
607 _depth: fidl::encoding::Depth,
608 ) -> fidl::Result<()> {
609 decoder.debug_check_bounds::<Self>(offset);
610 fidl::decode!(fidl::encoding::Vector<BoolPair, 255>, D, &mut self.keys, decoder, offset + 0, _depth)?;
612 Ok(())
613 }
614 }
615
616 impl fidl::encoding::ValueTypeMarker for ArgumentsGetBoolsResponse {
617 type Borrowed<'a> = &'a Self;
618 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
619 value
620 }
621 }
622
623 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetBoolsResponse {
624 type Owned = Self;
625
626 #[inline(always)]
627 fn inline_align(_context: fidl::encoding::Context) -> usize {
628 8
629 }
630
631 #[inline(always)]
632 fn inline_size(_context: fidl::encoding::Context) -> usize {
633 16
634 }
635 }
636
637 unsafe impl<D: fidl::encoding::ResourceDialect>
638 fidl::encoding::Encode<ArgumentsGetBoolsResponse, D> for &ArgumentsGetBoolsResponse
639 {
640 #[inline]
641 unsafe fn encode(
642 self,
643 encoder: &mut fidl::encoding::Encoder<'_, D>,
644 offset: usize,
645 _depth: fidl::encoding::Depth,
646 ) -> fidl::Result<()> {
647 encoder.debug_check_bounds::<ArgumentsGetBoolsResponse>(offset);
648 fidl::encoding::Encode::<ArgumentsGetBoolsResponse, D>::encode(
650 (<fidl::encoding::Vector<bool, 255> as fidl::encoding::ValueTypeMarker>::borrow(
651 &self.values,
652 ),),
653 encoder,
654 offset,
655 _depth,
656 )
657 }
658 }
659 unsafe impl<
660 D: fidl::encoding::ResourceDialect,
661 T0: fidl::encoding::Encode<fidl::encoding::Vector<bool, 255>, D>,
662 > fidl::encoding::Encode<ArgumentsGetBoolsResponse, D> for (T0,)
663 {
664 #[inline]
665 unsafe fn encode(
666 self,
667 encoder: &mut fidl::encoding::Encoder<'_, D>,
668 offset: usize,
669 depth: fidl::encoding::Depth,
670 ) -> fidl::Result<()> {
671 encoder.debug_check_bounds::<ArgumentsGetBoolsResponse>(offset);
672 self.0.encode(encoder, offset + 0, depth)?;
676 Ok(())
677 }
678 }
679
680 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
681 for ArgumentsGetBoolsResponse
682 {
683 #[inline(always)]
684 fn new_empty() -> Self {
685 Self { values: fidl::new_empty!(fidl::encoding::Vector<bool, 255>, D) }
686 }
687
688 #[inline]
689 unsafe fn decode(
690 &mut self,
691 decoder: &mut fidl::encoding::Decoder<'_, D>,
692 offset: usize,
693 _depth: fidl::encoding::Depth,
694 ) -> fidl::Result<()> {
695 decoder.debug_check_bounds::<Self>(offset);
696 fidl::decode!(fidl::encoding::Vector<bool, 255>, D, &mut self.values, decoder, offset + 0, _depth)?;
698 Ok(())
699 }
700 }
701
702 impl fidl::encoding::ValueTypeMarker for ArgumentsGetStringRequest {
703 type Borrowed<'a> = &'a Self;
704 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
705 value
706 }
707 }
708
709 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetStringRequest {
710 type Owned = Self;
711
712 #[inline(always)]
713 fn inline_align(_context: fidl::encoding::Context) -> usize {
714 8
715 }
716
717 #[inline(always)]
718 fn inline_size(_context: fidl::encoding::Context) -> usize {
719 16
720 }
721 }
722
723 unsafe impl<D: fidl::encoding::ResourceDialect>
724 fidl::encoding::Encode<ArgumentsGetStringRequest, D> for &ArgumentsGetStringRequest
725 {
726 #[inline]
727 unsafe fn encode(
728 self,
729 encoder: &mut fidl::encoding::Encoder<'_, D>,
730 offset: usize,
731 _depth: fidl::encoding::Depth,
732 ) -> fidl::Result<()> {
733 encoder.debug_check_bounds::<ArgumentsGetStringRequest>(offset);
734 fidl::encoding::Encode::<ArgumentsGetStringRequest, D>::encode(
736 (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
737 &self.key,
738 ),),
739 encoder,
740 offset,
741 _depth,
742 )
743 }
744 }
745 unsafe impl<
746 D: fidl::encoding::ResourceDialect,
747 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
748 > fidl::encoding::Encode<ArgumentsGetStringRequest, D> for (T0,)
749 {
750 #[inline]
751 unsafe fn encode(
752 self,
753 encoder: &mut fidl::encoding::Encoder<'_, D>,
754 offset: usize,
755 depth: fidl::encoding::Depth,
756 ) -> fidl::Result<()> {
757 encoder.debug_check_bounds::<ArgumentsGetStringRequest>(offset);
758 self.0.encode(encoder, offset + 0, depth)?;
762 Ok(())
763 }
764 }
765
766 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
767 for ArgumentsGetStringRequest
768 {
769 #[inline(always)]
770 fn new_empty() -> Self {
771 Self { key: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
772 }
773
774 #[inline]
775 unsafe fn decode(
776 &mut self,
777 decoder: &mut fidl::encoding::Decoder<'_, D>,
778 offset: usize,
779 _depth: fidl::encoding::Depth,
780 ) -> fidl::Result<()> {
781 decoder.debug_check_bounds::<Self>(offset);
782 fidl::decode!(
784 fidl::encoding::BoundedString<64>,
785 D,
786 &mut self.key,
787 decoder,
788 offset + 0,
789 _depth
790 )?;
791 Ok(())
792 }
793 }
794
795 impl fidl::encoding::ValueTypeMarker for ArgumentsGetStringResponse {
796 type Borrowed<'a> = &'a Self;
797 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
798 value
799 }
800 }
801
802 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetStringResponse {
803 type Owned = Self;
804
805 #[inline(always)]
806 fn inline_align(_context: fidl::encoding::Context) -> usize {
807 8
808 }
809
810 #[inline(always)]
811 fn inline_size(_context: fidl::encoding::Context) -> usize {
812 16
813 }
814 }
815
816 unsafe impl<D: fidl::encoding::ResourceDialect>
817 fidl::encoding::Encode<ArgumentsGetStringResponse, D> for &ArgumentsGetStringResponse
818 {
819 #[inline]
820 unsafe fn encode(
821 self,
822 encoder: &mut fidl::encoding::Encoder<'_, D>,
823 offset: usize,
824 _depth: fidl::encoding::Depth,
825 ) -> fidl::Result<()> {
826 encoder.debug_check_bounds::<ArgumentsGetStringResponse>(offset);
827 fidl::encoding::Encode::<ArgumentsGetStringResponse, D>::encode(
829 (
830 <fidl::encoding::Optional<fidl::encoding::BoundedString<128>> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
831 ),
832 encoder, offset, _depth
833 )
834 }
835 }
836 unsafe impl<
837 D: fidl::encoding::ResourceDialect,
838 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<128>>, D>,
839 > fidl::encoding::Encode<ArgumentsGetStringResponse, D> for (T0,)
840 {
841 #[inline]
842 unsafe fn encode(
843 self,
844 encoder: &mut fidl::encoding::Encoder<'_, D>,
845 offset: usize,
846 depth: fidl::encoding::Depth,
847 ) -> fidl::Result<()> {
848 encoder.debug_check_bounds::<ArgumentsGetStringResponse>(offset);
849 self.0.encode(encoder, offset + 0, depth)?;
853 Ok(())
854 }
855 }
856
857 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
858 for ArgumentsGetStringResponse
859 {
860 #[inline(always)]
861 fn new_empty() -> Self {
862 Self {
863 value: fidl::new_empty!(
864 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
865 D
866 ),
867 }
868 }
869
870 #[inline]
871 unsafe fn decode(
872 &mut self,
873 decoder: &mut fidl::encoding::Decoder<'_, D>,
874 offset: usize,
875 _depth: fidl::encoding::Depth,
876 ) -> fidl::Result<()> {
877 decoder.debug_check_bounds::<Self>(offset);
878 fidl::decode!(
880 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
881 D,
882 &mut self.value,
883 decoder,
884 offset + 0,
885 _depth
886 )?;
887 Ok(())
888 }
889 }
890
891 impl fidl::encoding::ValueTypeMarker for ArgumentsGetStringsRequest {
892 type Borrowed<'a> = &'a Self;
893 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
894 value
895 }
896 }
897
898 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetStringsRequest {
899 type Owned = Self;
900
901 #[inline(always)]
902 fn inline_align(_context: fidl::encoding::Context) -> usize {
903 8
904 }
905
906 #[inline(always)]
907 fn inline_size(_context: fidl::encoding::Context) -> usize {
908 16
909 }
910 }
911
912 unsafe impl<D: fidl::encoding::ResourceDialect>
913 fidl::encoding::Encode<ArgumentsGetStringsRequest, D> for &ArgumentsGetStringsRequest
914 {
915 #[inline]
916 unsafe fn encode(
917 self,
918 encoder: &mut fidl::encoding::Encoder<'_, D>,
919 offset: usize,
920 _depth: fidl::encoding::Depth,
921 ) -> fidl::Result<()> {
922 encoder.debug_check_bounds::<ArgumentsGetStringsRequest>(offset);
923 fidl::encoding::Encode::<ArgumentsGetStringsRequest, D>::encode(
925 (
926 <fidl::encoding::Vector<fidl::encoding::BoundedString<64>, 255> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
927 ),
928 encoder, offset, _depth
929 )
930 }
931 }
932 unsafe impl<
933 D: fidl::encoding::ResourceDialect,
934 T0: fidl::encoding::Encode<
935 fidl::encoding::Vector<fidl::encoding::BoundedString<64>, 255>,
936 D,
937 >,
938 > fidl::encoding::Encode<ArgumentsGetStringsRequest, D> for (T0,)
939 {
940 #[inline]
941 unsafe fn encode(
942 self,
943 encoder: &mut fidl::encoding::Encoder<'_, D>,
944 offset: usize,
945 depth: fidl::encoding::Depth,
946 ) -> fidl::Result<()> {
947 encoder.debug_check_bounds::<ArgumentsGetStringsRequest>(offset);
948 self.0.encode(encoder, offset + 0, depth)?;
952 Ok(())
953 }
954 }
955
956 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
957 for ArgumentsGetStringsRequest
958 {
959 #[inline(always)]
960 fn new_empty() -> Self {
961 Self {
962 keys: fidl::new_empty!(
963 fidl::encoding::Vector<fidl::encoding::BoundedString<64>, 255>,
964 D
965 ),
966 }
967 }
968
969 #[inline]
970 unsafe fn decode(
971 &mut self,
972 decoder: &mut fidl::encoding::Decoder<'_, D>,
973 offset: usize,
974 _depth: fidl::encoding::Depth,
975 ) -> fidl::Result<()> {
976 decoder.debug_check_bounds::<Self>(offset);
977 fidl::decode!(
979 fidl::encoding::Vector<fidl::encoding::BoundedString<64>, 255>,
980 D,
981 &mut self.keys,
982 decoder,
983 offset + 0,
984 _depth
985 )?;
986 Ok(())
987 }
988 }
989
990 impl fidl::encoding::ValueTypeMarker for ArgumentsGetStringsResponse {
991 type Borrowed<'a> = &'a Self;
992 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
993 value
994 }
995 }
996
997 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetStringsResponse {
998 type Owned = Self;
999
1000 #[inline(always)]
1001 fn inline_align(_context: fidl::encoding::Context) -> usize {
1002 8
1003 }
1004
1005 #[inline(always)]
1006 fn inline_size(_context: fidl::encoding::Context) -> usize {
1007 16
1008 }
1009 }
1010
1011 unsafe impl<D: fidl::encoding::ResourceDialect>
1012 fidl::encoding::Encode<ArgumentsGetStringsResponse, D> for &ArgumentsGetStringsResponse
1013 {
1014 #[inline]
1015 unsafe fn encode(
1016 self,
1017 encoder: &mut fidl::encoding::Encoder<'_, D>,
1018 offset: usize,
1019 _depth: fidl::encoding::Depth,
1020 ) -> fidl::Result<()> {
1021 encoder.debug_check_bounds::<ArgumentsGetStringsResponse>(offset);
1022 fidl::encoding::Encode::<ArgumentsGetStringsResponse, D>::encode(
1024 (<fidl::encoding::Vector<
1025 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
1026 255,
1027 > as fidl::encoding::ValueTypeMarker>::borrow(&self.values),),
1028 encoder,
1029 offset,
1030 _depth,
1031 )
1032 }
1033 }
1034 unsafe impl<
1035 D: fidl::encoding::ResourceDialect,
1036 T0: fidl::encoding::Encode<
1037 fidl::encoding::Vector<
1038 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
1039 255,
1040 >,
1041 D,
1042 >,
1043 > fidl::encoding::Encode<ArgumentsGetStringsResponse, D> for (T0,)
1044 {
1045 #[inline]
1046 unsafe fn encode(
1047 self,
1048 encoder: &mut fidl::encoding::Encoder<'_, D>,
1049 offset: usize,
1050 depth: fidl::encoding::Depth,
1051 ) -> fidl::Result<()> {
1052 encoder.debug_check_bounds::<ArgumentsGetStringsResponse>(offset);
1053 self.0.encode(encoder, offset + 0, depth)?;
1057 Ok(())
1058 }
1059 }
1060
1061 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1062 for ArgumentsGetStringsResponse
1063 {
1064 #[inline(always)]
1065 fn new_empty() -> Self {
1066 Self {
1067 values: fidl::new_empty!(
1068 fidl::encoding::Vector<
1069 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
1070 255,
1071 >,
1072 D
1073 ),
1074 }
1075 }
1076
1077 #[inline]
1078 unsafe fn decode(
1079 &mut self,
1080 decoder: &mut fidl::encoding::Decoder<'_, D>,
1081 offset: usize,
1082 _depth: fidl::encoding::Depth,
1083 ) -> fidl::Result<()> {
1084 decoder.debug_check_bounds::<Self>(offset);
1085 fidl::decode!(
1087 fidl::encoding::Vector<
1088 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
1089 255,
1090 >,
1091 D,
1092 &mut self.values,
1093 decoder,
1094 offset + 0,
1095 _depth
1096 )?;
1097 Ok(())
1098 }
1099 }
1100
1101 impl fidl::encoding::ValueTypeMarker for BoolPair {
1102 type Borrowed<'a> = &'a Self;
1103 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1104 value
1105 }
1106 }
1107
1108 unsafe impl fidl::encoding::TypeMarker for BoolPair {
1109 type Owned = Self;
1110
1111 #[inline(always)]
1112 fn inline_align(_context: fidl::encoding::Context) -> usize {
1113 8
1114 }
1115
1116 #[inline(always)]
1117 fn inline_size(_context: fidl::encoding::Context) -> usize {
1118 24
1119 }
1120 }
1121
1122 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BoolPair, D> for &BoolPair {
1123 #[inline]
1124 unsafe fn encode(
1125 self,
1126 encoder: &mut fidl::encoding::Encoder<'_, D>,
1127 offset: usize,
1128 _depth: fidl::encoding::Depth,
1129 ) -> fidl::Result<()> {
1130 encoder.debug_check_bounds::<BoolPair>(offset);
1131 fidl::encoding::Encode::<BoolPair, D>::encode(
1133 (
1134 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
1135 &self.key,
1136 ),
1137 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.defaultval),
1138 ),
1139 encoder,
1140 offset,
1141 _depth,
1142 )
1143 }
1144 }
1145 unsafe impl<
1146 D: fidl::encoding::ResourceDialect,
1147 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
1148 T1: fidl::encoding::Encode<bool, D>,
1149 > fidl::encoding::Encode<BoolPair, D> for (T0, T1)
1150 {
1151 #[inline]
1152 unsafe fn encode(
1153 self,
1154 encoder: &mut fidl::encoding::Encoder<'_, D>,
1155 offset: usize,
1156 depth: fidl::encoding::Depth,
1157 ) -> fidl::Result<()> {
1158 encoder.debug_check_bounds::<BoolPair>(offset);
1159 unsafe {
1162 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1163 (ptr as *mut u64).write_unaligned(0);
1164 }
1165 self.0.encode(encoder, offset + 0, depth)?;
1167 self.1.encode(encoder, offset + 16, depth)?;
1168 Ok(())
1169 }
1170 }
1171
1172 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BoolPair {
1173 #[inline(always)]
1174 fn new_empty() -> Self {
1175 Self {
1176 key: fidl::new_empty!(fidl::encoding::BoundedString<64>, D),
1177 defaultval: fidl::new_empty!(bool, D),
1178 }
1179 }
1180
1181 #[inline]
1182 unsafe fn decode(
1183 &mut self,
1184 decoder: &mut fidl::encoding::Decoder<'_, D>,
1185 offset: usize,
1186 _depth: fidl::encoding::Depth,
1187 ) -> fidl::Result<()> {
1188 decoder.debug_check_bounds::<Self>(offset);
1189 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1191 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1192 let mask = 0xffffffffffffff00u64;
1193 let maskedval = padval & mask;
1194 if maskedval != 0 {
1195 return Err(fidl::Error::NonZeroPadding {
1196 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1197 });
1198 }
1199 fidl::decode!(
1200 fidl::encoding::BoundedString<64>,
1201 D,
1202 &mut self.key,
1203 decoder,
1204 offset + 0,
1205 _depth
1206 )?;
1207 fidl::decode!(bool, D, &mut self.defaultval, decoder, offset + 16, _depth)?;
1208 Ok(())
1209 }
1210 }
1211
1212 impl fidl::encoding::ValueTypeMarker for Extra {
1213 type Borrowed<'a> = &'a Self;
1214 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1215 value
1216 }
1217 }
1218
1219 unsafe impl fidl::encoding::TypeMarker for Extra {
1220 type Owned = Self;
1221
1222 #[inline(always)]
1223 fn inline_align(_context: fidl::encoding::Context) -> usize {
1224 4
1225 }
1226
1227 #[inline(always)]
1228 fn inline_size(_context: fidl::encoding::Context) -> usize {
1229 4
1230 }
1231 #[inline(always)]
1232 fn encode_is_copy() -> bool {
1233 true
1234 }
1235
1236 #[inline(always)]
1237 fn decode_is_copy() -> bool {
1238 true
1239 }
1240 }
1241
1242 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Extra, D> for &Extra {
1243 #[inline]
1244 unsafe fn encode(
1245 self,
1246 encoder: &mut fidl::encoding::Encoder<'_, D>,
1247 offset: usize,
1248 _depth: fidl::encoding::Depth,
1249 ) -> fidl::Result<()> {
1250 encoder.debug_check_bounds::<Extra>(offset);
1251 unsafe {
1252 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1254 (buf_ptr as *mut Extra).write_unaligned((self as *const Extra).read());
1255 }
1258 Ok(())
1259 }
1260 }
1261 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1262 fidl::encoding::Encode<Extra, D> for (T0,)
1263 {
1264 #[inline]
1265 unsafe fn encode(
1266 self,
1267 encoder: &mut fidl::encoding::Encoder<'_, D>,
1268 offset: usize,
1269 depth: fidl::encoding::Depth,
1270 ) -> fidl::Result<()> {
1271 encoder.debug_check_bounds::<Extra>(offset);
1272 self.0.encode(encoder, offset + 0, depth)?;
1276 Ok(())
1277 }
1278 }
1279
1280 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Extra {
1281 #[inline(always)]
1282 fn new_empty() -> Self {
1283 Self { n: fidl::new_empty!(u32, D) }
1284 }
1285
1286 #[inline]
1287 unsafe fn decode(
1288 &mut self,
1289 decoder: &mut fidl::encoding::Decoder<'_, D>,
1290 offset: usize,
1291 _depth: fidl::encoding::Depth,
1292 ) -> fidl::Result<()> {
1293 decoder.debug_check_bounds::<Self>(offset);
1294 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1295 unsafe {
1298 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1299 }
1300 Ok(())
1301 }
1302 }
1303
1304 impl fidl::encoding::ValueTypeMarker for FactoryItemsGetRequest {
1305 type Borrowed<'a> = &'a Self;
1306 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1307 value
1308 }
1309 }
1310
1311 unsafe impl fidl::encoding::TypeMarker for FactoryItemsGetRequest {
1312 type Owned = Self;
1313
1314 #[inline(always)]
1315 fn inline_align(_context: fidl::encoding::Context) -> usize {
1316 4
1317 }
1318
1319 #[inline(always)]
1320 fn inline_size(_context: fidl::encoding::Context) -> usize {
1321 4
1322 }
1323 #[inline(always)]
1324 fn encode_is_copy() -> bool {
1325 true
1326 }
1327
1328 #[inline(always)]
1329 fn decode_is_copy() -> bool {
1330 true
1331 }
1332 }
1333
1334 unsafe impl<D: fidl::encoding::ResourceDialect>
1335 fidl::encoding::Encode<FactoryItemsGetRequest, D> for &FactoryItemsGetRequest
1336 {
1337 #[inline]
1338 unsafe fn encode(
1339 self,
1340 encoder: &mut fidl::encoding::Encoder<'_, D>,
1341 offset: usize,
1342 _depth: fidl::encoding::Depth,
1343 ) -> fidl::Result<()> {
1344 encoder.debug_check_bounds::<FactoryItemsGetRequest>(offset);
1345 unsafe {
1346 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1348 (buf_ptr as *mut FactoryItemsGetRequest)
1349 .write_unaligned((self as *const FactoryItemsGetRequest).read());
1350 }
1353 Ok(())
1354 }
1355 }
1356 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1357 fidl::encoding::Encode<FactoryItemsGetRequest, D> for (T0,)
1358 {
1359 #[inline]
1360 unsafe fn encode(
1361 self,
1362 encoder: &mut fidl::encoding::Encoder<'_, D>,
1363 offset: usize,
1364 depth: fidl::encoding::Depth,
1365 ) -> fidl::Result<()> {
1366 encoder.debug_check_bounds::<FactoryItemsGetRequest>(offset);
1367 self.0.encode(encoder, offset + 0, depth)?;
1371 Ok(())
1372 }
1373 }
1374
1375 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1376 for FactoryItemsGetRequest
1377 {
1378 #[inline(always)]
1379 fn new_empty() -> Self {
1380 Self { extra: fidl::new_empty!(u32, D) }
1381 }
1382
1383 #[inline]
1384 unsafe fn decode(
1385 &mut self,
1386 decoder: &mut fidl::encoding::Decoder<'_, D>,
1387 offset: usize,
1388 _depth: fidl::encoding::Depth,
1389 ) -> fidl::Result<()> {
1390 decoder.debug_check_bounds::<Self>(offset);
1391 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1392 unsafe {
1395 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1396 }
1397 Ok(())
1398 }
1399 }
1400
1401 impl fidl::encoding::ValueTypeMarker for ItemsGet2Request {
1402 type Borrowed<'a> = &'a Self;
1403 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1404 value
1405 }
1406 }
1407
1408 unsafe impl fidl::encoding::TypeMarker for ItemsGet2Request {
1409 type Owned = Self;
1410
1411 #[inline(always)]
1412 fn inline_align(_context: fidl::encoding::Context) -> usize {
1413 8
1414 }
1415
1416 #[inline(always)]
1417 fn inline_size(_context: fidl::encoding::Context) -> usize {
1418 16
1419 }
1420 }
1421
1422 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ItemsGet2Request, D>
1423 for &ItemsGet2Request
1424 {
1425 #[inline]
1426 unsafe fn encode(
1427 self,
1428 encoder: &mut fidl::encoding::Encoder<'_, D>,
1429 offset: usize,
1430 _depth: fidl::encoding::Depth,
1431 ) -> fidl::Result<()> {
1432 encoder.debug_check_bounds::<ItemsGet2Request>(offset);
1433 fidl::encoding::Encode::<ItemsGet2Request, D>::encode(
1435 (
1436 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.type_),
1437 <fidl::encoding::Boxed<Extra> as fidl::encoding::ValueTypeMarker>::borrow(
1438 &self.extra,
1439 ),
1440 ),
1441 encoder,
1442 offset,
1443 _depth,
1444 )
1445 }
1446 }
1447 unsafe impl<
1448 D: fidl::encoding::ResourceDialect,
1449 T0: fidl::encoding::Encode<u32, D>,
1450 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Extra>, D>,
1451 > fidl::encoding::Encode<ItemsGet2Request, D> for (T0, T1)
1452 {
1453 #[inline]
1454 unsafe fn encode(
1455 self,
1456 encoder: &mut fidl::encoding::Encoder<'_, D>,
1457 offset: usize,
1458 depth: fidl::encoding::Depth,
1459 ) -> fidl::Result<()> {
1460 encoder.debug_check_bounds::<ItemsGet2Request>(offset);
1461 unsafe {
1464 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1465 (ptr as *mut u64).write_unaligned(0);
1466 }
1467 self.0.encode(encoder, offset + 0, depth)?;
1469 self.1.encode(encoder, offset + 8, depth)?;
1470 Ok(())
1471 }
1472 }
1473
1474 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ItemsGet2Request {
1475 #[inline(always)]
1476 fn new_empty() -> Self {
1477 Self {
1478 type_: fidl::new_empty!(u32, D),
1479 extra: fidl::new_empty!(fidl::encoding::Boxed<Extra>, D),
1480 }
1481 }
1482
1483 #[inline]
1484 unsafe fn decode(
1485 &mut self,
1486 decoder: &mut fidl::encoding::Decoder<'_, D>,
1487 offset: usize,
1488 _depth: fidl::encoding::Depth,
1489 ) -> fidl::Result<()> {
1490 decoder.debug_check_bounds::<Self>(offset);
1491 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1493 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1494 let mask = 0xffffffff00000000u64;
1495 let maskedval = padval & mask;
1496 if maskedval != 0 {
1497 return Err(fidl::Error::NonZeroPadding {
1498 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1499 });
1500 }
1501 fidl::decode!(u32, D, &mut self.type_, decoder, offset + 0, _depth)?;
1502 fidl::decode!(
1503 fidl::encoding::Boxed<Extra>,
1504 D,
1505 &mut self.extra,
1506 decoder,
1507 offset + 8,
1508 _depth
1509 )?;
1510 Ok(())
1511 }
1512 }
1513
1514 impl fidl::encoding::ValueTypeMarker for ItemsGetBootloaderFileRequest {
1515 type Borrowed<'a> = &'a Self;
1516 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1517 value
1518 }
1519 }
1520
1521 unsafe impl fidl::encoding::TypeMarker for ItemsGetBootloaderFileRequest {
1522 type Owned = Self;
1523
1524 #[inline(always)]
1525 fn inline_align(_context: fidl::encoding::Context) -> usize {
1526 8
1527 }
1528
1529 #[inline(always)]
1530 fn inline_size(_context: fidl::encoding::Context) -> usize {
1531 16
1532 }
1533 }
1534
1535 unsafe impl<D: fidl::encoding::ResourceDialect>
1536 fidl::encoding::Encode<ItemsGetBootloaderFileRequest, D>
1537 for &ItemsGetBootloaderFileRequest
1538 {
1539 #[inline]
1540 unsafe fn encode(
1541 self,
1542 encoder: &mut fidl::encoding::Encoder<'_, D>,
1543 offset: usize,
1544 _depth: fidl::encoding::Depth,
1545 ) -> fidl::Result<()> {
1546 encoder.debug_check_bounds::<ItemsGetBootloaderFileRequest>(offset);
1547 fidl::encoding::Encode::<ItemsGetBootloaderFileRequest, D>::encode(
1549 (<fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
1550 &self.filename,
1551 ),),
1552 encoder,
1553 offset,
1554 _depth,
1555 )
1556 }
1557 }
1558 unsafe impl<
1559 D: fidl::encoding::ResourceDialect,
1560 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
1561 > fidl::encoding::Encode<ItemsGetBootloaderFileRequest, D> for (T0,)
1562 {
1563 #[inline]
1564 unsafe fn encode(
1565 self,
1566 encoder: &mut fidl::encoding::Encoder<'_, D>,
1567 offset: usize,
1568 depth: fidl::encoding::Depth,
1569 ) -> fidl::Result<()> {
1570 encoder.debug_check_bounds::<ItemsGetBootloaderFileRequest>(offset);
1571 self.0.encode(encoder, offset + 0, depth)?;
1575 Ok(())
1576 }
1577 }
1578
1579 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1580 for ItemsGetBootloaderFileRequest
1581 {
1582 #[inline(always)]
1583 fn new_empty() -> Self {
1584 Self { filename: fidl::new_empty!(fidl::encoding::BoundedString<255>, D) }
1585 }
1586
1587 #[inline]
1588 unsafe fn decode(
1589 &mut self,
1590 decoder: &mut fidl::encoding::Decoder<'_, D>,
1591 offset: usize,
1592 _depth: fidl::encoding::Depth,
1593 ) -> fidl::Result<()> {
1594 decoder.debug_check_bounds::<Self>(offset);
1595 fidl::decode!(
1597 fidl::encoding::BoundedString<255>,
1598 D,
1599 &mut self.filename,
1600 decoder,
1601 offset + 0,
1602 _depth
1603 )?;
1604 Ok(())
1605 }
1606 }
1607
1608 impl fidl::encoding::ValueTypeMarker for ItemsGetRequest {
1609 type Borrowed<'a> = &'a Self;
1610 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1611 value
1612 }
1613 }
1614
1615 unsafe impl fidl::encoding::TypeMarker for ItemsGetRequest {
1616 type Owned = Self;
1617
1618 #[inline(always)]
1619 fn inline_align(_context: fidl::encoding::Context) -> usize {
1620 4
1621 }
1622
1623 #[inline(always)]
1624 fn inline_size(_context: fidl::encoding::Context) -> usize {
1625 8
1626 }
1627 #[inline(always)]
1628 fn encode_is_copy() -> bool {
1629 true
1630 }
1631
1632 #[inline(always)]
1633 fn decode_is_copy() -> bool {
1634 true
1635 }
1636 }
1637
1638 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ItemsGetRequest, D>
1639 for &ItemsGetRequest
1640 {
1641 #[inline]
1642 unsafe fn encode(
1643 self,
1644 encoder: &mut fidl::encoding::Encoder<'_, D>,
1645 offset: usize,
1646 _depth: fidl::encoding::Depth,
1647 ) -> fidl::Result<()> {
1648 encoder.debug_check_bounds::<ItemsGetRequest>(offset);
1649 unsafe {
1650 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1652 (buf_ptr as *mut ItemsGetRequest)
1653 .write_unaligned((self as *const ItemsGetRequest).read());
1654 }
1657 Ok(())
1658 }
1659 }
1660 unsafe impl<
1661 D: fidl::encoding::ResourceDialect,
1662 T0: fidl::encoding::Encode<u32, D>,
1663 T1: fidl::encoding::Encode<u32, D>,
1664 > fidl::encoding::Encode<ItemsGetRequest, D> for (T0, T1)
1665 {
1666 #[inline]
1667 unsafe fn encode(
1668 self,
1669 encoder: &mut fidl::encoding::Encoder<'_, D>,
1670 offset: usize,
1671 depth: fidl::encoding::Depth,
1672 ) -> fidl::Result<()> {
1673 encoder.debug_check_bounds::<ItemsGetRequest>(offset);
1674 self.0.encode(encoder, offset + 0, depth)?;
1678 self.1.encode(encoder, offset + 4, depth)?;
1679 Ok(())
1680 }
1681 }
1682
1683 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ItemsGetRequest {
1684 #[inline(always)]
1685 fn new_empty() -> Self {
1686 Self { type_: fidl::new_empty!(u32, D), extra: fidl::new_empty!(u32, D) }
1687 }
1688
1689 #[inline]
1690 unsafe fn decode(
1691 &mut self,
1692 decoder: &mut fidl::encoding::Decoder<'_, D>,
1693 offset: usize,
1694 _depth: fidl::encoding::Depth,
1695 ) -> fidl::Result<()> {
1696 decoder.debug_check_bounds::<Self>(offset);
1697 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1698 unsafe {
1701 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1702 }
1703 Ok(())
1704 }
1705 }
1706}