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_paver::natural::*;
8
9 #[derive(Debug, PartialEq)]
10 pub struct DataSinkReadAssetResponse {
11 pub asset: ::fidl_next_fuchsia_mem::natural::Buffer,
12 }
13
14 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataSinkReadAssetResponse, ___E>
15 for DataSinkReadAssetResponse
16 where
17 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18 ___E: ::fidl_next::fuchsia::HandleEncoder,
19 {
20 #[inline]
21 fn encode(
22 self,
23 encoder_: &mut ___E,
24 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadAssetResponse>,
25 _: (),
26 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
27 ::fidl_next::munge! {
28 let crate::wire::DataSinkReadAssetResponse {
29 asset,
30
31 } = out_;
32 }
33
34 ::fidl_next::Encode::encode(self.asset, encoder_, asset, ())?;
35
36 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(asset.as_mut_ptr()) };
37
38 Ok(())
39 }
40 }
41
42 unsafe impl<___E>
43 ::fidl_next::EncodeOption<
44 ::fidl_next::wire::Box<'static, crate::wire::DataSinkReadAssetResponse>,
45 ___E,
46 > for DataSinkReadAssetResponse
47 where
48 ___E: ::fidl_next::Encoder + ?Sized,
49 DataSinkReadAssetResponse:
50 ::fidl_next::Encode<crate::wire::DataSinkReadAssetResponse, ___E>,
51 {
52 #[inline]
53 fn encode_option(
54 this: ::core::option::Option<Self>,
55 encoder: &mut ___E,
56 out: &mut ::core::mem::MaybeUninit<
57 ::fidl_next::wire::Box<'static, crate::wire::DataSinkReadAssetResponse>,
58 >,
59 _: (),
60 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
61 if let Some(inner) = this {
62 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
63 ::fidl_next::wire::Box::encode_present(out);
64 } else {
65 ::fidl_next::wire::Box::encode_absent(out);
66 }
67
68 Ok(())
69 }
70 }
71
72 impl ::fidl_next::FromWire<crate::wire::DataSinkReadAssetResponse> for DataSinkReadAssetResponse {
73 #[inline]
74 fn from_wire(wire: crate::wire::DataSinkReadAssetResponse) -> Self {
75 Self { asset: ::fidl_next::FromWire::from_wire(wire.asset) }
76 }
77 }
78
79 #[derive(Debug, PartialEq)]
80 pub struct DataSinkWriteAssetRequest {
81 pub configuration: crate::natural::Configuration,
82
83 pub asset: crate::natural::Asset,
84
85 pub payload: ::fidl_next_fuchsia_mem::natural::Buffer,
86 }
87
88 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataSinkWriteAssetRequest, ___E>
89 for DataSinkWriteAssetRequest
90 where
91 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
92 ___E: ::fidl_next::fuchsia::HandleEncoder,
93 {
94 #[inline]
95 fn encode(
96 self,
97 encoder_: &mut ___E,
98 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteAssetRequest>,
99 _: (),
100 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
101 ::fidl_next::munge! {
102 let crate::wire::DataSinkWriteAssetRequest {
103 configuration,
104 asset,
105 payload,
106
107 } = out_;
108 }
109
110 ::fidl_next::Encode::encode(self.configuration, encoder_, configuration, ())?;
111
112 let mut _field =
113 unsafe { ::fidl_next::Slot::new_unchecked(configuration.as_mut_ptr()) };
114
115 ::fidl_next::Encode::encode(self.asset, encoder_, asset, ())?;
116
117 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(asset.as_mut_ptr()) };
118
119 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
120
121 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
122
123 Ok(())
124 }
125 }
126
127 unsafe impl<___E>
128 ::fidl_next::EncodeOption<
129 ::fidl_next::wire::Box<'static, crate::wire::DataSinkWriteAssetRequest>,
130 ___E,
131 > for DataSinkWriteAssetRequest
132 where
133 ___E: ::fidl_next::Encoder + ?Sized,
134 DataSinkWriteAssetRequest:
135 ::fidl_next::Encode<crate::wire::DataSinkWriteAssetRequest, ___E>,
136 {
137 #[inline]
138 fn encode_option(
139 this: ::core::option::Option<Self>,
140 encoder: &mut ___E,
141 out: &mut ::core::mem::MaybeUninit<
142 ::fidl_next::wire::Box<'static, crate::wire::DataSinkWriteAssetRequest>,
143 >,
144 _: (),
145 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
146 if let Some(inner) = this {
147 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
148 ::fidl_next::wire::Box::encode_present(out);
149 } else {
150 ::fidl_next::wire::Box::encode_absent(out);
151 }
152
153 Ok(())
154 }
155 }
156
157 impl ::fidl_next::FromWire<crate::wire::DataSinkWriteAssetRequest> for DataSinkWriteAssetRequest {
158 #[inline]
159 fn from_wire(wire: crate::wire::DataSinkWriteAssetRequest) -> Self {
160 Self {
161 configuration: ::fidl_next::FromWire::from_wire(wire.configuration),
162
163 asset: ::fidl_next::FromWire::from_wire(wire.asset),
164
165 payload: ::fidl_next::FromWire::from_wire(wire.payload),
166 }
167 }
168 }
169
170 #[derive(Debug, PartialEq)]
171 pub struct DataSinkWriteFirmwareRequest {
172 pub configuration: crate::natural::Configuration,
173
174 pub type_: ::std::string::String,
175
176 pub payload: ::fidl_next_fuchsia_mem::natural::Buffer,
177 }
178
179 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataSinkWriteFirmwareRequest<'static>, ___E>
180 for DataSinkWriteFirmwareRequest
181 where
182 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
183 ___E: ::fidl_next::Encoder,
184 ___E: ::fidl_next::fuchsia::HandleEncoder,
185 {
186 #[inline]
187 fn encode(
188 self,
189 encoder_: &mut ___E,
190 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteFirmwareRequest<'static>>,
191 _: (),
192 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
193 ::fidl_next::munge! {
194 let crate::wire::DataSinkWriteFirmwareRequest {
195 configuration,
196 type_,
197 payload,
198
199 } = out_;
200 }
201
202 ::fidl_next::Encode::encode(self.configuration, encoder_, configuration, ())?;
203
204 let mut _field =
205 unsafe { ::fidl_next::Slot::new_unchecked(configuration.as_mut_ptr()) };
206
207 ::fidl_next::Encode::encode(self.type_, encoder_, type_, 256)?;
208
209 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(type_.as_mut_ptr()) };
210 ::fidl_next::Constrained::validate(_field, 256)?;
211
212 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
213
214 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
215
216 Ok(())
217 }
218 }
219
220 unsafe impl<___E>
221 ::fidl_next::EncodeOption<
222 ::fidl_next::wire::Box<'static, crate::wire::DataSinkWriteFirmwareRequest<'static>>,
223 ___E,
224 > for DataSinkWriteFirmwareRequest
225 where
226 ___E: ::fidl_next::Encoder + ?Sized,
227 DataSinkWriteFirmwareRequest:
228 ::fidl_next::Encode<crate::wire::DataSinkWriteFirmwareRequest<'static>, ___E>,
229 {
230 #[inline]
231 fn encode_option(
232 this: ::core::option::Option<Self>,
233 encoder: &mut ___E,
234 out: &mut ::core::mem::MaybeUninit<
235 ::fidl_next::wire::Box<'static, crate::wire::DataSinkWriteFirmwareRequest<'static>>,
236 >,
237 _: (),
238 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
239 if let Some(inner) = this {
240 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
241 ::fidl_next::wire::Box::encode_present(out);
242 } else {
243 ::fidl_next::wire::Box::encode_absent(out);
244 }
245
246 Ok(())
247 }
248 }
249
250 impl<'de> ::fidl_next::FromWire<crate::wire::DataSinkWriteFirmwareRequest<'de>>
251 for DataSinkWriteFirmwareRequest
252 {
253 #[inline]
254 fn from_wire(wire: crate::wire::DataSinkWriteFirmwareRequest<'de>) -> Self {
255 Self {
256 configuration: ::fidl_next::FromWire::from_wire(wire.configuration),
257
258 type_: ::fidl_next::FromWire::from_wire(wire.type_),
259
260 payload: ::fidl_next::FromWire::from_wire(wire.payload),
261 }
262 }
263 }
264
265 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
266 pub struct DataSinkReadFirmwareRequest {
267 pub configuration: crate::natural::Configuration,
268
269 pub type_: ::std::string::String,
270 }
271
272 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataSinkReadFirmwareRequest<'static>, ___E>
273 for DataSinkReadFirmwareRequest
274 where
275 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
276 ___E: ::fidl_next::Encoder,
277 ___E: ::fidl_next::fuchsia::HandleEncoder,
278 {
279 #[inline]
280 fn encode(
281 self,
282 encoder_: &mut ___E,
283 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadFirmwareRequest<'static>>,
284 _: (),
285 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
286 ::fidl_next::munge! {
287 let crate::wire::DataSinkReadFirmwareRequest {
288 configuration,
289 type_,
290
291 } = out_;
292 }
293
294 ::fidl_next::Encode::encode(self.configuration, encoder_, configuration, ())?;
295
296 let mut _field =
297 unsafe { ::fidl_next::Slot::new_unchecked(configuration.as_mut_ptr()) };
298
299 ::fidl_next::Encode::encode(self.type_, encoder_, type_, 256)?;
300
301 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(type_.as_mut_ptr()) };
302 ::fidl_next::Constrained::validate(_field, 256)?;
303
304 Ok(())
305 }
306 }
307
308 unsafe impl<___E>
309 ::fidl_next::EncodeOption<
310 ::fidl_next::wire::Box<'static, crate::wire::DataSinkReadFirmwareRequest<'static>>,
311 ___E,
312 > for DataSinkReadFirmwareRequest
313 where
314 ___E: ::fidl_next::Encoder + ?Sized,
315 DataSinkReadFirmwareRequest:
316 ::fidl_next::Encode<crate::wire::DataSinkReadFirmwareRequest<'static>, ___E>,
317 {
318 #[inline]
319 fn encode_option(
320 this: ::core::option::Option<Self>,
321 encoder: &mut ___E,
322 out: &mut ::core::mem::MaybeUninit<
323 ::fidl_next::wire::Box<'static, crate::wire::DataSinkReadFirmwareRequest<'static>>,
324 >,
325 _: (),
326 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
327 if let Some(inner) = this {
328 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
329 ::fidl_next::wire::Box::encode_present(out);
330 } else {
331 ::fidl_next::wire::Box::encode_absent(out);
332 }
333
334 Ok(())
335 }
336 }
337
338 impl<'de> ::fidl_next::FromWire<crate::wire::DataSinkReadFirmwareRequest<'de>>
339 for DataSinkReadFirmwareRequest
340 {
341 #[inline]
342 fn from_wire(wire: crate::wire::DataSinkReadFirmwareRequest<'de>) -> Self {
343 Self {
344 configuration: ::fidl_next::FromWire::from_wire(wire.configuration),
345
346 type_: ::fidl_next::FromWire::from_wire(wire.type_),
347 }
348 }
349 }
350
351 #[derive(Debug, PartialEq)]
352 pub struct DataSinkReadFirmwareResponse {
353 pub firmware: ::fidl_next_fuchsia_mem::natural::Buffer,
354 }
355
356 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataSinkReadFirmwareResponse, ___E>
357 for DataSinkReadFirmwareResponse
358 where
359 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
360 ___E: ::fidl_next::fuchsia::HandleEncoder,
361 {
362 #[inline]
363 fn encode(
364 self,
365 encoder_: &mut ___E,
366 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadFirmwareResponse>,
367 _: (),
368 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
369 ::fidl_next::munge! {
370 let crate::wire::DataSinkReadFirmwareResponse {
371 firmware,
372
373 } = out_;
374 }
375
376 ::fidl_next::Encode::encode(self.firmware, encoder_, firmware, ())?;
377
378 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(firmware.as_mut_ptr()) };
379
380 Ok(())
381 }
382 }
383
384 unsafe impl<___E>
385 ::fidl_next::EncodeOption<
386 ::fidl_next::wire::Box<'static, crate::wire::DataSinkReadFirmwareResponse>,
387 ___E,
388 > for DataSinkReadFirmwareResponse
389 where
390 ___E: ::fidl_next::Encoder + ?Sized,
391 DataSinkReadFirmwareResponse:
392 ::fidl_next::Encode<crate::wire::DataSinkReadFirmwareResponse, ___E>,
393 {
394 #[inline]
395 fn encode_option(
396 this: ::core::option::Option<Self>,
397 encoder: &mut ___E,
398 out: &mut ::core::mem::MaybeUninit<
399 ::fidl_next::wire::Box<'static, crate::wire::DataSinkReadFirmwareResponse>,
400 >,
401 _: (),
402 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
403 if let Some(inner) = this {
404 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
405 ::fidl_next::wire::Box::encode_present(out);
406 } else {
407 ::fidl_next::wire::Box::encode_absent(out);
408 }
409
410 Ok(())
411 }
412 }
413
414 impl ::fidl_next::FromWire<crate::wire::DataSinkReadFirmwareResponse>
415 for DataSinkReadFirmwareResponse
416 {
417 #[inline]
418 fn from_wire(wire: crate::wire::DataSinkReadFirmwareResponse) -> Self {
419 Self { firmware: ::fidl_next::FromWire::from_wire(wire.firmware) }
420 }
421 }
422
423 #[derive(Debug, PartialEq)]
424 pub struct DataSinkWriteOpaqueVolumeRequest {
425 pub payload: ::fidl_next_fuchsia_mem::natural::Buffer,
426 }
427
428 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataSinkWriteOpaqueVolumeRequest, ___E>
429 for DataSinkWriteOpaqueVolumeRequest
430 where
431 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
432 ___E: ::fidl_next::fuchsia::HandleEncoder,
433 {
434 #[inline]
435 fn encode(
436 self,
437 encoder_: &mut ___E,
438 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteOpaqueVolumeRequest>,
439 _: (),
440 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
441 ::fidl_next::munge! {
442 let crate::wire::DataSinkWriteOpaqueVolumeRequest {
443 payload,
444
445 } = out_;
446 }
447
448 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
449
450 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
451
452 Ok(())
453 }
454 }
455
456 unsafe impl<___E>
457 ::fidl_next::EncodeOption<
458 ::fidl_next::wire::Box<'static, crate::wire::DataSinkWriteOpaqueVolumeRequest>,
459 ___E,
460 > for DataSinkWriteOpaqueVolumeRequest
461 where
462 ___E: ::fidl_next::Encoder + ?Sized,
463 DataSinkWriteOpaqueVolumeRequest:
464 ::fidl_next::Encode<crate::wire::DataSinkWriteOpaqueVolumeRequest, ___E>,
465 {
466 #[inline]
467 fn encode_option(
468 this: ::core::option::Option<Self>,
469 encoder: &mut ___E,
470 out: &mut ::core::mem::MaybeUninit<
471 ::fidl_next::wire::Box<'static, crate::wire::DataSinkWriteOpaqueVolumeRequest>,
472 >,
473 _: (),
474 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
475 if let Some(inner) = this {
476 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
477 ::fidl_next::wire::Box::encode_present(out);
478 } else {
479 ::fidl_next::wire::Box::encode_absent(out);
480 }
481
482 Ok(())
483 }
484 }
485
486 impl ::fidl_next::FromWire<crate::wire::DataSinkWriteOpaqueVolumeRequest>
487 for DataSinkWriteOpaqueVolumeRequest
488 {
489 #[inline]
490 fn from_wire(wire: crate::wire::DataSinkWriteOpaqueVolumeRequest) -> Self {
491 Self { payload: ::fidl_next::FromWire::from_wire(wire.payload) }
492 }
493 }
494
495 #[derive(Debug, PartialEq)]
496 pub struct DataSinkWriteSparseVolumeRequest {
497 pub payload: ::fidl_next_fuchsia_mem::natural::Buffer,
498 }
499
500 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataSinkWriteSparseVolumeRequest, ___E>
501 for DataSinkWriteSparseVolumeRequest
502 where
503 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
504 ___E: ::fidl_next::fuchsia::HandleEncoder,
505 {
506 #[inline]
507 fn encode(
508 self,
509 encoder_: &mut ___E,
510 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteSparseVolumeRequest>,
511 _: (),
512 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
513 ::fidl_next::munge! {
514 let crate::wire::DataSinkWriteSparseVolumeRequest {
515 payload,
516
517 } = out_;
518 }
519
520 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
521
522 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
523
524 Ok(())
525 }
526 }
527
528 unsafe impl<___E>
529 ::fidl_next::EncodeOption<
530 ::fidl_next::wire::Box<'static, crate::wire::DataSinkWriteSparseVolumeRequest>,
531 ___E,
532 > for DataSinkWriteSparseVolumeRequest
533 where
534 ___E: ::fidl_next::Encoder + ?Sized,
535 DataSinkWriteSparseVolumeRequest:
536 ::fidl_next::Encode<crate::wire::DataSinkWriteSparseVolumeRequest, ___E>,
537 {
538 #[inline]
539 fn encode_option(
540 this: ::core::option::Option<Self>,
541 encoder: &mut ___E,
542 out: &mut ::core::mem::MaybeUninit<
543 ::fidl_next::wire::Box<'static, crate::wire::DataSinkWriteSparseVolumeRequest>,
544 >,
545 _: (),
546 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
547 if let Some(inner) = this {
548 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
549 ::fidl_next::wire::Box::encode_present(out);
550 } else {
551 ::fidl_next::wire::Box::encode_absent(out);
552 }
553
554 Ok(())
555 }
556 }
557
558 impl ::fidl_next::FromWire<crate::wire::DataSinkWriteSparseVolumeRequest>
559 for DataSinkWriteSparseVolumeRequest
560 {
561 #[inline]
562 fn from_wire(wire: crate::wire::DataSinkWriteSparseVolumeRequest) -> Self {
563 Self { payload: ::fidl_next::FromWire::from_wire(wire.payload) }
564 }
565 }
566
567 #[derive(Debug, PartialEq)]
568 #[repr(C)]
569 pub struct PartitionIoReadPartitionResponse {
570 pub payload: ::fidl_next::fuchsia::zx::Vmo,
571 }
572
573 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PartitionIoReadPartitionResponse, ___E>
574 for PartitionIoReadPartitionResponse
575 where
576 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
577 ___E: ::fidl_next::fuchsia::HandleEncoder,
578 {
579 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
580 Self,
581 crate::wire::PartitionIoReadPartitionResponse,
582 > = unsafe {
583 ::fidl_next::CopyOptimization::enable_if(
584 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<
585 ::fidl_next::wire::fuchsia::Vmo,
586 ___E,
587 >>::COPY_OPTIMIZATION
588 .is_enabled(),
589 )
590 };
591
592 #[inline]
593 fn encode(
594 self,
595 encoder_: &mut ___E,
596 out_: &mut ::core::mem::MaybeUninit<crate::wire::PartitionIoReadPartitionResponse>,
597 _: (),
598 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
599 ::fidl_next::munge! {
600 let crate::wire::PartitionIoReadPartitionResponse {
601 payload,
602
603 } = out_;
604 }
605
606 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
607
608 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
609
610 Ok(())
611 }
612 }
613
614 unsafe impl<___E>
615 ::fidl_next::EncodeOption<
616 ::fidl_next::wire::Box<'static, crate::wire::PartitionIoReadPartitionResponse>,
617 ___E,
618 > for PartitionIoReadPartitionResponse
619 where
620 ___E: ::fidl_next::Encoder + ?Sized,
621 PartitionIoReadPartitionResponse:
622 ::fidl_next::Encode<crate::wire::PartitionIoReadPartitionResponse, ___E>,
623 {
624 #[inline]
625 fn encode_option(
626 this: ::core::option::Option<Self>,
627 encoder: &mut ___E,
628 out: &mut ::core::mem::MaybeUninit<
629 ::fidl_next::wire::Box<'static, crate::wire::PartitionIoReadPartitionResponse>,
630 >,
631 _: (),
632 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
633 if let Some(inner) = this {
634 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
635 ::fidl_next::wire::Box::encode_present(out);
636 } else {
637 ::fidl_next::wire::Box::encode_absent(out);
638 }
639
640 Ok(())
641 }
642 }
643
644 impl ::fidl_next::FromWire<crate::wire::PartitionIoReadPartitionResponse>
645 for PartitionIoReadPartitionResponse
646 {
647 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
648 crate::wire::PartitionIoReadPartitionResponse,
649 Self,
650 > = unsafe {
651 ::fidl_next::CopyOptimization::enable_if(
652 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
653 ::fidl_next::wire::fuchsia::Vmo,
654 >>::COPY_OPTIMIZATION
655 .is_enabled(),
656 )
657 };
658
659 #[inline]
660 fn from_wire(wire: crate::wire::PartitionIoReadPartitionResponse) -> Self {
661 Self { payload: ::fidl_next::FromWire::from_wire(wire.payload) }
662 }
663 }
664
665 #[derive(Debug, PartialEq)]
666 pub struct PartitionIoWritePartitionRequest {
667 pub partition: ::std::string::String,
668
669 pub offset: u64,
670
671 pub payload: ::fidl_next::fuchsia::zx::Vmo,
672
673 pub trailing: crate::natural::TrailingBehavior,
674 }
675
676 unsafe impl<___E>
677 ::fidl_next::Encode<crate::wire::PartitionIoWritePartitionRequest<'static>, ___E>
678 for PartitionIoWritePartitionRequest
679 where
680 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
681 ___E: ::fidl_next::Encoder,
682 ___E: ::fidl_next::fuchsia::HandleEncoder,
683 {
684 #[inline]
685 fn encode(
686 self,
687 encoder_: &mut ___E,
688 out_: &mut ::core::mem::MaybeUninit<
689 crate::wire::PartitionIoWritePartitionRequest<'static>,
690 >,
691 _: (),
692 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
693 ::fidl_next::munge! {
694 let crate::wire::PartitionIoWritePartitionRequest {
695 partition,
696 offset,
697 payload,
698 trailing,
699
700 } = out_;
701 }
702
703 ::fidl_next::Encode::encode(self.partition, encoder_, partition, 128)?;
704
705 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(partition.as_mut_ptr()) };
706 ::fidl_next::Constrained::validate(_field, 128)?;
707
708 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
709
710 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
711
712 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
713
714 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
715
716 ::fidl_next::Encode::encode(self.trailing, encoder_, trailing, ())?;
717
718 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(trailing.as_mut_ptr()) };
719
720 Ok(())
721 }
722 }
723
724 unsafe impl<___E>
725 ::fidl_next::EncodeOption<
726 ::fidl_next::wire::Box<'static, crate::wire::PartitionIoWritePartitionRequest<'static>>,
727 ___E,
728 > for PartitionIoWritePartitionRequest
729 where
730 ___E: ::fidl_next::Encoder + ?Sized,
731 PartitionIoWritePartitionRequest:
732 ::fidl_next::Encode<crate::wire::PartitionIoWritePartitionRequest<'static>, ___E>,
733 {
734 #[inline]
735 fn encode_option(
736 this: ::core::option::Option<Self>,
737 encoder: &mut ___E,
738 out: &mut ::core::mem::MaybeUninit<
739 ::fidl_next::wire::Box<
740 'static,
741 crate::wire::PartitionIoWritePartitionRequest<'static>,
742 >,
743 >,
744 _: (),
745 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
746 if let Some(inner) = this {
747 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
748 ::fidl_next::wire::Box::encode_present(out);
749 } else {
750 ::fidl_next::wire::Box::encode_absent(out);
751 }
752
753 Ok(())
754 }
755 }
756
757 impl<'de> ::fidl_next::FromWire<crate::wire::PartitionIoWritePartitionRequest<'de>>
758 for PartitionIoWritePartitionRequest
759 {
760 #[inline]
761 fn from_wire(wire: crate::wire::PartitionIoWritePartitionRequest<'de>) -> Self {
762 Self {
763 partition: ::fidl_next::FromWire::from_wire(wire.partition),
764
765 offset: ::fidl_next::FromWire::from_wire(wire.offset),
766
767 payload: ::fidl_next::FromWire::from_wire(wire.payload),
768
769 trailing: ::fidl_next::FromWire::from_wire(wire.trailing),
770 }
771 }
772 }
773
774 #[derive(Debug, PartialEq)]
775 #[repr(C)]
776 pub struct PaverFindDataSinkRequest {
777 pub data_sink: ::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::fuchsia::zx::Channel>,
778 }
779
780 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PaverFindDataSinkRequest, ___E>
781 for PaverFindDataSinkRequest
782 where
783 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
784 ___E: ::fidl_next::fuchsia::HandleEncoder,
785 {
786 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
787 Self,
788 crate::wire::PaverFindDataSinkRequest,
789 > = unsafe {
790 ::fidl_next::CopyOptimization::enable_if(
791 true
792
793 && <
794 ::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::wire::fuchsia::Channel>, ___E>
795 >::COPY_OPTIMIZATION.is_enabled()
796
797 )
798 };
799
800 #[inline]
801 fn encode(
802 self,
803 encoder_: &mut ___E,
804 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindDataSinkRequest>,
805 _: (),
806 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
807 ::fidl_next::munge! {
808 let crate::wire::PaverFindDataSinkRequest {
809 data_sink,
810
811 } = out_;
812 }
813
814 ::fidl_next::Encode::encode(self.data_sink, encoder_, data_sink, ())?;
815
816 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data_sink.as_mut_ptr()) };
817
818 Ok(())
819 }
820 }
821
822 unsafe impl<___E>
823 ::fidl_next::EncodeOption<
824 ::fidl_next::wire::Box<'static, crate::wire::PaverFindDataSinkRequest>,
825 ___E,
826 > for PaverFindDataSinkRequest
827 where
828 ___E: ::fidl_next::Encoder + ?Sized,
829 PaverFindDataSinkRequest: ::fidl_next::Encode<crate::wire::PaverFindDataSinkRequest, ___E>,
830 {
831 #[inline]
832 fn encode_option(
833 this: ::core::option::Option<Self>,
834 encoder: &mut ___E,
835 out: &mut ::core::mem::MaybeUninit<
836 ::fidl_next::wire::Box<'static, crate::wire::PaverFindDataSinkRequest>,
837 >,
838 _: (),
839 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
840 if let Some(inner) = this {
841 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
842 ::fidl_next::wire::Box::encode_present(out);
843 } else {
844 ::fidl_next::wire::Box::encode_absent(out);
845 }
846
847 Ok(())
848 }
849 }
850
851 impl ::fidl_next::FromWire<crate::wire::PaverFindDataSinkRequest> for PaverFindDataSinkRequest {
852 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
853 crate::wire::PaverFindDataSinkRequest,
854 Self,
855 > = unsafe {
856 ::fidl_next::CopyOptimization::enable_if(
857 true
858
859 && <
860 ::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::wire::fuchsia::Channel>>
861 >::COPY_OPTIMIZATION.is_enabled()
862
863 )
864 };
865
866 #[inline]
867 fn from_wire(wire: crate::wire::PaverFindDataSinkRequest) -> Self {
868 Self { data_sink: ::fidl_next::FromWire::from_wire(wire.data_sink) }
869 }
870 }
871
872 #[derive(Debug, PartialEq)]
873 #[repr(C)]
874 pub struct PaverFindPartitionTableManagerRequest {
875 pub data_sink:
876 ::fidl_next::ServerEnd<crate::DynamicDataSink, ::fidl_next::fuchsia::zx::Channel>,
877 }
878
879 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PaverFindPartitionTableManagerRequest, ___E>
880 for PaverFindPartitionTableManagerRequest
881 where
882 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
883 ___E: ::fidl_next::fuchsia::HandleEncoder,
884 {
885 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
886 Self,
887 crate::wire::PaverFindPartitionTableManagerRequest,
888 > = unsafe {
889 ::fidl_next::CopyOptimization::enable_if(
890 true && <::fidl_next::ServerEnd<
891 crate::DynamicDataSink,
892 ::fidl_next::fuchsia::zx::Channel,
893 > as ::fidl_next::Encode<
894 ::fidl_next::ServerEnd<
895 crate::DynamicDataSink,
896 ::fidl_next::wire::fuchsia::Channel,
897 >,
898 ___E,
899 >>::COPY_OPTIMIZATION
900 .is_enabled(),
901 )
902 };
903
904 #[inline]
905 fn encode(
906 self,
907 encoder_: &mut ___E,
908 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindPartitionTableManagerRequest>,
909 _: (),
910 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
911 ::fidl_next::munge! {
912 let crate::wire::PaverFindPartitionTableManagerRequest {
913 data_sink,
914
915 } = out_;
916 }
917
918 ::fidl_next::Encode::encode(self.data_sink, encoder_, data_sink, ())?;
919
920 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data_sink.as_mut_ptr()) };
921
922 Ok(())
923 }
924 }
925
926 unsafe impl<___E>
927 ::fidl_next::EncodeOption<
928 ::fidl_next::wire::Box<'static, crate::wire::PaverFindPartitionTableManagerRequest>,
929 ___E,
930 > for PaverFindPartitionTableManagerRequest
931 where
932 ___E: ::fidl_next::Encoder + ?Sized,
933 PaverFindPartitionTableManagerRequest:
934 ::fidl_next::Encode<crate::wire::PaverFindPartitionTableManagerRequest, ___E>,
935 {
936 #[inline]
937 fn encode_option(
938 this: ::core::option::Option<Self>,
939 encoder: &mut ___E,
940 out: &mut ::core::mem::MaybeUninit<
941 ::fidl_next::wire::Box<'static, crate::wire::PaverFindPartitionTableManagerRequest>,
942 >,
943 _: (),
944 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
945 if let Some(inner) = this {
946 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
947 ::fidl_next::wire::Box::encode_present(out);
948 } else {
949 ::fidl_next::wire::Box::encode_absent(out);
950 }
951
952 Ok(())
953 }
954 }
955
956 impl ::fidl_next::FromWire<crate::wire::PaverFindPartitionTableManagerRequest>
957 for PaverFindPartitionTableManagerRequest
958 {
959 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
960 crate::wire::PaverFindPartitionTableManagerRequest,
961 Self,
962 > = unsafe {
963 ::fidl_next::CopyOptimization::enable_if(
964 true && <::fidl_next::ServerEnd<
965 crate::DynamicDataSink,
966 ::fidl_next::fuchsia::zx::Channel,
967 > as ::fidl_next::FromWire<
968 ::fidl_next::ServerEnd<
969 crate::DynamicDataSink,
970 ::fidl_next::wire::fuchsia::Channel,
971 >,
972 >>::COPY_OPTIMIZATION
973 .is_enabled(),
974 )
975 };
976
977 #[inline]
978 fn from_wire(wire: crate::wire::PaverFindPartitionTableManagerRequest) -> Self {
979 Self { data_sink: ::fidl_next::FromWire::from_wire(wire.data_sink) }
980 }
981 }
982
983 #[derive(Debug, PartialEq)]
984 #[repr(C)]
985 pub struct PaverFindBootManagerRequest {
986 pub boot_manager:
987 ::fidl_next::ServerEnd<crate::BootManager, ::fidl_next::fuchsia::zx::Channel>,
988 }
989
990 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PaverFindBootManagerRequest, ___E>
991 for PaverFindBootManagerRequest
992 where
993 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
994 ___E: ::fidl_next::fuchsia::HandleEncoder,
995 {
996 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
997 Self,
998 crate::wire::PaverFindBootManagerRequest,
999 > = unsafe {
1000 ::fidl_next::CopyOptimization::enable_if(
1001 true && <::fidl_next::ServerEnd<
1002 crate::BootManager,
1003 ::fidl_next::fuchsia::zx::Channel,
1004 > as ::fidl_next::Encode<
1005 ::fidl_next::ServerEnd<crate::BootManager, ::fidl_next::wire::fuchsia::Channel>,
1006 ___E,
1007 >>::COPY_OPTIMIZATION
1008 .is_enabled(),
1009 )
1010 };
1011
1012 #[inline]
1013 fn encode(
1014 self,
1015 encoder_: &mut ___E,
1016 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindBootManagerRequest>,
1017 _: (),
1018 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1019 ::fidl_next::munge! {
1020 let crate::wire::PaverFindBootManagerRequest {
1021 boot_manager,
1022
1023 } = out_;
1024 }
1025
1026 ::fidl_next::Encode::encode(self.boot_manager, encoder_, boot_manager, ())?;
1027
1028 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(boot_manager.as_mut_ptr()) };
1029
1030 Ok(())
1031 }
1032 }
1033
1034 unsafe impl<___E>
1035 ::fidl_next::EncodeOption<
1036 ::fidl_next::wire::Box<'static, crate::wire::PaverFindBootManagerRequest>,
1037 ___E,
1038 > for PaverFindBootManagerRequest
1039 where
1040 ___E: ::fidl_next::Encoder + ?Sized,
1041 PaverFindBootManagerRequest:
1042 ::fidl_next::Encode<crate::wire::PaverFindBootManagerRequest, ___E>,
1043 {
1044 #[inline]
1045 fn encode_option(
1046 this: ::core::option::Option<Self>,
1047 encoder: &mut ___E,
1048 out: &mut ::core::mem::MaybeUninit<
1049 ::fidl_next::wire::Box<'static, crate::wire::PaverFindBootManagerRequest>,
1050 >,
1051 _: (),
1052 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1053 if let Some(inner) = this {
1054 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1055 ::fidl_next::wire::Box::encode_present(out);
1056 } else {
1057 ::fidl_next::wire::Box::encode_absent(out);
1058 }
1059
1060 Ok(())
1061 }
1062 }
1063
1064 impl ::fidl_next::FromWire<crate::wire::PaverFindBootManagerRequest>
1065 for PaverFindBootManagerRequest
1066 {
1067 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1068 crate::wire::PaverFindBootManagerRequest,
1069 Self,
1070 > = unsafe {
1071 ::fidl_next::CopyOptimization::enable_if(
1072 true && <::fidl_next::ServerEnd<
1073 crate::BootManager,
1074 ::fidl_next::fuchsia::zx::Channel,
1075 > as ::fidl_next::FromWire<
1076 ::fidl_next::ServerEnd<crate::BootManager, ::fidl_next::wire::fuchsia::Channel>,
1077 >>::COPY_OPTIMIZATION
1078 .is_enabled(),
1079 )
1080 };
1081
1082 #[inline]
1083 fn from_wire(wire: crate::wire::PaverFindBootManagerRequest) -> Self {
1084 Self { boot_manager: ::fidl_next::FromWire::from_wire(wire.boot_manager) }
1085 }
1086 }
1087
1088 #[derive(Debug, PartialEq)]
1089 #[repr(C)]
1090 pub struct PaverFindSysconfigRequest {
1091 pub sysconfig: ::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::fuchsia::zx::Channel>,
1092 }
1093
1094 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PaverFindSysconfigRequest, ___E>
1095 for PaverFindSysconfigRequest
1096 where
1097 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1098 ___E: ::fidl_next::fuchsia::HandleEncoder,
1099 {
1100 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1101 Self,
1102 crate::wire::PaverFindSysconfigRequest,
1103 > = unsafe {
1104 ::fidl_next::CopyOptimization::enable_if(
1105 true
1106
1107 && <
1108 ::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::wire::fuchsia::Channel>, ___E>
1109 >::COPY_OPTIMIZATION.is_enabled()
1110
1111 )
1112 };
1113
1114 #[inline]
1115 fn encode(
1116 self,
1117 encoder_: &mut ___E,
1118 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindSysconfigRequest>,
1119 _: (),
1120 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1121 ::fidl_next::munge! {
1122 let crate::wire::PaverFindSysconfigRequest {
1123 sysconfig,
1124
1125 } = out_;
1126 }
1127
1128 ::fidl_next::Encode::encode(self.sysconfig, encoder_, sysconfig, ())?;
1129
1130 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(sysconfig.as_mut_ptr()) };
1131
1132 Ok(())
1133 }
1134 }
1135
1136 unsafe impl<___E>
1137 ::fidl_next::EncodeOption<
1138 ::fidl_next::wire::Box<'static, crate::wire::PaverFindSysconfigRequest>,
1139 ___E,
1140 > for PaverFindSysconfigRequest
1141 where
1142 ___E: ::fidl_next::Encoder + ?Sized,
1143 PaverFindSysconfigRequest:
1144 ::fidl_next::Encode<crate::wire::PaverFindSysconfigRequest, ___E>,
1145 {
1146 #[inline]
1147 fn encode_option(
1148 this: ::core::option::Option<Self>,
1149 encoder: &mut ___E,
1150 out: &mut ::core::mem::MaybeUninit<
1151 ::fidl_next::wire::Box<'static, crate::wire::PaverFindSysconfigRequest>,
1152 >,
1153 _: (),
1154 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1155 if let Some(inner) = this {
1156 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1157 ::fidl_next::wire::Box::encode_present(out);
1158 } else {
1159 ::fidl_next::wire::Box::encode_absent(out);
1160 }
1161
1162 Ok(())
1163 }
1164 }
1165
1166 impl ::fidl_next::FromWire<crate::wire::PaverFindSysconfigRequest> for PaverFindSysconfigRequest {
1167 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1168 crate::wire::PaverFindSysconfigRequest,
1169 Self,
1170 > = unsafe {
1171 ::fidl_next::CopyOptimization::enable_if(
1172 true
1173
1174 && <
1175 ::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::wire::fuchsia::Channel>>
1176 >::COPY_OPTIMIZATION.is_enabled()
1177
1178 )
1179 };
1180
1181 #[inline]
1182 fn from_wire(wire: crate::wire::PaverFindSysconfigRequest) -> Self {
1183 Self { sysconfig: ::fidl_next::FromWire::from_wire(wire.sysconfig) }
1184 }
1185 }
1186
1187 #[derive(Debug, PartialEq)]
1188 #[repr(C)]
1189 pub struct PaverOpenPartitionIoRequest {
1190 pub block_dir: ::fidl_next::ClientEnd<
1191 ::fidl_next_fuchsia_io::Directory,
1192 ::fidl_next::fuchsia::zx::Channel,
1193 >,
1194
1195 pub partition_io:
1196 ::fidl_next::ServerEnd<crate::PartitionIo, ::fidl_next::fuchsia::zx::Channel>,
1197 }
1198
1199 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PaverOpenPartitionIoRequest, ___E>
1200 for PaverOpenPartitionIoRequest
1201 where
1202 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1203 ___E: ::fidl_next::fuchsia::HandleEncoder,
1204 {
1205 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1206 Self,
1207 crate::wire::PaverOpenPartitionIoRequest,
1208 > = unsafe {
1209 ::fidl_next::CopyOptimization::enable_if(
1210 true && <::fidl_next::ClientEnd<
1211 ::fidl_next_fuchsia_io::Directory,
1212 ::fidl_next::fuchsia::zx::Channel,
1213 > as ::fidl_next::Encode<
1214 ::fidl_next::ClientEnd<
1215 ::fidl_next_fuchsia_io::Directory,
1216 ::fidl_next::wire::fuchsia::Channel,
1217 >,
1218 ___E,
1219 >>::COPY_OPTIMIZATION
1220 .is_enabled()
1221 && <::fidl_next::ServerEnd<
1222 crate::PartitionIo,
1223 ::fidl_next::fuchsia::zx::Channel,
1224 > as ::fidl_next::Encode<
1225 ::fidl_next::ServerEnd<
1226 crate::PartitionIo,
1227 ::fidl_next::wire::fuchsia::Channel,
1228 >,
1229 ___E,
1230 >>::COPY_OPTIMIZATION
1231 .is_enabled(),
1232 )
1233 };
1234
1235 #[inline]
1236 fn encode(
1237 self,
1238 encoder_: &mut ___E,
1239 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverOpenPartitionIoRequest>,
1240 _: (),
1241 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1242 ::fidl_next::munge! {
1243 let crate::wire::PaverOpenPartitionIoRequest {
1244 block_dir,
1245 partition_io,
1246
1247 } = out_;
1248 }
1249
1250 ::fidl_next::Encode::encode(self.block_dir, encoder_, block_dir, ())?;
1251
1252 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_dir.as_mut_ptr()) };
1253
1254 ::fidl_next::Encode::encode(self.partition_io, encoder_, partition_io, ())?;
1255
1256 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(partition_io.as_mut_ptr()) };
1257
1258 Ok(())
1259 }
1260 }
1261
1262 unsafe impl<___E>
1263 ::fidl_next::EncodeOption<
1264 ::fidl_next::wire::Box<'static, crate::wire::PaverOpenPartitionIoRequest>,
1265 ___E,
1266 > for PaverOpenPartitionIoRequest
1267 where
1268 ___E: ::fidl_next::Encoder + ?Sized,
1269 PaverOpenPartitionIoRequest:
1270 ::fidl_next::Encode<crate::wire::PaverOpenPartitionIoRequest, ___E>,
1271 {
1272 #[inline]
1273 fn encode_option(
1274 this: ::core::option::Option<Self>,
1275 encoder: &mut ___E,
1276 out: &mut ::core::mem::MaybeUninit<
1277 ::fidl_next::wire::Box<'static, crate::wire::PaverOpenPartitionIoRequest>,
1278 >,
1279 _: (),
1280 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1281 if let Some(inner) = this {
1282 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1283 ::fidl_next::wire::Box::encode_present(out);
1284 } else {
1285 ::fidl_next::wire::Box::encode_absent(out);
1286 }
1287
1288 Ok(())
1289 }
1290 }
1291
1292 impl ::fidl_next::FromWire<crate::wire::PaverOpenPartitionIoRequest>
1293 for PaverOpenPartitionIoRequest
1294 {
1295 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1296 crate::wire::PaverOpenPartitionIoRequest,
1297 Self,
1298 > = unsafe {
1299 ::fidl_next::CopyOptimization::enable_if(
1300 true && <::fidl_next::ClientEnd<
1301 ::fidl_next_fuchsia_io::Directory,
1302 ::fidl_next::fuchsia::zx::Channel,
1303 > as ::fidl_next::FromWire<
1304 ::fidl_next::ClientEnd<
1305 ::fidl_next_fuchsia_io::Directory,
1306 ::fidl_next::wire::fuchsia::Channel,
1307 >,
1308 >>::COPY_OPTIMIZATION
1309 .is_enabled()
1310 && <::fidl_next::ServerEnd<
1311 crate::PartitionIo,
1312 ::fidl_next::fuchsia::zx::Channel,
1313 > as ::fidl_next::FromWire<
1314 ::fidl_next::ServerEnd<
1315 crate::PartitionIo,
1316 ::fidl_next::wire::fuchsia::Channel,
1317 >,
1318 >>::COPY_OPTIMIZATION
1319 .is_enabled(),
1320 )
1321 };
1322
1323 #[inline]
1324 fn from_wire(wire: crate::wire::PaverOpenPartitionIoRequest) -> Self {
1325 Self {
1326 block_dir: ::fidl_next::FromWire::from_wire(wire.block_dir),
1327
1328 partition_io: ::fidl_next::FromWire::from_wire(wire.partition_io),
1329 }
1330 }
1331 }
1332
1333 #[derive(Debug, PartialEq)]
1334 pub struct SysconfigReadResponse {
1335 pub data: ::fidl_next_fuchsia_mem::natural::Buffer,
1336 }
1337
1338 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SysconfigReadResponse, ___E>
1339 for SysconfigReadResponse
1340 where
1341 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1342 ___E: ::fidl_next::fuchsia::HandleEncoder,
1343 {
1344 #[inline]
1345 fn encode(
1346 self,
1347 encoder_: &mut ___E,
1348 out_: &mut ::core::mem::MaybeUninit<crate::wire::SysconfigReadResponse>,
1349 _: (),
1350 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1351 ::fidl_next::munge! {
1352 let crate::wire::SysconfigReadResponse {
1353 data,
1354
1355 } = out_;
1356 }
1357
1358 ::fidl_next::Encode::encode(self.data, encoder_, data, ())?;
1359
1360 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
1361
1362 Ok(())
1363 }
1364 }
1365
1366 unsafe impl<___E>
1367 ::fidl_next::EncodeOption<
1368 ::fidl_next::wire::Box<'static, crate::wire::SysconfigReadResponse>,
1369 ___E,
1370 > for SysconfigReadResponse
1371 where
1372 ___E: ::fidl_next::Encoder + ?Sized,
1373 SysconfigReadResponse: ::fidl_next::Encode<crate::wire::SysconfigReadResponse, ___E>,
1374 {
1375 #[inline]
1376 fn encode_option(
1377 this: ::core::option::Option<Self>,
1378 encoder: &mut ___E,
1379 out: &mut ::core::mem::MaybeUninit<
1380 ::fidl_next::wire::Box<'static, crate::wire::SysconfigReadResponse>,
1381 >,
1382 _: (),
1383 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1384 if let Some(inner) = this {
1385 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1386 ::fidl_next::wire::Box::encode_present(out);
1387 } else {
1388 ::fidl_next::wire::Box::encode_absent(out);
1389 }
1390
1391 Ok(())
1392 }
1393 }
1394
1395 impl ::fidl_next::FromWire<crate::wire::SysconfigReadResponse> for SysconfigReadResponse {
1396 #[inline]
1397 fn from_wire(wire: crate::wire::SysconfigReadResponse) -> Self {
1398 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
1399 }
1400 }
1401
1402 #[derive(Debug, PartialEq)]
1403 pub struct SysconfigWriteRequest {
1404 pub payload: ::fidl_next_fuchsia_mem::natural::Buffer,
1405 }
1406
1407 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SysconfigWriteRequest, ___E>
1408 for SysconfigWriteRequest
1409 where
1410 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1411 ___E: ::fidl_next::fuchsia::HandleEncoder,
1412 {
1413 #[inline]
1414 fn encode(
1415 self,
1416 encoder_: &mut ___E,
1417 out_: &mut ::core::mem::MaybeUninit<crate::wire::SysconfigWriteRequest>,
1418 _: (),
1419 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1420 ::fidl_next::munge! {
1421 let crate::wire::SysconfigWriteRequest {
1422 payload,
1423
1424 } = out_;
1425 }
1426
1427 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
1428
1429 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(payload.as_mut_ptr()) };
1430
1431 Ok(())
1432 }
1433 }
1434
1435 unsafe impl<___E>
1436 ::fidl_next::EncodeOption<
1437 ::fidl_next::wire::Box<'static, crate::wire::SysconfigWriteRequest>,
1438 ___E,
1439 > for SysconfigWriteRequest
1440 where
1441 ___E: ::fidl_next::Encoder + ?Sized,
1442 SysconfigWriteRequest: ::fidl_next::Encode<crate::wire::SysconfigWriteRequest, ___E>,
1443 {
1444 #[inline]
1445 fn encode_option(
1446 this: ::core::option::Option<Self>,
1447 encoder: &mut ___E,
1448 out: &mut ::core::mem::MaybeUninit<
1449 ::fidl_next::wire::Box<'static, crate::wire::SysconfigWriteRequest>,
1450 >,
1451 _: (),
1452 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1453 if let Some(inner) = this {
1454 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1455 ::fidl_next::wire::Box::encode_present(out);
1456 } else {
1457 ::fidl_next::wire::Box::encode_absent(out);
1458 }
1459
1460 Ok(())
1461 }
1462 }
1463
1464 impl ::fidl_next::FromWire<crate::wire::SysconfigWriteRequest> for SysconfigWriteRequest {
1465 #[inline]
1466 fn from_wire(wire: crate::wire::SysconfigWriteRequest) -> Self {
1467 Self { payload: ::fidl_next::FromWire::from_wire(wire.payload) }
1468 }
1469 }
1470}
1471
1472pub mod wire {
1473
1474 pub use fidl_next_common_fuchsia_paver::wire::*;
1475
1476 #[derive(Debug)]
1478 #[repr(C)]
1479 pub struct DataSinkReadAssetResponse {
1480 pub asset: ::fidl_next_fuchsia_mem::wire::Buffer,
1481 }
1482
1483 static_assertions::const_assert_eq!(std::mem::size_of::<DataSinkReadAssetResponse>(), 16);
1484 static_assertions::const_assert_eq!(std::mem::align_of::<DataSinkReadAssetResponse>(), 8);
1485
1486 static_assertions::const_assert_eq!(std::mem::offset_of!(DataSinkReadAssetResponse, asset), 0);
1487
1488 impl ::fidl_next::Constrained for DataSinkReadAssetResponse {
1489 type Constraint = ();
1490
1491 fn validate(
1492 _: ::fidl_next::Slot<'_, Self>,
1493 _: Self::Constraint,
1494 ) -> Result<(), ::fidl_next::ValidationError> {
1495 Ok(())
1496 }
1497 }
1498
1499 unsafe impl ::fidl_next::Wire for DataSinkReadAssetResponse {
1500 type Narrowed<'de> = DataSinkReadAssetResponse;
1501
1502 #[inline]
1503 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1504 ::fidl_next::munge! {
1505 let Self {
1506 asset,
1507
1508 } = &mut *out_;
1509 }
1510
1511 ::fidl_next::Wire::zero_padding(asset);
1512 }
1513 }
1514
1515 unsafe impl<___D> ::fidl_next::Decode<___D> for DataSinkReadAssetResponse
1516 where
1517 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1518 ___D: ::fidl_next::fuchsia::HandleDecoder,
1519 {
1520 fn decode(
1521 slot_: ::fidl_next::Slot<'_, Self>,
1522 decoder_: &mut ___D,
1523 _: (),
1524 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1525 ::fidl_next::munge! {
1526 let Self {
1527 mut asset,
1528
1529 } = slot_;
1530 }
1531
1532 let _field = asset.as_mut();
1533
1534 ::fidl_next::Decode::decode(asset.as_mut(), decoder_, ())?;
1535
1536 Ok(())
1537 }
1538 }
1539
1540 impl ::fidl_next::IntoNatural for DataSinkReadAssetResponse {
1541 type Natural = crate::natural::DataSinkReadAssetResponse;
1542 }
1543
1544 #[derive(Debug)]
1546 #[repr(C)]
1547 pub struct DataSinkWriteAssetRequest {
1548 pub configuration: crate::wire::Configuration,
1549
1550 pub asset: crate::wire::Asset,
1551
1552 pub payload: ::fidl_next_fuchsia_mem::wire::Buffer,
1553 }
1554
1555 static_assertions::const_assert_eq!(std::mem::size_of::<DataSinkWriteAssetRequest>(), 24);
1556 static_assertions::const_assert_eq!(std::mem::align_of::<DataSinkWriteAssetRequest>(), 8);
1557
1558 static_assertions::const_assert_eq!(
1559 std::mem::offset_of!(DataSinkWriteAssetRequest, configuration),
1560 0
1561 );
1562
1563 static_assertions::const_assert_eq!(std::mem::offset_of!(DataSinkWriteAssetRequest, asset), 4);
1564
1565 static_assertions::const_assert_eq!(
1566 std::mem::offset_of!(DataSinkWriteAssetRequest, payload),
1567 8
1568 );
1569
1570 impl ::fidl_next::Constrained for DataSinkWriteAssetRequest {
1571 type Constraint = ();
1572
1573 fn validate(
1574 _: ::fidl_next::Slot<'_, Self>,
1575 _: Self::Constraint,
1576 ) -> Result<(), ::fidl_next::ValidationError> {
1577 Ok(())
1578 }
1579 }
1580
1581 unsafe impl ::fidl_next::Wire for DataSinkWriteAssetRequest {
1582 type Narrowed<'de> = DataSinkWriteAssetRequest;
1583
1584 #[inline]
1585 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1586 ::fidl_next::munge! {
1587 let Self {
1588 configuration,
1589 asset,
1590 payload,
1591
1592 } = &mut *out_;
1593 }
1594
1595 ::fidl_next::Wire::zero_padding(configuration);
1596
1597 ::fidl_next::Wire::zero_padding(asset);
1598
1599 ::fidl_next::Wire::zero_padding(payload);
1600 }
1601 }
1602
1603 unsafe impl<___D> ::fidl_next::Decode<___D> for DataSinkWriteAssetRequest
1604 where
1605 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1606 ___D: ::fidl_next::fuchsia::HandleDecoder,
1607 {
1608 fn decode(
1609 slot_: ::fidl_next::Slot<'_, Self>,
1610 decoder_: &mut ___D,
1611 _: (),
1612 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1613 ::fidl_next::munge! {
1614 let Self {
1615 mut configuration,
1616 mut asset,
1617 mut payload,
1618
1619 } = slot_;
1620 }
1621
1622 let _field = configuration.as_mut();
1623
1624 ::fidl_next::Decode::decode(configuration.as_mut(), decoder_, ())?;
1625
1626 let _field = asset.as_mut();
1627
1628 ::fidl_next::Decode::decode(asset.as_mut(), decoder_, ())?;
1629
1630 let _field = payload.as_mut();
1631
1632 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
1633
1634 Ok(())
1635 }
1636 }
1637
1638 impl ::fidl_next::IntoNatural for DataSinkWriteAssetRequest {
1639 type Natural = crate::natural::DataSinkWriteAssetRequest;
1640 }
1641
1642 #[derive(Debug)]
1644 #[repr(C)]
1645 pub struct DataSinkWriteFirmwareRequest<'de> {
1646 pub configuration: crate::wire::Configuration,
1647
1648 pub type_: ::fidl_next::wire::String<'de>,
1649
1650 pub payload: ::fidl_next_fuchsia_mem::wire::Buffer,
1651 }
1652
1653 static_assertions::const_assert_eq!(
1654 std::mem::size_of::<DataSinkWriteFirmwareRequest<'_>>(),
1655 40
1656 );
1657 static_assertions::const_assert_eq!(
1658 std::mem::align_of::<DataSinkWriteFirmwareRequest<'_>>(),
1659 8
1660 );
1661
1662 static_assertions::const_assert_eq!(
1663 std::mem::offset_of!(DataSinkWriteFirmwareRequest<'_>, configuration),
1664 0
1665 );
1666
1667 static_assertions::const_assert_eq!(
1668 std::mem::offset_of!(DataSinkWriteFirmwareRequest<'_>, type_),
1669 8
1670 );
1671
1672 static_assertions::const_assert_eq!(
1673 std::mem::offset_of!(DataSinkWriteFirmwareRequest<'_>, payload),
1674 24
1675 );
1676
1677 impl ::fidl_next::Constrained for DataSinkWriteFirmwareRequest<'_> {
1678 type Constraint = ();
1679
1680 fn validate(
1681 _: ::fidl_next::Slot<'_, Self>,
1682 _: Self::Constraint,
1683 ) -> Result<(), ::fidl_next::ValidationError> {
1684 Ok(())
1685 }
1686 }
1687
1688 unsafe impl ::fidl_next::Wire for DataSinkWriteFirmwareRequest<'static> {
1689 type Narrowed<'de> = DataSinkWriteFirmwareRequest<'de>;
1690
1691 #[inline]
1692 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1693 ::fidl_next::munge! {
1694 let Self {
1695 configuration,
1696 type_,
1697 payload,
1698
1699 } = &mut *out_;
1700 }
1701
1702 ::fidl_next::Wire::zero_padding(configuration);
1703
1704 ::fidl_next::Wire::zero_padding(type_);
1705
1706 ::fidl_next::Wire::zero_padding(payload);
1707
1708 unsafe {
1709 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1710 }
1711 }
1712 }
1713
1714 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataSinkWriteFirmwareRequest<'de>
1715 where
1716 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1717 ___D: ::fidl_next::Decoder<'de>,
1718 ___D: ::fidl_next::fuchsia::HandleDecoder,
1719 {
1720 fn decode(
1721 slot_: ::fidl_next::Slot<'_, Self>,
1722 decoder_: &mut ___D,
1723 _: (),
1724 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1725 if slot_.as_bytes()[4..8] != [0u8; 4] {
1726 return Err(::fidl_next::DecodeError::InvalidPadding);
1727 }
1728
1729 ::fidl_next::munge! {
1730 let Self {
1731 mut configuration,
1732 mut type_,
1733 mut payload,
1734
1735 } = slot_;
1736 }
1737
1738 let _field = configuration.as_mut();
1739
1740 ::fidl_next::Decode::decode(configuration.as_mut(), decoder_, ())?;
1741
1742 let _field = type_.as_mut();
1743 ::fidl_next::Constrained::validate(_field, 256)?;
1744 ::fidl_next::Decode::decode(type_.as_mut(), decoder_, 256)?;
1745
1746 let type_ = unsafe { type_.deref_unchecked() };
1747
1748 if type_.len() > 256 {
1749 return Err(::fidl_next::DecodeError::VectorTooLong {
1750 size: type_.len() as u64,
1751 limit: 256,
1752 });
1753 }
1754
1755 let _field = payload.as_mut();
1756
1757 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
1758
1759 Ok(())
1760 }
1761 }
1762
1763 impl<'de> ::fidl_next::IntoNatural for DataSinkWriteFirmwareRequest<'de> {
1764 type Natural = crate::natural::DataSinkWriteFirmwareRequest;
1765 }
1766
1767 #[derive(Debug)]
1769 #[repr(C)]
1770 pub struct DataSinkReadFirmwareRequest<'de> {
1771 pub configuration: crate::wire::Configuration,
1772
1773 pub type_: ::fidl_next::wire::String<'de>,
1774 }
1775
1776 static_assertions::const_assert_eq!(std::mem::size_of::<DataSinkReadFirmwareRequest<'_>>(), 24);
1777 static_assertions::const_assert_eq!(std::mem::align_of::<DataSinkReadFirmwareRequest<'_>>(), 8);
1778
1779 static_assertions::const_assert_eq!(
1780 std::mem::offset_of!(DataSinkReadFirmwareRequest<'_>, configuration),
1781 0
1782 );
1783
1784 static_assertions::const_assert_eq!(
1785 std::mem::offset_of!(DataSinkReadFirmwareRequest<'_>, type_),
1786 8
1787 );
1788
1789 impl ::fidl_next::Constrained for DataSinkReadFirmwareRequest<'_> {
1790 type Constraint = ();
1791
1792 fn validate(
1793 _: ::fidl_next::Slot<'_, Self>,
1794 _: Self::Constraint,
1795 ) -> Result<(), ::fidl_next::ValidationError> {
1796 Ok(())
1797 }
1798 }
1799
1800 unsafe impl ::fidl_next::Wire for DataSinkReadFirmwareRequest<'static> {
1801 type Narrowed<'de> = DataSinkReadFirmwareRequest<'de>;
1802
1803 #[inline]
1804 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1805 ::fidl_next::munge! {
1806 let Self {
1807 configuration,
1808 type_,
1809
1810 } = &mut *out_;
1811 }
1812
1813 ::fidl_next::Wire::zero_padding(configuration);
1814
1815 ::fidl_next::Wire::zero_padding(type_);
1816
1817 unsafe {
1818 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1819 }
1820 }
1821 }
1822
1823 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataSinkReadFirmwareRequest<'de>
1824 where
1825 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1826 ___D: ::fidl_next::Decoder<'de>,
1827 ___D: ::fidl_next::fuchsia::HandleDecoder,
1828 {
1829 fn decode(
1830 slot_: ::fidl_next::Slot<'_, Self>,
1831 decoder_: &mut ___D,
1832 _: (),
1833 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1834 if slot_.as_bytes()[4..8] != [0u8; 4] {
1835 return Err(::fidl_next::DecodeError::InvalidPadding);
1836 }
1837
1838 ::fidl_next::munge! {
1839 let Self {
1840 mut configuration,
1841 mut type_,
1842
1843 } = slot_;
1844 }
1845
1846 let _field = configuration.as_mut();
1847
1848 ::fidl_next::Decode::decode(configuration.as_mut(), decoder_, ())?;
1849
1850 let _field = type_.as_mut();
1851 ::fidl_next::Constrained::validate(_field, 256)?;
1852 ::fidl_next::Decode::decode(type_.as_mut(), decoder_, 256)?;
1853
1854 let type_ = unsafe { type_.deref_unchecked() };
1855
1856 if type_.len() > 256 {
1857 return Err(::fidl_next::DecodeError::VectorTooLong {
1858 size: type_.len() as u64,
1859 limit: 256,
1860 });
1861 }
1862
1863 Ok(())
1864 }
1865 }
1866
1867 impl<'de> ::fidl_next::IntoNatural for DataSinkReadFirmwareRequest<'de> {
1868 type Natural = crate::natural::DataSinkReadFirmwareRequest;
1869 }
1870
1871 #[derive(Debug)]
1873 #[repr(C)]
1874 pub struct DataSinkReadFirmwareResponse {
1875 pub firmware: ::fidl_next_fuchsia_mem::wire::Buffer,
1876 }
1877
1878 static_assertions::const_assert_eq!(std::mem::size_of::<DataSinkReadFirmwareResponse>(), 16);
1879 static_assertions::const_assert_eq!(std::mem::align_of::<DataSinkReadFirmwareResponse>(), 8);
1880
1881 static_assertions::const_assert_eq!(
1882 std::mem::offset_of!(DataSinkReadFirmwareResponse, firmware),
1883 0
1884 );
1885
1886 impl ::fidl_next::Constrained for DataSinkReadFirmwareResponse {
1887 type Constraint = ();
1888
1889 fn validate(
1890 _: ::fidl_next::Slot<'_, Self>,
1891 _: Self::Constraint,
1892 ) -> Result<(), ::fidl_next::ValidationError> {
1893 Ok(())
1894 }
1895 }
1896
1897 unsafe impl ::fidl_next::Wire for DataSinkReadFirmwareResponse {
1898 type Narrowed<'de> = DataSinkReadFirmwareResponse;
1899
1900 #[inline]
1901 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1902 ::fidl_next::munge! {
1903 let Self {
1904 firmware,
1905
1906 } = &mut *out_;
1907 }
1908
1909 ::fidl_next::Wire::zero_padding(firmware);
1910 }
1911 }
1912
1913 unsafe impl<___D> ::fidl_next::Decode<___D> for DataSinkReadFirmwareResponse
1914 where
1915 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1916 ___D: ::fidl_next::fuchsia::HandleDecoder,
1917 {
1918 fn decode(
1919 slot_: ::fidl_next::Slot<'_, Self>,
1920 decoder_: &mut ___D,
1921 _: (),
1922 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1923 ::fidl_next::munge! {
1924 let Self {
1925 mut firmware,
1926
1927 } = slot_;
1928 }
1929
1930 let _field = firmware.as_mut();
1931
1932 ::fidl_next::Decode::decode(firmware.as_mut(), decoder_, ())?;
1933
1934 Ok(())
1935 }
1936 }
1937
1938 impl ::fidl_next::IntoNatural for DataSinkReadFirmwareResponse {
1939 type Natural = crate::natural::DataSinkReadFirmwareResponse;
1940 }
1941
1942 #[derive(Debug)]
1944 #[repr(C)]
1945 pub struct DataSinkWriteOpaqueVolumeRequest {
1946 pub payload: ::fidl_next_fuchsia_mem::wire::Buffer,
1947 }
1948
1949 static_assertions::const_assert_eq!(
1950 std::mem::size_of::<DataSinkWriteOpaqueVolumeRequest>(),
1951 16
1952 );
1953 static_assertions::const_assert_eq!(
1954 std::mem::align_of::<DataSinkWriteOpaqueVolumeRequest>(),
1955 8
1956 );
1957
1958 static_assertions::const_assert_eq!(
1959 std::mem::offset_of!(DataSinkWriteOpaqueVolumeRequest, payload),
1960 0
1961 );
1962
1963 impl ::fidl_next::Constrained for DataSinkWriteOpaqueVolumeRequest {
1964 type Constraint = ();
1965
1966 fn validate(
1967 _: ::fidl_next::Slot<'_, Self>,
1968 _: Self::Constraint,
1969 ) -> Result<(), ::fidl_next::ValidationError> {
1970 Ok(())
1971 }
1972 }
1973
1974 unsafe impl ::fidl_next::Wire for DataSinkWriteOpaqueVolumeRequest {
1975 type Narrowed<'de> = DataSinkWriteOpaqueVolumeRequest;
1976
1977 #[inline]
1978 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1979 ::fidl_next::munge! {
1980 let Self {
1981 payload,
1982
1983 } = &mut *out_;
1984 }
1985
1986 ::fidl_next::Wire::zero_padding(payload);
1987 }
1988 }
1989
1990 unsafe impl<___D> ::fidl_next::Decode<___D> for DataSinkWriteOpaqueVolumeRequest
1991 where
1992 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1993 ___D: ::fidl_next::fuchsia::HandleDecoder,
1994 {
1995 fn decode(
1996 slot_: ::fidl_next::Slot<'_, Self>,
1997 decoder_: &mut ___D,
1998 _: (),
1999 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2000 ::fidl_next::munge! {
2001 let Self {
2002 mut payload,
2003
2004 } = slot_;
2005 }
2006
2007 let _field = payload.as_mut();
2008
2009 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
2010
2011 Ok(())
2012 }
2013 }
2014
2015 impl ::fidl_next::IntoNatural for DataSinkWriteOpaqueVolumeRequest {
2016 type Natural = crate::natural::DataSinkWriteOpaqueVolumeRequest;
2017 }
2018
2019 #[derive(Debug)]
2021 #[repr(C)]
2022 pub struct DataSinkWriteSparseVolumeRequest {
2023 pub payload: ::fidl_next_fuchsia_mem::wire::Buffer,
2024 }
2025
2026 static_assertions::const_assert_eq!(
2027 std::mem::size_of::<DataSinkWriteSparseVolumeRequest>(),
2028 16
2029 );
2030 static_assertions::const_assert_eq!(
2031 std::mem::align_of::<DataSinkWriteSparseVolumeRequest>(),
2032 8
2033 );
2034
2035 static_assertions::const_assert_eq!(
2036 std::mem::offset_of!(DataSinkWriteSparseVolumeRequest, payload),
2037 0
2038 );
2039
2040 impl ::fidl_next::Constrained for DataSinkWriteSparseVolumeRequest {
2041 type Constraint = ();
2042
2043 fn validate(
2044 _: ::fidl_next::Slot<'_, Self>,
2045 _: Self::Constraint,
2046 ) -> Result<(), ::fidl_next::ValidationError> {
2047 Ok(())
2048 }
2049 }
2050
2051 unsafe impl ::fidl_next::Wire for DataSinkWriteSparseVolumeRequest {
2052 type Narrowed<'de> = DataSinkWriteSparseVolumeRequest;
2053
2054 #[inline]
2055 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2056 ::fidl_next::munge! {
2057 let Self {
2058 payload,
2059
2060 } = &mut *out_;
2061 }
2062
2063 ::fidl_next::Wire::zero_padding(payload);
2064 }
2065 }
2066
2067 unsafe impl<___D> ::fidl_next::Decode<___D> for DataSinkWriteSparseVolumeRequest
2068 where
2069 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2070 ___D: ::fidl_next::fuchsia::HandleDecoder,
2071 {
2072 fn decode(
2073 slot_: ::fidl_next::Slot<'_, Self>,
2074 decoder_: &mut ___D,
2075 _: (),
2076 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2077 ::fidl_next::munge! {
2078 let Self {
2079 mut payload,
2080
2081 } = slot_;
2082 }
2083
2084 let _field = payload.as_mut();
2085
2086 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
2087
2088 Ok(())
2089 }
2090 }
2091
2092 impl ::fidl_next::IntoNatural for DataSinkWriteSparseVolumeRequest {
2093 type Natural = crate::natural::DataSinkWriteSparseVolumeRequest;
2094 }
2095
2096 #[derive(Debug)]
2098 #[repr(C)]
2099 pub struct PartitionIoReadPartitionResponse {
2100 pub payload: ::fidl_next::wire::fuchsia::Vmo,
2101 }
2102
2103 static_assertions::const_assert_eq!(std::mem::size_of::<PartitionIoReadPartitionResponse>(), 4);
2104 static_assertions::const_assert_eq!(
2105 std::mem::align_of::<PartitionIoReadPartitionResponse>(),
2106 4
2107 );
2108
2109 static_assertions::const_assert_eq!(
2110 std::mem::offset_of!(PartitionIoReadPartitionResponse, payload),
2111 0
2112 );
2113
2114 impl ::fidl_next::Constrained for PartitionIoReadPartitionResponse {
2115 type Constraint = ();
2116
2117 fn validate(
2118 _: ::fidl_next::Slot<'_, Self>,
2119 _: Self::Constraint,
2120 ) -> Result<(), ::fidl_next::ValidationError> {
2121 Ok(())
2122 }
2123 }
2124
2125 unsafe impl ::fidl_next::Wire for PartitionIoReadPartitionResponse {
2126 type Narrowed<'de> = PartitionIoReadPartitionResponse;
2127
2128 #[inline]
2129 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2130 ::fidl_next::munge! {
2131 let Self {
2132 payload,
2133
2134 } = &mut *out_;
2135 }
2136
2137 ::fidl_next::Wire::zero_padding(payload);
2138 }
2139 }
2140
2141 unsafe impl<___D> ::fidl_next::Decode<___D> for PartitionIoReadPartitionResponse
2142 where
2143 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2144 ___D: ::fidl_next::fuchsia::HandleDecoder,
2145 {
2146 fn decode(
2147 slot_: ::fidl_next::Slot<'_, Self>,
2148 decoder_: &mut ___D,
2149 _: (),
2150 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2151 ::fidl_next::munge! {
2152 let Self {
2153 mut payload,
2154
2155 } = slot_;
2156 }
2157
2158 let _field = payload.as_mut();
2159
2160 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
2161
2162 Ok(())
2163 }
2164 }
2165
2166 impl ::fidl_next::IntoNatural for PartitionIoReadPartitionResponse {
2167 type Natural = crate::natural::PartitionIoReadPartitionResponse;
2168 }
2169
2170 #[derive(Debug)]
2172 #[repr(C)]
2173 pub struct PartitionIoWritePartitionRequest<'de> {
2174 pub partition: ::fidl_next::wire::String<'de>,
2175
2176 pub offset: ::fidl_next::wire::Uint64,
2177
2178 pub payload: ::fidl_next::wire::fuchsia::Vmo,
2179
2180 pub trailing: crate::wire::TrailingBehavior,
2181 }
2182
2183 static_assertions::const_assert_eq!(
2184 std::mem::size_of::<PartitionIoWritePartitionRequest<'_>>(),
2185 32
2186 );
2187 static_assertions::const_assert_eq!(
2188 std::mem::align_of::<PartitionIoWritePartitionRequest<'_>>(),
2189 8
2190 );
2191
2192 static_assertions::const_assert_eq!(
2193 std::mem::offset_of!(PartitionIoWritePartitionRequest<'_>, partition),
2194 0
2195 );
2196
2197 static_assertions::const_assert_eq!(
2198 std::mem::offset_of!(PartitionIoWritePartitionRequest<'_>, offset),
2199 16
2200 );
2201
2202 static_assertions::const_assert_eq!(
2203 std::mem::offset_of!(PartitionIoWritePartitionRequest<'_>, payload),
2204 24
2205 );
2206
2207 static_assertions::const_assert_eq!(
2208 std::mem::offset_of!(PartitionIoWritePartitionRequest<'_>, trailing),
2209 28
2210 );
2211
2212 impl ::fidl_next::Constrained for PartitionIoWritePartitionRequest<'_> {
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 PartitionIoWritePartitionRequest<'static> {
2224 type Narrowed<'de> = PartitionIoWritePartitionRequest<'de>;
2225
2226 #[inline]
2227 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2228 ::fidl_next::munge! {
2229 let Self {
2230 partition,
2231 offset,
2232 payload,
2233 trailing,
2234
2235 } = &mut *out_;
2236 }
2237
2238 ::fidl_next::Wire::zero_padding(partition);
2239
2240 ::fidl_next::Wire::zero_padding(offset);
2241
2242 ::fidl_next::Wire::zero_padding(payload);
2243
2244 ::fidl_next::Wire::zero_padding(trailing);
2245 }
2246 }
2247
2248 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for PartitionIoWritePartitionRequest<'de>
2249 where
2250 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2251 ___D: ::fidl_next::Decoder<'de>,
2252 ___D: ::fidl_next::fuchsia::HandleDecoder,
2253 {
2254 fn decode(
2255 slot_: ::fidl_next::Slot<'_, Self>,
2256 decoder_: &mut ___D,
2257 _: (),
2258 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2259 ::fidl_next::munge! {
2260 let Self {
2261 mut partition,
2262 mut offset,
2263 mut payload,
2264 mut trailing,
2265
2266 } = slot_;
2267 }
2268
2269 let _field = partition.as_mut();
2270 ::fidl_next::Constrained::validate(_field, 128)?;
2271 ::fidl_next::Decode::decode(partition.as_mut(), decoder_, 128)?;
2272
2273 let partition = unsafe { partition.deref_unchecked() };
2274
2275 if partition.len() > 128 {
2276 return Err(::fidl_next::DecodeError::VectorTooLong {
2277 size: partition.len() as u64,
2278 limit: 128,
2279 });
2280 }
2281
2282 let _field = offset.as_mut();
2283
2284 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
2285
2286 let _field = payload.as_mut();
2287
2288 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
2289
2290 let _field = trailing.as_mut();
2291
2292 ::fidl_next::Decode::decode(trailing.as_mut(), decoder_, ())?;
2293
2294 Ok(())
2295 }
2296 }
2297
2298 impl<'de> ::fidl_next::IntoNatural for PartitionIoWritePartitionRequest<'de> {
2299 type Natural = crate::natural::PartitionIoWritePartitionRequest;
2300 }
2301
2302 #[derive(Debug)]
2304 #[repr(C)]
2305 pub struct PaverFindDataSinkRequest {
2306 pub data_sink: ::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::wire::fuchsia::Channel>,
2307 }
2308
2309 static_assertions::const_assert_eq!(std::mem::size_of::<PaverFindDataSinkRequest>(), 4);
2310 static_assertions::const_assert_eq!(std::mem::align_of::<PaverFindDataSinkRequest>(), 4);
2311
2312 static_assertions::const_assert_eq!(
2313 std::mem::offset_of!(PaverFindDataSinkRequest, data_sink),
2314 0
2315 );
2316
2317 impl ::fidl_next::Constrained for PaverFindDataSinkRequest {
2318 type Constraint = ();
2319
2320 fn validate(
2321 _: ::fidl_next::Slot<'_, Self>,
2322 _: Self::Constraint,
2323 ) -> Result<(), ::fidl_next::ValidationError> {
2324 Ok(())
2325 }
2326 }
2327
2328 unsafe impl ::fidl_next::Wire for PaverFindDataSinkRequest {
2329 type Narrowed<'de> = PaverFindDataSinkRequest;
2330
2331 #[inline]
2332 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2333 ::fidl_next::munge! {
2334 let Self {
2335 data_sink,
2336
2337 } = &mut *out_;
2338 }
2339
2340 ::fidl_next::Wire::zero_padding(data_sink);
2341 }
2342 }
2343
2344 unsafe impl<___D> ::fidl_next::Decode<___D> for PaverFindDataSinkRequest
2345 where
2346 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2347 ___D: ::fidl_next::fuchsia::HandleDecoder,
2348 {
2349 fn decode(
2350 slot_: ::fidl_next::Slot<'_, Self>,
2351 decoder_: &mut ___D,
2352 _: (),
2353 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2354 ::fidl_next::munge! {
2355 let Self {
2356 mut data_sink,
2357
2358 } = slot_;
2359 }
2360
2361 let _field = data_sink.as_mut();
2362
2363 ::fidl_next::Decode::decode(data_sink.as_mut(), decoder_, ())?;
2364
2365 Ok(())
2366 }
2367 }
2368
2369 impl ::fidl_next::IntoNatural for PaverFindDataSinkRequest {
2370 type Natural = crate::natural::PaverFindDataSinkRequest;
2371 }
2372
2373 #[derive(Debug)]
2375 #[repr(C)]
2376 pub struct PaverFindPartitionTableManagerRequest {
2377 pub data_sink:
2378 ::fidl_next::ServerEnd<crate::DynamicDataSink, ::fidl_next::wire::fuchsia::Channel>,
2379 }
2380
2381 static_assertions::const_assert_eq!(
2382 std::mem::size_of::<PaverFindPartitionTableManagerRequest>(),
2383 4
2384 );
2385 static_assertions::const_assert_eq!(
2386 std::mem::align_of::<PaverFindPartitionTableManagerRequest>(),
2387 4
2388 );
2389
2390 static_assertions::const_assert_eq!(
2391 std::mem::offset_of!(PaverFindPartitionTableManagerRequest, data_sink),
2392 0
2393 );
2394
2395 impl ::fidl_next::Constrained for PaverFindPartitionTableManagerRequest {
2396 type Constraint = ();
2397
2398 fn validate(
2399 _: ::fidl_next::Slot<'_, Self>,
2400 _: Self::Constraint,
2401 ) -> Result<(), ::fidl_next::ValidationError> {
2402 Ok(())
2403 }
2404 }
2405
2406 unsafe impl ::fidl_next::Wire for PaverFindPartitionTableManagerRequest {
2407 type Narrowed<'de> = PaverFindPartitionTableManagerRequest;
2408
2409 #[inline]
2410 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2411 ::fidl_next::munge! {
2412 let Self {
2413 data_sink,
2414
2415 } = &mut *out_;
2416 }
2417
2418 ::fidl_next::Wire::zero_padding(data_sink);
2419 }
2420 }
2421
2422 unsafe impl<___D> ::fidl_next::Decode<___D> for PaverFindPartitionTableManagerRequest
2423 where
2424 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2425 ___D: ::fidl_next::fuchsia::HandleDecoder,
2426 {
2427 fn decode(
2428 slot_: ::fidl_next::Slot<'_, Self>,
2429 decoder_: &mut ___D,
2430 _: (),
2431 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2432 ::fidl_next::munge! {
2433 let Self {
2434 mut data_sink,
2435
2436 } = slot_;
2437 }
2438
2439 let _field = data_sink.as_mut();
2440
2441 ::fidl_next::Decode::decode(data_sink.as_mut(), decoder_, ())?;
2442
2443 Ok(())
2444 }
2445 }
2446
2447 impl ::fidl_next::IntoNatural for PaverFindPartitionTableManagerRequest {
2448 type Natural = crate::natural::PaverFindPartitionTableManagerRequest;
2449 }
2450
2451 #[derive(Debug)]
2453 #[repr(C)]
2454 pub struct PaverFindBootManagerRequest {
2455 pub boot_manager:
2456 ::fidl_next::ServerEnd<crate::BootManager, ::fidl_next::wire::fuchsia::Channel>,
2457 }
2458
2459 static_assertions::const_assert_eq!(std::mem::size_of::<PaverFindBootManagerRequest>(), 4);
2460 static_assertions::const_assert_eq!(std::mem::align_of::<PaverFindBootManagerRequest>(), 4);
2461
2462 static_assertions::const_assert_eq!(
2463 std::mem::offset_of!(PaverFindBootManagerRequest, boot_manager),
2464 0
2465 );
2466
2467 impl ::fidl_next::Constrained for PaverFindBootManagerRequest {
2468 type Constraint = ();
2469
2470 fn validate(
2471 _: ::fidl_next::Slot<'_, Self>,
2472 _: Self::Constraint,
2473 ) -> Result<(), ::fidl_next::ValidationError> {
2474 Ok(())
2475 }
2476 }
2477
2478 unsafe impl ::fidl_next::Wire for PaverFindBootManagerRequest {
2479 type Narrowed<'de> = PaverFindBootManagerRequest;
2480
2481 #[inline]
2482 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2483 ::fidl_next::munge! {
2484 let Self {
2485 boot_manager,
2486
2487 } = &mut *out_;
2488 }
2489
2490 ::fidl_next::Wire::zero_padding(boot_manager);
2491 }
2492 }
2493
2494 unsafe impl<___D> ::fidl_next::Decode<___D> for PaverFindBootManagerRequest
2495 where
2496 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2497 ___D: ::fidl_next::fuchsia::HandleDecoder,
2498 {
2499 fn decode(
2500 slot_: ::fidl_next::Slot<'_, Self>,
2501 decoder_: &mut ___D,
2502 _: (),
2503 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2504 ::fidl_next::munge! {
2505 let Self {
2506 mut boot_manager,
2507
2508 } = slot_;
2509 }
2510
2511 let _field = boot_manager.as_mut();
2512
2513 ::fidl_next::Decode::decode(boot_manager.as_mut(), decoder_, ())?;
2514
2515 Ok(())
2516 }
2517 }
2518
2519 impl ::fidl_next::IntoNatural for PaverFindBootManagerRequest {
2520 type Natural = crate::natural::PaverFindBootManagerRequest;
2521 }
2522
2523 #[derive(Debug)]
2525 #[repr(C)]
2526 pub struct PaverFindSysconfigRequest {
2527 pub sysconfig:
2528 ::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::wire::fuchsia::Channel>,
2529 }
2530
2531 static_assertions::const_assert_eq!(std::mem::size_of::<PaverFindSysconfigRequest>(), 4);
2532 static_assertions::const_assert_eq!(std::mem::align_of::<PaverFindSysconfigRequest>(), 4);
2533
2534 static_assertions::const_assert_eq!(
2535 std::mem::offset_of!(PaverFindSysconfigRequest, sysconfig),
2536 0
2537 );
2538
2539 impl ::fidl_next::Constrained for PaverFindSysconfigRequest {
2540 type Constraint = ();
2541
2542 fn validate(
2543 _: ::fidl_next::Slot<'_, Self>,
2544 _: Self::Constraint,
2545 ) -> Result<(), ::fidl_next::ValidationError> {
2546 Ok(())
2547 }
2548 }
2549
2550 unsafe impl ::fidl_next::Wire for PaverFindSysconfigRequest {
2551 type Narrowed<'de> = PaverFindSysconfigRequest;
2552
2553 #[inline]
2554 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2555 ::fidl_next::munge! {
2556 let Self {
2557 sysconfig,
2558
2559 } = &mut *out_;
2560 }
2561
2562 ::fidl_next::Wire::zero_padding(sysconfig);
2563 }
2564 }
2565
2566 unsafe impl<___D> ::fidl_next::Decode<___D> for PaverFindSysconfigRequest
2567 where
2568 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2569 ___D: ::fidl_next::fuchsia::HandleDecoder,
2570 {
2571 fn decode(
2572 slot_: ::fidl_next::Slot<'_, Self>,
2573 decoder_: &mut ___D,
2574 _: (),
2575 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2576 ::fidl_next::munge! {
2577 let Self {
2578 mut sysconfig,
2579
2580 } = slot_;
2581 }
2582
2583 let _field = sysconfig.as_mut();
2584
2585 ::fidl_next::Decode::decode(sysconfig.as_mut(), decoder_, ())?;
2586
2587 Ok(())
2588 }
2589 }
2590
2591 impl ::fidl_next::IntoNatural for PaverFindSysconfigRequest {
2592 type Natural = crate::natural::PaverFindSysconfigRequest;
2593 }
2594
2595 #[derive(Debug)]
2597 #[repr(C)]
2598 pub struct PaverOpenPartitionIoRequest {
2599 pub block_dir: ::fidl_next::ClientEnd<
2600 ::fidl_next_fuchsia_io::Directory,
2601 ::fidl_next::wire::fuchsia::Channel,
2602 >,
2603
2604 pub partition_io:
2605 ::fidl_next::ServerEnd<crate::PartitionIo, ::fidl_next::wire::fuchsia::Channel>,
2606 }
2607
2608 static_assertions::const_assert_eq!(std::mem::size_of::<PaverOpenPartitionIoRequest>(), 8);
2609 static_assertions::const_assert_eq!(std::mem::align_of::<PaverOpenPartitionIoRequest>(), 4);
2610
2611 static_assertions::const_assert_eq!(
2612 std::mem::offset_of!(PaverOpenPartitionIoRequest, block_dir),
2613 0
2614 );
2615
2616 static_assertions::const_assert_eq!(
2617 std::mem::offset_of!(PaverOpenPartitionIoRequest, partition_io),
2618 4
2619 );
2620
2621 impl ::fidl_next::Constrained for PaverOpenPartitionIoRequest {
2622 type Constraint = ();
2623
2624 fn validate(
2625 _: ::fidl_next::Slot<'_, Self>,
2626 _: Self::Constraint,
2627 ) -> Result<(), ::fidl_next::ValidationError> {
2628 Ok(())
2629 }
2630 }
2631
2632 unsafe impl ::fidl_next::Wire for PaverOpenPartitionIoRequest {
2633 type Narrowed<'de> = PaverOpenPartitionIoRequest;
2634
2635 #[inline]
2636 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2637 ::fidl_next::munge! {
2638 let Self {
2639 block_dir,
2640 partition_io,
2641
2642 } = &mut *out_;
2643 }
2644
2645 ::fidl_next::Wire::zero_padding(block_dir);
2646
2647 ::fidl_next::Wire::zero_padding(partition_io);
2648 }
2649 }
2650
2651 unsafe impl<___D> ::fidl_next::Decode<___D> for PaverOpenPartitionIoRequest
2652 where
2653 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2654 ___D: ::fidl_next::fuchsia::HandleDecoder,
2655 {
2656 fn decode(
2657 slot_: ::fidl_next::Slot<'_, Self>,
2658 decoder_: &mut ___D,
2659 _: (),
2660 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2661 ::fidl_next::munge! {
2662 let Self {
2663 mut block_dir,
2664 mut partition_io,
2665
2666 } = slot_;
2667 }
2668
2669 let _field = block_dir.as_mut();
2670
2671 ::fidl_next::Decode::decode(block_dir.as_mut(), decoder_, ())?;
2672
2673 let _field = partition_io.as_mut();
2674
2675 ::fidl_next::Decode::decode(partition_io.as_mut(), decoder_, ())?;
2676
2677 Ok(())
2678 }
2679 }
2680
2681 impl ::fidl_next::IntoNatural for PaverOpenPartitionIoRequest {
2682 type Natural = crate::natural::PaverOpenPartitionIoRequest;
2683 }
2684
2685 #[derive(Debug)]
2687 #[repr(C)]
2688 pub struct SysconfigReadResponse {
2689 pub data: ::fidl_next_fuchsia_mem::wire::Buffer,
2690 }
2691
2692 static_assertions::const_assert_eq!(std::mem::size_of::<SysconfigReadResponse>(), 16);
2693 static_assertions::const_assert_eq!(std::mem::align_of::<SysconfigReadResponse>(), 8);
2694
2695 static_assertions::const_assert_eq!(std::mem::offset_of!(SysconfigReadResponse, data), 0);
2696
2697 impl ::fidl_next::Constrained for SysconfigReadResponse {
2698 type Constraint = ();
2699
2700 fn validate(
2701 _: ::fidl_next::Slot<'_, Self>,
2702 _: Self::Constraint,
2703 ) -> Result<(), ::fidl_next::ValidationError> {
2704 Ok(())
2705 }
2706 }
2707
2708 unsafe impl ::fidl_next::Wire for SysconfigReadResponse {
2709 type Narrowed<'de> = SysconfigReadResponse;
2710
2711 #[inline]
2712 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2713 ::fidl_next::munge! {
2714 let Self {
2715 data,
2716
2717 } = &mut *out_;
2718 }
2719
2720 ::fidl_next::Wire::zero_padding(data);
2721 }
2722 }
2723
2724 unsafe impl<___D> ::fidl_next::Decode<___D> for SysconfigReadResponse
2725 where
2726 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2727 ___D: ::fidl_next::fuchsia::HandleDecoder,
2728 {
2729 fn decode(
2730 slot_: ::fidl_next::Slot<'_, Self>,
2731 decoder_: &mut ___D,
2732 _: (),
2733 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2734 ::fidl_next::munge! {
2735 let Self {
2736 mut data,
2737
2738 } = slot_;
2739 }
2740
2741 let _field = data.as_mut();
2742
2743 ::fidl_next::Decode::decode(data.as_mut(), decoder_, ())?;
2744
2745 Ok(())
2746 }
2747 }
2748
2749 impl ::fidl_next::IntoNatural for SysconfigReadResponse {
2750 type Natural = crate::natural::SysconfigReadResponse;
2751 }
2752
2753 #[derive(Debug)]
2755 #[repr(C)]
2756 pub struct SysconfigWriteRequest {
2757 pub payload: ::fidl_next_fuchsia_mem::wire::Buffer,
2758 }
2759
2760 static_assertions::const_assert_eq!(std::mem::size_of::<SysconfigWriteRequest>(), 16);
2761 static_assertions::const_assert_eq!(std::mem::align_of::<SysconfigWriteRequest>(), 8);
2762
2763 static_assertions::const_assert_eq!(std::mem::offset_of!(SysconfigWriteRequest, payload), 0);
2764
2765 impl ::fidl_next::Constrained for SysconfigWriteRequest {
2766 type Constraint = ();
2767
2768 fn validate(
2769 _: ::fidl_next::Slot<'_, Self>,
2770 _: Self::Constraint,
2771 ) -> Result<(), ::fidl_next::ValidationError> {
2772 Ok(())
2773 }
2774 }
2775
2776 unsafe impl ::fidl_next::Wire for SysconfigWriteRequest {
2777 type Narrowed<'de> = SysconfigWriteRequest;
2778
2779 #[inline]
2780 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2781 ::fidl_next::munge! {
2782 let Self {
2783 payload,
2784
2785 } = &mut *out_;
2786 }
2787
2788 ::fidl_next::Wire::zero_padding(payload);
2789 }
2790 }
2791
2792 unsafe impl<___D> ::fidl_next::Decode<___D> for SysconfigWriteRequest
2793 where
2794 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2795 ___D: ::fidl_next::fuchsia::HandleDecoder,
2796 {
2797 fn decode(
2798 slot_: ::fidl_next::Slot<'_, Self>,
2799 decoder_: &mut ___D,
2800 _: (),
2801 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2802 ::fidl_next::munge! {
2803 let Self {
2804 mut payload,
2805
2806 } = slot_;
2807 }
2808
2809 let _field = payload.as_mut();
2810
2811 ::fidl_next::Decode::decode(payload.as_mut(), decoder_, ())?;
2812
2813 Ok(())
2814 }
2815 }
2816
2817 impl ::fidl_next::IntoNatural for SysconfigWriteRequest {
2818 type Natural = crate::natural::SysconfigWriteRequest;
2819 }
2820}
2821
2822pub mod wire_optional {
2823
2824 pub use fidl_next_common_fuchsia_paver::wire_optional::*;
2825}
2826
2827pub mod generic {
2828
2829 pub use fidl_next_common_fuchsia_paver::generic::*;
2830
2831 pub struct DataSinkReadAssetResponse<T0> {
2833 pub asset: T0,
2834 }
2835
2836 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DataSinkReadAssetResponse, ___E>
2837 for DataSinkReadAssetResponse<T0>
2838 where
2839 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2840 ___E: ::fidl_next::fuchsia::HandleEncoder,
2841 T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
2842 {
2843 #[inline]
2844 fn encode(
2845 self,
2846 encoder_: &mut ___E,
2847 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadAssetResponse>,
2848 _: (),
2849 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2850 ::fidl_next::munge! {
2851 let crate::wire::DataSinkReadAssetResponse {
2852 asset,
2853
2854 } = out_;
2855 }
2856
2857 ::fidl_next::Encode::encode(self.asset, encoder_, asset, ())?;
2858
2859 Ok(())
2860 }
2861 }
2862
2863 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::DataSinkReadAssetResponse, ___E>
2864 for &'a DataSinkReadAssetResponse<T0>
2865 where
2866 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2867 ___E: ::fidl_next::fuchsia::HandleEncoder,
2868 &'a T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
2869 {
2870 #[inline]
2871 fn encode(
2872 self,
2873 encoder_: &mut ___E,
2874 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadAssetResponse>,
2875 _: (),
2876 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2877 ::fidl_next::munge! {
2878 let crate::wire::DataSinkReadAssetResponse {
2879 asset,
2880
2881 } = out_;
2882 }
2883
2884 ::fidl_next::Encode::encode(&self.asset, encoder_, asset, ())?;
2885
2886 Ok(())
2887 }
2888 }
2889
2890 pub struct DataSinkWriteAssetRequest<T0, T1, T2> {
2892 pub configuration: T0,
2893
2894 pub asset: T1,
2895
2896 pub payload: T2,
2897 }
2898
2899 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DataSinkWriteAssetRequest, ___E>
2900 for DataSinkWriteAssetRequest<T0, T1, T2>
2901 where
2902 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2903 ___E: ::fidl_next::fuchsia::HandleEncoder,
2904 T0: ::fidl_next::Encode<crate::wire::Configuration, ___E>,
2905 T1: ::fidl_next::Encode<crate::wire::Asset, ___E>,
2906 T2: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
2907 {
2908 #[inline]
2909 fn encode(
2910 self,
2911 encoder_: &mut ___E,
2912 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteAssetRequest>,
2913 _: (),
2914 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2915 ::fidl_next::munge! {
2916 let crate::wire::DataSinkWriteAssetRequest {
2917 configuration,
2918 asset,
2919 payload,
2920
2921 } = out_;
2922 }
2923
2924 ::fidl_next::Encode::encode(self.configuration, encoder_, configuration, ())?;
2925
2926 ::fidl_next::Encode::encode(self.asset, encoder_, asset, ())?;
2927
2928 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
2929
2930 Ok(())
2931 }
2932 }
2933
2934 unsafe impl<'a, ___E, T0, T1, T2>
2935 ::fidl_next::Encode<crate::wire::DataSinkWriteAssetRequest, ___E>
2936 for &'a DataSinkWriteAssetRequest<T0, T1, T2>
2937 where
2938 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2939 ___E: ::fidl_next::fuchsia::HandleEncoder,
2940 &'a T0: ::fidl_next::Encode<crate::wire::Configuration, ___E>,
2941 &'a T1: ::fidl_next::Encode<crate::wire::Asset, ___E>,
2942 &'a T2: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
2943 {
2944 #[inline]
2945 fn encode(
2946 self,
2947 encoder_: &mut ___E,
2948 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteAssetRequest>,
2949 _: (),
2950 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2951 ::fidl_next::munge! {
2952 let crate::wire::DataSinkWriteAssetRequest {
2953 configuration,
2954 asset,
2955 payload,
2956
2957 } = out_;
2958 }
2959
2960 ::fidl_next::Encode::encode(&self.configuration, encoder_, configuration, ())?;
2961
2962 ::fidl_next::Encode::encode(&self.asset, encoder_, asset, ())?;
2963
2964 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
2965
2966 Ok(())
2967 }
2968 }
2969
2970 pub struct DataSinkWriteFirmwareRequest<T0, T1, T2> {
2972 pub configuration: T0,
2973
2974 pub type_: T1,
2975
2976 pub payload: T2,
2977 }
2978
2979 unsafe impl<___E, T0, T1, T2>
2980 ::fidl_next::Encode<crate::wire::DataSinkWriteFirmwareRequest<'static>, ___E>
2981 for DataSinkWriteFirmwareRequest<T0, T1, T2>
2982 where
2983 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2984 ___E: ::fidl_next::Encoder,
2985 ___E: ::fidl_next::fuchsia::HandleEncoder,
2986 T0: ::fidl_next::Encode<crate::wire::Configuration, ___E>,
2987 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
2988 T2: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
2989 {
2990 #[inline]
2991 fn encode(
2992 self,
2993 encoder_: &mut ___E,
2994 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteFirmwareRequest<'static>>,
2995 _: (),
2996 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2997 ::fidl_next::munge! {
2998 let crate::wire::DataSinkWriteFirmwareRequest {
2999 configuration,
3000 type_,
3001 payload,
3002
3003 } = out_;
3004 }
3005
3006 ::fidl_next::Encode::encode(self.configuration, encoder_, configuration, ())?;
3007
3008 ::fidl_next::Encode::encode(self.type_, encoder_, type_, 256)?;
3009
3010 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3011
3012 Ok(())
3013 }
3014 }
3015
3016 unsafe impl<'a, ___E, T0, T1, T2>
3017 ::fidl_next::Encode<crate::wire::DataSinkWriteFirmwareRequest<'static>, ___E>
3018 for &'a DataSinkWriteFirmwareRequest<T0, T1, T2>
3019 where
3020 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3021 ___E: ::fidl_next::Encoder,
3022 ___E: ::fidl_next::fuchsia::HandleEncoder,
3023 &'a T0: ::fidl_next::Encode<crate::wire::Configuration, ___E>,
3024 &'a T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
3025 &'a T2: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3026 {
3027 #[inline]
3028 fn encode(
3029 self,
3030 encoder_: &mut ___E,
3031 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteFirmwareRequest<'static>>,
3032 _: (),
3033 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3034 ::fidl_next::munge! {
3035 let crate::wire::DataSinkWriteFirmwareRequest {
3036 configuration,
3037 type_,
3038 payload,
3039
3040 } = out_;
3041 }
3042
3043 ::fidl_next::Encode::encode(&self.configuration, encoder_, configuration, ())?;
3044
3045 ::fidl_next::Encode::encode(&self.type_, encoder_, type_, 256)?;
3046
3047 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3048
3049 Ok(())
3050 }
3051 }
3052
3053 pub struct DataSinkReadFirmwareRequest<T0, T1> {
3055 pub configuration: T0,
3056
3057 pub type_: T1,
3058 }
3059
3060 unsafe impl<___E, T0, T1>
3061 ::fidl_next::Encode<crate::wire::DataSinkReadFirmwareRequest<'static>, ___E>
3062 for DataSinkReadFirmwareRequest<T0, T1>
3063 where
3064 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3065 ___E: ::fidl_next::Encoder,
3066 ___E: ::fidl_next::fuchsia::HandleEncoder,
3067 T0: ::fidl_next::Encode<crate::wire::Configuration, ___E>,
3068 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
3069 {
3070 #[inline]
3071 fn encode(
3072 self,
3073 encoder_: &mut ___E,
3074 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadFirmwareRequest<'static>>,
3075 _: (),
3076 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3077 ::fidl_next::munge! {
3078 let crate::wire::DataSinkReadFirmwareRequest {
3079 configuration,
3080 type_,
3081
3082 } = out_;
3083 }
3084
3085 ::fidl_next::Encode::encode(self.configuration, encoder_, configuration, ())?;
3086
3087 ::fidl_next::Encode::encode(self.type_, encoder_, type_, 256)?;
3088
3089 Ok(())
3090 }
3091 }
3092
3093 unsafe impl<'a, ___E, T0, T1>
3094 ::fidl_next::Encode<crate::wire::DataSinkReadFirmwareRequest<'static>, ___E>
3095 for &'a DataSinkReadFirmwareRequest<T0, T1>
3096 where
3097 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3098 ___E: ::fidl_next::Encoder,
3099 ___E: ::fidl_next::fuchsia::HandleEncoder,
3100 &'a T0: ::fidl_next::Encode<crate::wire::Configuration, ___E>,
3101 &'a T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
3102 {
3103 #[inline]
3104 fn encode(
3105 self,
3106 encoder_: &mut ___E,
3107 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadFirmwareRequest<'static>>,
3108 _: (),
3109 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3110 ::fidl_next::munge! {
3111 let crate::wire::DataSinkReadFirmwareRequest {
3112 configuration,
3113 type_,
3114
3115 } = out_;
3116 }
3117
3118 ::fidl_next::Encode::encode(&self.configuration, encoder_, configuration, ())?;
3119
3120 ::fidl_next::Encode::encode(&self.type_, encoder_, type_, 256)?;
3121
3122 Ok(())
3123 }
3124 }
3125
3126 pub struct DataSinkReadFirmwareResponse<T0> {
3128 pub firmware: T0,
3129 }
3130
3131 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DataSinkReadFirmwareResponse, ___E>
3132 for DataSinkReadFirmwareResponse<T0>
3133 where
3134 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3135 ___E: ::fidl_next::fuchsia::HandleEncoder,
3136 T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3137 {
3138 #[inline]
3139 fn encode(
3140 self,
3141 encoder_: &mut ___E,
3142 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadFirmwareResponse>,
3143 _: (),
3144 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3145 ::fidl_next::munge! {
3146 let crate::wire::DataSinkReadFirmwareResponse {
3147 firmware,
3148
3149 } = out_;
3150 }
3151
3152 ::fidl_next::Encode::encode(self.firmware, encoder_, firmware, ())?;
3153
3154 Ok(())
3155 }
3156 }
3157
3158 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::DataSinkReadFirmwareResponse, ___E>
3159 for &'a DataSinkReadFirmwareResponse<T0>
3160 where
3161 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3162 ___E: ::fidl_next::fuchsia::HandleEncoder,
3163 &'a T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3164 {
3165 #[inline]
3166 fn encode(
3167 self,
3168 encoder_: &mut ___E,
3169 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkReadFirmwareResponse>,
3170 _: (),
3171 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3172 ::fidl_next::munge! {
3173 let crate::wire::DataSinkReadFirmwareResponse {
3174 firmware,
3175
3176 } = out_;
3177 }
3178
3179 ::fidl_next::Encode::encode(&self.firmware, encoder_, firmware, ())?;
3180
3181 Ok(())
3182 }
3183 }
3184
3185 pub struct DataSinkWriteOpaqueVolumeRequest<T0> {
3187 pub payload: T0,
3188 }
3189
3190 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DataSinkWriteOpaqueVolumeRequest, ___E>
3191 for DataSinkWriteOpaqueVolumeRequest<T0>
3192 where
3193 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3194 ___E: ::fidl_next::fuchsia::HandleEncoder,
3195 T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3196 {
3197 #[inline]
3198 fn encode(
3199 self,
3200 encoder_: &mut ___E,
3201 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteOpaqueVolumeRequest>,
3202 _: (),
3203 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3204 ::fidl_next::munge! {
3205 let crate::wire::DataSinkWriteOpaqueVolumeRequest {
3206 payload,
3207
3208 } = out_;
3209 }
3210
3211 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3212
3213 Ok(())
3214 }
3215 }
3216
3217 unsafe impl<'a, ___E, T0>
3218 ::fidl_next::Encode<crate::wire::DataSinkWriteOpaqueVolumeRequest, ___E>
3219 for &'a DataSinkWriteOpaqueVolumeRequest<T0>
3220 where
3221 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3222 ___E: ::fidl_next::fuchsia::HandleEncoder,
3223 &'a T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3224 {
3225 #[inline]
3226 fn encode(
3227 self,
3228 encoder_: &mut ___E,
3229 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteOpaqueVolumeRequest>,
3230 _: (),
3231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3232 ::fidl_next::munge! {
3233 let crate::wire::DataSinkWriteOpaqueVolumeRequest {
3234 payload,
3235
3236 } = out_;
3237 }
3238
3239 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3240
3241 Ok(())
3242 }
3243 }
3244
3245 pub struct DataSinkWriteSparseVolumeRequest<T0> {
3247 pub payload: T0,
3248 }
3249
3250 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DataSinkWriteSparseVolumeRequest, ___E>
3251 for DataSinkWriteSparseVolumeRequest<T0>
3252 where
3253 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3254 ___E: ::fidl_next::fuchsia::HandleEncoder,
3255 T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3256 {
3257 #[inline]
3258 fn encode(
3259 self,
3260 encoder_: &mut ___E,
3261 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteSparseVolumeRequest>,
3262 _: (),
3263 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3264 ::fidl_next::munge! {
3265 let crate::wire::DataSinkWriteSparseVolumeRequest {
3266 payload,
3267
3268 } = out_;
3269 }
3270
3271 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3272
3273 Ok(())
3274 }
3275 }
3276
3277 unsafe impl<'a, ___E, T0>
3278 ::fidl_next::Encode<crate::wire::DataSinkWriteSparseVolumeRequest, ___E>
3279 for &'a DataSinkWriteSparseVolumeRequest<T0>
3280 where
3281 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3282 ___E: ::fidl_next::fuchsia::HandleEncoder,
3283 &'a T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3284 {
3285 #[inline]
3286 fn encode(
3287 self,
3288 encoder_: &mut ___E,
3289 out_: &mut ::core::mem::MaybeUninit<crate::wire::DataSinkWriteSparseVolumeRequest>,
3290 _: (),
3291 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3292 ::fidl_next::munge! {
3293 let crate::wire::DataSinkWriteSparseVolumeRequest {
3294 payload,
3295
3296 } = out_;
3297 }
3298
3299 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3300
3301 Ok(())
3302 }
3303 }
3304
3305 pub struct PartitionIoReadPartitionResponse<T0> {
3307 pub payload: T0,
3308 }
3309
3310 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::PartitionIoReadPartitionResponse, ___E>
3311 for PartitionIoReadPartitionResponse<T0>
3312 where
3313 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3314 ___E: ::fidl_next::fuchsia::HandleEncoder,
3315 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3316 {
3317 #[inline]
3318 fn encode(
3319 self,
3320 encoder_: &mut ___E,
3321 out_: &mut ::core::mem::MaybeUninit<crate::wire::PartitionIoReadPartitionResponse>,
3322 _: (),
3323 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3324 ::fidl_next::munge! {
3325 let crate::wire::PartitionIoReadPartitionResponse {
3326 payload,
3327
3328 } = out_;
3329 }
3330
3331 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3332
3333 Ok(())
3334 }
3335 }
3336
3337 unsafe impl<'a, ___E, T0>
3338 ::fidl_next::Encode<crate::wire::PartitionIoReadPartitionResponse, ___E>
3339 for &'a PartitionIoReadPartitionResponse<T0>
3340 where
3341 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3342 ___E: ::fidl_next::fuchsia::HandleEncoder,
3343 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3344 {
3345 #[inline]
3346 fn encode(
3347 self,
3348 encoder_: &mut ___E,
3349 out_: &mut ::core::mem::MaybeUninit<crate::wire::PartitionIoReadPartitionResponse>,
3350 _: (),
3351 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3352 ::fidl_next::munge! {
3353 let crate::wire::PartitionIoReadPartitionResponse {
3354 payload,
3355
3356 } = out_;
3357 }
3358
3359 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3360
3361 Ok(())
3362 }
3363 }
3364
3365 pub struct PartitionIoWritePartitionRequest<T0, T1, T2, T3> {
3367 pub partition: T0,
3368
3369 pub offset: T1,
3370
3371 pub payload: T2,
3372
3373 pub trailing: T3,
3374 }
3375
3376 unsafe impl<___E, T0, T1, T2, T3>
3377 ::fidl_next::Encode<crate::wire::PartitionIoWritePartitionRequest<'static>, ___E>
3378 for PartitionIoWritePartitionRequest<T0, T1, T2, T3>
3379 where
3380 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3381 ___E: ::fidl_next::Encoder,
3382 ___E: ::fidl_next::fuchsia::HandleEncoder,
3383 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
3384 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
3385 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3386 T3: ::fidl_next::Encode<crate::wire::TrailingBehavior, ___E>,
3387 {
3388 #[inline]
3389 fn encode(
3390 self,
3391 encoder_: &mut ___E,
3392 out_: &mut ::core::mem::MaybeUninit<
3393 crate::wire::PartitionIoWritePartitionRequest<'static>,
3394 >,
3395 _: (),
3396 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3397 ::fidl_next::munge! {
3398 let crate::wire::PartitionIoWritePartitionRequest {
3399 partition,
3400 offset,
3401 payload,
3402 trailing,
3403
3404 } = out_;
3405 }
3406
3407 ::fidl_next::Encode::encode(self.partition, encoder_, partition, 128)?;
3408
3409 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
3410
3411 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3412
3413 ::fidl_next::Encode::encode(self.trailing, encoder_, trailing, ())?;
3414
3415 Ok(())
3416 }
3417 }
3418
3419 unsafe impl<'a, ___E, T0, T1, T2, T3>
3420 ::fidl_next::Encode<crate::wire::PartitionIoWritePartitionRequest<'static>, ___E>
3421 for &'a PartitionIoWritePartitionRequest<T0, T1, T2, T3>
3422 where
3423 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3424 ___E: ::fidl_next::Encoder,
3425 ___E: ::fidl_next::fuchsia::HandleEncoder,
3426 &'a T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
3427 &'a T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
3428 &'a T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
3429 &'a T3: ::fidl_next::Encode<crate::wire::TrailingBehavior, ___E>,
3430 {
3431 #[inline]
3432 fn encode(
3433 self,
3434 encoder_: &mut ___E,
3435 out_: &mut ::core::mem::MaybeUninit<
3436 crate::wire::PartitionIoWritePartitionRequest<'static>,
3437 >,
3438 _: (),
3439 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3440 ::fidl_next::munge! {
3441 let crate::wire::PartitionIoWritePartitionRequest {
3442 partition,
3443 offset,
3444 payload,
3445 trailing,
3446
3447 } = out_;
3448 }
3449
3450 ::fidl_next::Encode::encode(&self.partition, encoder_, partition, 128)?;
3451
3452 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
3453
3454 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3455
3456 ::fidl_next::Encode::encode(&self.trailing, encoder_, trailing, ())?;
3457
3458 Ok(())
3459 }
3460 }
3461
3462 pub struct PaverFindDataSinkRequest<T0> {
3464 pub data_sink: T0,
3465 }
3466
3467 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::PaverFindDataSinkRequest, ___E>
3468 for PaverFindDataSinkRequest<T0>
3469 where
3470 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3471 ___E: ::fidl_next::fuchsia::HandleEncoder,
3472 T0: ::fidl_next::Encode<
3473 ::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::wire::fuchsia::Channel>,
3474 ___E,
3475 >,
3476 {
3477 #[inline]
3478 fn encode(
3479 self,
3480 encoder_: &mut ___E,
3481 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindDataSinkRequest>,
3482 _: (),
3483 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3484 ::fidl_next::munge! {
3485 let crate::wire::PaverFindDataSinkRequest {
3486 data_sink,
3487
3488 } = out_;
3489 }
3490
3491 ::fidl_next::Encode::encode(self.data_sink, encoder_, data_sink, ())?;
3492
3493 Ok(())
3494 }
3495 }
3496
3497 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::PaverFindDataSinkRequest, ___E>
3498 for &'a PaverFindDataSinkRequest<T0>
3499 where
3500 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3501 ___E: ::fidl_next::fuchsia::HandleEncoder,
3502 &'a T0: ::fidl_next::Encode<
3503 ::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::wire::fuchsia::Channel>,
3504 ___E,
3505 >,
3506 {
3507 #[inline]
3508 fn encode(
3509 self,
3510 encoder_: &mut ___E,
3511 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindDataSinkRequest>,
3512 _: (),
3513 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3514 ::fidl_next::munge! {
3515 let crate::wire::PaverFindDataSinkRequest {
3516 data_sink,
3517
3518 } = out_;
3519 }
3520
3521 ::fidl_next::Encode::encode(&self.data_sink, encoder_, data_sink, ())?;
3522
3523 Ok(())
3524 }
3525 }
3526
3527 pub struct PaverFindPartitionTableManagerRequest<T0> {
3529 pub data_sink: T0,
3530 }
3531
3532 unsafe impl<___E, T0>
3533 ::fidl_next::Encode<crate::wire::PaverFindPartitionTableManagerRequest, ___E>
3534 for PaverFindPartitionTableManagerRequest<T0>
3535 where
3536 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3537 ___E: ::fidl_next::fuchsia::HandleEncoder,
3538 T0: ::fidl_next::Encode<
3539 ::fidl_next::ServerEnd<crate::DynamicDataSink, ::fidl_next::wire::fuchsia::Channel>,
3540 ___E,
3541 >,
3542 {
3543 #[inline]
3544 fn encode(
3545 self,
3546 encoder_: &mut ___E,
3547 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindPartitionTableManagerRequest>,
3548 _: (),
3549 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3550 ::fidl_next::munge! {
3551 let crate::wire::PaverFindPartitionTableManagerRequest {
3552 data_sink,
3553
3554 } = out_;
3555 }
3556
3557 ::fidl_next::Encode::encode(self.data_sink, encoder_, data_sink, ())?;
3558
3559 Ok(())
3560 }
3561 }
3562
3563 unsafe impl<'a, ___E, T0>
3564 ::fidl_next::Encode<crate::wire::PaverFindPartitionTableManagerRequest, ___E>
3565 for &'a PaverFindPartitionTableManagerRequest<T0>
3566 where
3567 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3568 ___E: ::fidl_next::fuchsia::HandleEncoder,
3569 &'a T0: ::fidl_next::Encode<
3570 ::fidl_next::ServerEnd<crate::DynamicDataSink, ::fidl_next::wire::fuchsia::Channel>,
3571 ___E,
3572 >,
3573 {
3574 #[inline]
3575 fn encode(
3576 self,
3577 encoder_: &mut ___E,
3578 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindPartitionTableManagerRequest>,
3579 _: (),
3580 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3581 ::fidl_next::munge! {
3582 let crate::wire::PaverFindPartitionTableManagerRequest {
3583 data_sink,
3584
3585 } = out_;
3586 }
3587
3588 ::fidl_next::Encode::encode(&self.data_sink, encoder_, data_sink, ())?;
3589
3590 Ok(())
3591 }
3592 }
3593
3594 pub struct PaverFindBootManagerRequest<T0> {
3596 pub boot_manager: T0,
3597 }
3598
3599 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::PaverFindBootManagerRequest, ___E>
3600 for PaverFindBootManagerRequest<T0>
3601 where
3602 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3603 ___E: ::fidl_next::fuchsia::HandleEncoder,
3604 T0: ::fidl_next::Encode<
3605 ::fidl_next::ServerEnd<crate::BootManager, ::fidl_next::wire::fuchsia::Channel>,
3606 ___E,
3607 >,
3608 {
3609 #[inline]
3610 fn encode(
3611 self,
3612 encoder_: &mut ___E,
3613 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindBootManagerRequest>,
3614 _: (),
3615 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3616 ::fidl_next::munge! {
3617 let crate::wire::PaverFindBootManagerRequest {
3618 boot_manager,
3619
3620 } = out_;
3621 }
3622
3623 ::fidl_next::Encode::encode(self.boot_manager, encoder_, boot_manager, ())?;
3624
3625 Ok(())
3626 }
3627 }
3628
3629 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::PaverFindBootManagerRequest, ___E>
3630 for &'a PaverFindBootManagerRequest<T0>
3631 where
3632 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3633 ___E: ::fidl_next::fuchsia::HandleEncoder,
3634 &'a T0: ::fidl_next::Encode<
3635 ::fidl_next::ServerEnd<crate::BootManager, ::fidl_next::wire::fuchsia::Channel>,
3636 ___E,
3637 >,
3638 {
3639 #[inline]
3640 fn encode(
3641 self,
3642 encoder_: &mut ___E,
3643 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindBootManagerRequest>,
3644 _: (),
3645 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3646 ::fidl_next::munge! {
3647 let crate::wire::PaverFindBootManagerRequest {
3648 boot_manager,
3649
3650 } = out_;
3651 }
3652
3653 ::fidl_next::Encode::encode(&self.boot_manager, encoder_, boot_manager, ())?;
3654
3655 Ok(())
3656 }
3657 }
3658
3659 pub struct PaverFindSysconfigRequest<T0> {
3661 pub sysconfig: T0,
3662 }
3663
3664 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::PaverFindSysconfigRequest, ___E>
3665 for PaverFindSysconfigRequest<T0>
3666 where
3667 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3668 ___E: ::fidl_next::fuchsia::HandleEncoder,
3669 T0: ::fidl_next::Encode<
3670 ::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::wire::fuchsia::Channel>,
3671 ___E,
3672 >,
3673 {
3674 #[inline]
3675 fn encode(
3676 self,
3677 encoder_: &mut ___E,
3678 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindSysconfigRequest>,
3679 _: (),
3680 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3681 ::fidl_next::munge! {
3682 let crate::wire::PaverFindSysconfigRequest {
3683 sysconfig,
3684
3685 } = out_;
3686 }
3687
3688 ::fidl_next::Encode::encode(self.sysconfig, encoder_, sysconfig, ())?;
3689
3690 Ok(())
3691 }
3692 }
3693
3694 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::PaverFindSysconfigRequest, ___E>
3695 for &'a PaverFindSysconfigRequest<T0>
3696 where
3697 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3698 ___E: ::fidl_next::fuchsia::HandleEncoder,
3699 &'a T0: ::fidl_next::Encode<
3700 ::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::wire::fuchsia::Channel>,
3701 ___E,
3702 >,
3703 {
3704 #[inline]
3705 fn encode(
3706 self,
3707 encoder_: &mut ___E,
3708 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverFindSysconfigRequest>,
3709 _: (),
3710 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3711 ::fidl_next::munge! {
3712 let crate::wire::PaverFindSysconfigRequest {
3713 sysconfig,
3714
3715 } = out_;
3716 }
3717
3718 ::fidl_next::Encode::encode(&self.sysconfig, encoder_, sysconfig, ())?;
3719
3720 Ok(())
3721 }
3722 }
3723
3724 pub struct PaverOpenPartitionIoRequest<T0, T1> {
3726 pub block_dir: T0,
3727
3728 pub partition_io: T1,
3729 }
3730
3731 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::PaverOpenPartitionIoRequest, ___E>
3732 for PaverOpenPartitionIoRequest<T0, T1>
3733 where
3734 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3735 ___E: ::fidl_next::fuchsia::HandleEncoder,
3736 T0: ::fidl_next::Encode<
3737 ::fidl_next::ClientEnd<
3738 ::fidl_next_fuchsia_io::Directory,
3739 ::fidl_next::wire::fuchsia::Channel,
3740 >,
3741 ___E,
3742 >,
3743 T1: ::fidl_next::Encode<
3744 ::fidl_next::ServerEnd<crate::PartitionIo, ::fidl_next::wire::fuchsia::Channel>,
3745 ___E,
3746 >,
3747 {
3748 #[inline]
3749 fn encode(
3750 self,
3751 encoder_: &mut ___E,
3752 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverOpenPartitionIoRequest>,
3753 _: (),
3754 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3755 ::fidl_next::munge! {
3756 let crate::wire::PaverOpenPartitionIoRequest {
3757 block_dir,
3758 partition_io,
3759
3760 } = out_;
3761 }
3762
3763 ::fidl_next::Encode::encode(self.block_dir, encoder_, block_dir, ())?;
3764
3765 ::fidl_next::Encode::encode(self.partition_io, encoder_, partition_io, ())?;
3766
3767 Ok(())
3768 }
3769 }
3770
3771 unsafe impl<'a, ___E, T0, T1>
3772 ::fidl_next::Encode<crate::wire::PaverOpenPartitionIoRequest, ___E>
3773 for &'a PaverOpenPartitionIoRequest<T0, T1>
3774 where
3775 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3776 ___E: ::fidl_next::fuchsia::HandleEncoder,
3777 &'a T0: ::fidl_next::Encode<
3778 ::fidl_next::ClientEnd<
3779 ::fidl_next_fuchsia_io::Directory,
3780 ::fidl_next::wire::fuchsia::Channel,
3781 >,
3782 ___E,
3783 >,
3784 &'a T1: ::fidl_next::Encode<
3785 ::fidl_next::ServerEnd<crate::PartitionIo, ::fidl_next::wire::fuchsia::Channel>,
3786 ___E,
3787 >,
3788 {
3789 #[inline]
3790 fn encode(
3791 self,
3792 encoder_: &mut ___E,
3793 out_: &mut ::core::mem::MaybeUninit<crate::wire::PaverOpenPartitionIoRequest>,
3794 _: (),
3795 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3796 ::fidl_next::munge! {
3797 let crate::wire::PaverOpenPartitionIoRequest {
3798 block_dir,
3799 partition_io,
3800
3801 } = out_;
3802 }
3803
3804 ::fidl_next::Encode::encode(&self.block_dir, encoder_, block_dir, ())?;
3805
3806 ::fidl_next::Encode::encode(&self.partition_io, encoder_, partition_io, ())?;
3807
3808 Ok(())
3809 }
3810 }
3811
3812 pub struct SysconfigReadResponse<T0> {
3814 pub data: T0,
3815 }
3816
3817 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SysconfigReadResponse, ___E>
3818 for SysconfigReadResponse<T0>
3819 where
3820 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3821 ___E: ::fidl_next::fuchsia::HandleEncoder,
3822 T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3823 {
3824 #[inline]
3825 fn encode(
3826 self,
3827 encoder_: &mut ___E,
3828 out_: &mut ::core::mem::MaybeUninit<crate::wire::SysconfigReadResponse>,
3829 _: (),
3830 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3831 ::fidl_next::munge! {
3832 let crate::wire::SysconfigReadResponse {
3833 data,
3834
3835 } = out_;
3836 }
3837
3838 ::fidl_next::Encode::encode(self.data, encoder_, data, ())?;
3839
3840 Ok(())
3841 }
3842 }
3843
3844 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::SysconfigReadResponse, ___E>
3845 for &'a SysconfigReadResponse<T0>
3846 where
3847 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3848 ___E: ::fidl_next::fuchsia::HandleEncoder,
3849 &'a T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3850 {
3851 #[inline]
3852 fn encode(
3853 self,
3854 encoder_: &mut ___E,
3855 out_: &mut ::core::mem::MaybeUninit<crate::wire::SysconfigReadResponse>,
3856 _: (),
3857 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3858 ::fidl_next::munge! {
3859 let crate::wire::SysconfigReadResponse {
3860 data,
3861
3862 } = out_;
3863 }
3864
3865 ::fidl_next::Encode::encode(&self.data, encoder_, data, ())?;
3866
3867 Ok(())
3868 }
3869 }
3870
3871 pub struct SysconfigWriteRequest<T0> {
3873 pub payload: T0,
3874 }
3875
3876 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SysconfigWriteRequest, ___E>
3877 for SysconfigWriteRequest<T0>
3878 where
3879 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3880 ___E: ::fidl_next::fuchsia::HandleEncoder,
3881 T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3882 {
3883 #[inline]
3884 fn encode(
3885 self,
3886 encoder_: &mut ___E,
3887 out_: &mut ::core::mem::MaybeUninit<crate::wire::SysconfigWriteRequest>,
3888 _: (),
3889 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3890 ::fidl_next::munge! {
3891 let crate::wire::SysconfigWriteRequest {
3892 payload,
3893
3894 } = out_;
3895 }
3896
3897 ::fidl_next::Encode::encode(self.payload, encoder_, payload, ())?;
3898
3899 Ok(())
3900 }
3901 }
3902
3903 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::SysconfigWriteRequest, ___E>
3904 for &'a SysconfigWriteRequest<T0>
3905 where
3906 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3907 ___E: ::fidl_next::fuchsia::HandleEncoder,
3908 &'a T0: ::fidl_next::Encode<::fidl_next_fuchsia_mem::wire::Buffer, ___E>,
3909 {
3910 #[inline]
3911 fn encode(
3912 self,
3913 encoder_: &mut ___E,
3914 out_: &mut ::core::mem::MaybeUninit<crate::wire::SysconfigWriteRequest>,
3915 _: (),
3916 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3917 ::fidl_next::munge! {
3918 let crate::wire::SysconfigWriteRequest {
3919 payload,
3920
3921 } = out_;
3922 }
3923
3924 ::fidl_next::Encode::encode(&self.payload, encoder_, payload, ())?;
3925
3926 Ok(())
3927 }
3928 }
3929}
3930
3931pub use self::natural::*;
3932
3933#[doc = " Protocol for reading and writing boot partitions.\n\n A note on DataSink.Flush() (and BootManager.Flush() coming after):\n\n Some platforms may implement the Flush() fidl interface of DataSink/BootManager. For these\n platforms, the update of some system images and A/B configuration is not persisted to storage\n immediately and only buffered internally when the write fidl interfaces return. The data is\n guaranteed to be persisted only after the Flush() interfaces are called.\n\n If not implemented, Flush() is no-op and system images and A/B configuration will be persisted\n to storage immediately after the write fidl interfaces return.\n\n For all platforms, it is guaranteed that if DataSink.Flush() is implemented, BootManager.Flush()\n is implemented as well. Therefore, in the context of system update, both of the following update\n sequences are safe in the sense that, new A/B configuration will not be persisted to storage\n before new system images.\n DataSink.Write[...]() --> DataSink.Flush() --> BootManager.Set[...]() --> BootManager.Flush()\n DataSink.Write[...]() --> BootManager.Set[...]() --> DataSink.Flush() --> BootManager.Flush()\n"]
3935#[derive(PartialEq, Debug)]
3936pub struct DataSink;
3937
3938#[cfg(target_os = "fuchsia")]
3939impl ::fidl_next::HasTransport for DataSink {
3940 type Transport = ::fidl_next::fuchsia::zx::Channel;
3941}
3942
3943pub mod data_sink {
3944 pub mod prelude {
3945 pub use crate::{
3946 DataSink, DataSinkClientHandler, DataSinkLocalClientHandler,
3947 DataSinkLocalServerHandler, DataSinkServerHandler, data_sink,
3948 };
3949
3950 pub use crate::natural::DataSinkFlushResponse;
3951
3952 pub use crate::natural::DataSinkReadAssetRequest;
3953
3954 pub use crate::natural::DataSinkReadFirmwareRequest;
3955
3956 pub use crate::natural::DataSinkWriteAssetRequest;
3957
3958 pub use crate::natural::DataSinkWriteAssetResponse;
3959
3960 pub use crate::natural::DataSinkWriteFirmwareRequest;
3961
3962 pub use crate::natural::DataSinkWriteFirmwareResponse;
3963
3964 pub use crate::natural::DataSinkWriteOpaqueVolumeRequest;
3965
3966 pub use crate::natural::DataSinkWriteSparseVolumeRequest;
3967
3968 pub use crate::natural::DataSinkReadAssetResponse;
3969
3970 pub use crate::natural::DataSinkReadFirmwareResponse;
3971
3972 pub use crate::natural::DataSinkWriteOpaqueVolumeResponse;
3973
3974 pub use crate::natural::DataSinkWriteSparseVolumeResponse;
3975 }
3976
3977 pub struct ReadAsset;
3978
3979 impl ::fidl_next::Method for ReadAsset {
3980 const ORDINAL: u64 = 1322408908668565656;
3981 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3982 ::fidl_next::protocol::Flexibility::Strict;
3983
3984 type Protocol = crate::DataSink;
3985
3986 type Request = crate::wire::DataSinkReadAssetRequest;
3987 }
3988
3989 impl ::fidl_next::TwoWayMethod for ReadAsset {
3990 type Response = ::fidl_next::wire::Result<
3991 'static,
3992 crate::wire::DataSinkReadAssetResponse,
3993 ::fidl_next::wire::fuchsia::Status,
3994 >;
3995 }
3996
3997 impl<___R> ::fidl_next::Respond<___R> for ReadAsset {
3998 type Output = ::core::result::Result<
3999 crate::generic::DataSinkReadAssetResponse<___R>,
4000 ::fidl_next::never::Never,
4001 >;
4002
4003 fn respond(response: ___R) -> Self::Output {
4004 ::core::result::Result::Ok(crate::generic::DataSinkReadAssetResponse {
4005 asset: response,
4006 })
4007 }
4008 }
4009
4010 impl<___R> ::fidl_next::RespondErr<___R> for ReadAsset {
4011 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4012
4013 fn respond_err(response: ___R) -> Self::Output {
4014 ::core::result::Result::Err(response)
4015 }
4016 }
4017
4018 pub struct WriteAsset;
4019
4020 impl ::fidl_next::Method for WriteAsset {
4021 const ORDINAL: u64 = 5866002073568727209;
4022 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4023 ::fidl_next::protocol::Flexibility::Strict;
4024
4025 type Protocol = crate::DataSink;
4026
4027 type Request = crate::wire::DataSinkWriteAssetRequest;
4028 }
4029
4030 impl ::fidl_next::TwoWayMethod for WriteAsset {
4031 type Response = ::fidl_next::wire::Strict<crate::wire::DataSinkWriteAssetResponse>;
4032 }
4033
4034 impl<___R> ::fidl_next::Respond<___R> for WriteAsset {
4035 type Output = ::fidl_next::Strict<crate::generic::DataSinkWriteAssetResponse<___R>>;
4036
4037 fn respond(response: ___R) -> Self::Output {
4038 ::fidl_next::Strict(crate::generic::DataSinkWriteAssetResponse { status: response })
4039 }
4040 }
4041
4042 pub struct WriteFirmware;
4043
4044 impl ::fidl_next::Method for WriteFirmware {
4045 const ORDINAL: u64 = 5857937666141634199;
4046 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4047 ::fidl_next::protocol::Flexibility::Strict;
4048
4049 type Protocol = crate::DataSink;
4050
4051 type Request = crate::wire::DataSinkWriteFirmwareRequest<'static>;
4052 }
4053
4054 impl ::fidl_next::TwoWayMethod for WriteFirmware {
4055 type Response = ::fidl_next::wire::Strict<crate::wire::DataSinkWriteFirmwareResponse>;
4056 }
4057
4058 impl<___R> ::fidl_next::Respond<___R> for WriteFirmware {
4059 type Output = ::fidl_next::Strict<crate::generic::DataSinkWriteFirmwareResponse<___R>>;
4060
4061 fn respond(response: ___R) -> Self::Output {
4062 ::fidl_next::Strict(crate::generic::DataSinkWriteFirmwareResponse { result: response })
4063 }
4064 }
4065
4066 pub struct ReadFirmware;
4067
4068 impl ::fidl_next::Method for ReadFirmware {
4069 const ORDINAL: u64 = 916059865846835651;
4070 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4071 ::fidl_next::protocol::Flexibility::Strict;
4072
4073 type Protocol = crate::DataSink;
4074
4075 type Request = crate::wire::DataSinkReadFirmwareRequest<'static>;
4076 }
4077
4078 impl ::fidl_next::TwoWayMethod for ReadFirmware {
4079 type Response = ::fidl_next::wire::Result<
4080 'static,
4081 crate::wire::DataSinkReadFirmwareResponse,
4082 ::fidl_next::wire::fuchsia::Status,
4083 >;
4084 }
4085
4086 impl<___R> ::fidl_next::Respond<___R> for ReadFirmware {
4087 type Output = ::core::result::Result<
4088 crate::generic::DataSinkReadFirmwareResponse<___R>,
4089 ::fidl_next::never::Never,
4090 >;
4091
4092 fn respond(response: ___R) -> Self::Output {
4093 ::core::result::Result::Ok(crate::generic::DataSinkReadFirmwareResponse {
4094 firmware: response,
4095 })
4096 }
4097 }
4098
4099 impl<___R> ::fidl_next::RespondErr<___R> for ReadFirmware {
4100 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4101
4102 fn respond_err(response: ___R) -> Self::Output {
4103 ::core::result::Result::Err(response)
4104 }
4105 }
4106
4107 pub struct WriteOpaqueVolume;
4108
4109 impl ::fidl_next::Method for WriteOpaqueVolume {
4110 const ORDINAL: u64 = 5225502591032888697;
4111 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4112 ::fidl_next::protocol::Flexibility::Strict;
4113
4114 type Protocol = crate::DataSink;
4115
4116 type Request = crate::wire::DataSinkWriteOpaqueVolumeRequest;
4117 }
4118
4119 impl ::fidl_next::TwoWayMethod for WriteOpaqueVolume {
4120 type Response = ::fidl_next::wire::Result<
4121 'static,
4122 crate::wire::DataSinkWriteOpaqueVolumeResponse,
4123 ::fidl_next::wire::fuchsia::Status,
4124 >;
4125 }
4126
4127 impl<___R> ::fidl_next::Respond<___R> for WriteOpaqueVolume {
4128 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4129
4130 fn respond(response: ___R) -> Self::Output {
4131 ::core::result::Result::Ok(response)
4132 }
4133 }
4134
4135 impl<___R> ::fidl_next::RespondErr<___R> for WriteOpaqueVolume {
4136 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4137
4138 fn respond_err(response: ___R) -> Self::Output {
4139 ::core::result::Result::Err(response)
4140 }
4141 }
4142
4143 pub struct WriteSparseVolume;
4144
4145 impl ::fidl_next::Method for WriteSparseVolume {
4146 const ORDINAL: u64 = 3751308758441123878;
4147 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4148 ::fidl_next::protocol::Flexibility::Strict;
4149
4150 type Protocol = crate::DataSink;
4151
4152 type Request = crate::wire::DataSinkWriteSparseVolumeRequest;
4153 }
4154
4155 impl ::fidl_next::TwoWayMethod for WriteSparseVolume {
4156 type Response = ::fidl_next::wire::Result<
4157 'static,
4158 crate::wire::DataSinkWriteSparseVolumeResponse,
4159 ::fidl_next::wire::fuchsia::Status,
4160 >;
4161 }
4162
4163 impl<___R> ::fidl_next::Respond<___R> for WriteSparseVolume {
4164 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4165
4166 fn respond(response: ___R) -> Self::Output {
4167 ::core::result::Result::Ok(response)
4168 }
4169 }
4170
4171 impl<___R> ::fidl_next::RespondErr<___R> for WriteSparseVolume {
4172 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4173
4174 fn respond_err(response: ___R) -> Self::Output {
4175 ::core::result::Result::Err(response)
4176 }
4177 }
4178
4179 pub struct Flush;
4180
4181 impl ::fidl_next::Method for Flush {
4182 const ORDINAL: u64 = 4276682289646022969;
4183 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4184 ::fidl_next::protocol::Flexibility::Strict;
4185
4186 type Protocol = crate::DataSink;
4187
4188 type Request = ::fidl_next::wire::EmptyMessageBody;
4189 }
4190
4191 impl ::fidl_next::TwoWayMethod for Flush {
4192 type Response = ::fidl_next::wire::Strict<crate::wire::DataSinkFlushResponse>;
4193 }
4194
4195 impl<___R> ::fidl_next::Respond<___R> for Flush {
4196 type Output = ::fidl_next::Strict<crate::generic::DataSinkFlushResponse<___R>>;
4197
4198 fn respond(response: ___R) -> Self::Output {
4199 ::fidl_next::Strict(crate::generic::DataSinkFlushResponse { status: response })
4200 }
4201 }
4202
4203 mod ___detail {
4204 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DataSink
4205 where
4206 ___T: ::fidl_next::Transport,
4207 {
4208 type Client = DataSinkClient<___T>;
4209 type Server = DataSinkServer<___T>;
4210 }
4211
4212 #[repr(transparent)]
4214 pub struct DataSinkClient<___T: ::fidl_next::Transport> {
4215 #[allow(dead_code)]
4216 client: ::fidl_next::protocol::Client<___T>,
4217 }
4218
4219 impl<___T> DataSinkClient<___T>
4220 where
4221 ___T: ::fidl_next::Transport,
4222 {
4223 #[doc = " Reads the partition corresponding to `configuration` and `asset` into a vmo and returns it.\n The size field of the returned `Buffer` will be the size of just the asset, if it can be\n determined. Otherwise, it will be the size of the entire partition.\n The size and stream size of the vmo in the returned `Buffer` will always be the size of the\n entire partition.\n"]
4224 pub fn read_asset(
4225 &self,
4226
4227 configuration: impl ::fidl_next::Encode<
4228 crate::wire::Configuration,
4229 <___T as ::fidl_next::Transport>::SendBuffer,
4230 >,
4231
4232 asset: impl ::fidl_next::Encode<
4233 crate::wire::Asset,
4234 <___T as ::fidl_next::Transport>::SendBuffer,
4235 >,
4236 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAsset, ___T>
4237 where
4238 <___T as ::fidl_next::Transport>::SendBuffer:
4239 ::fidl_next::encoder::InternalHandleEncoder,
4240 {
4241 self.read_asset_with(crate::generic::DataSinkReadAssetRequest {
4242 configuration,
4243
4244 asset,
4245 })
4246 }
4247
4248 #[doc = " Reads the partition corresponding to `configuration` and `asset` into a vmo and returns it.\n The size field of the returned `Buffer` will be the size of just the asset, if it can be\n determined. Otherwise, it will be the size of the entire partition.\n The size and stream size of the vmo in the returned `Buffer` will always be the size of the\n entire partition.\n"]
4249 pub fn read_asset_with<___R>(
4250 &self,
4251 request: ___R,
4252 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAsset, ___T>
4253 where
4254 ___R: ::fidl_next::Encode<
4255 crate::wire::DataSinkReadAssetRequest,
4256 <___T as ::fidl_next::Transport>::SendBuffer,
4257 >,
4258 {
4259 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4260 1322408908668565656,
4261 <super::ReadAsset as ::fidl_next::Method>::FLEXIBILITY,
4262 request,
4263 ))
4264 }
4265
4266 #[doc = " Writes partition corresponding to `configuration` and `asset` with data from `payload`.\n `payload` may need to be resized to the partition size, so the provided vmo must have\n been created with `ZX_VMO_RESIZABLE` or must be a child VMO that was created with\n `ZX_VMO_CHILD_RESIZABLE`. Will zero out rest of the partition if `payload` is smaller\n than the size of the partition being written.\n\n\n Returns `ZX_ERR_INVALID_ARGS` if `configuration` specifies active configuration.\n"]
4267 pub fn write_asset(
4268 &self,
4269
4270 configuration: impl ::fidl_next::Encode<
4271 crate::wire::Configuration,
4272 <___T as ::fidl_next::Transport>::SendBuffer,
4273 >,
4274
4275 asset: impl ::fidl_next::Encode<
4276 crate::wire::Asset,
4277 <___T as ::fidl_next::Transport>::SendBuffer,
4278 >,
4279
4280 payload: impl ::fidl_next::Encode<
4281 ::fidl_next_fuchsia_mem::wire::Buffer,
4282 <___T as ::fidl_next::Transport>::SendBuffer,
4283 >,
4284 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAsset, ___T>
4285 where
4286 <___T as ::fidl_next::Transport>::SendBuffer:
4287 ::fidl_next::encoder::InternalHandleEncoder,
4288 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4289 {
4290 self.write_asset_with(crate::generic::DataSinkWriteAssetRequest {
4291 configuration,
4292
4293 asset,
4294
4295 payload,
4296 })
4297 }
4298
4299 #[doc = " Writes partition corresponding to `configuration` and `asset` with data from `payload`.\n `payload` may need to be resized to the partition size, so the provided vmo must have\n been created with `ZX_VMO_RESIZABLE` or must be a child VMO that was created with\n `ZX_VMO_CHILD_RESIZABLE`. Will zero out rest of the partition if `payload` is smaller\n than the size of the partition being written.\n\n\n Returns `ZX_ERR_INVALID_ARGS` if `configuration` specifies active configuration.\n"]
4300 pub fn write_asset_with<___R>(
4301 &self,
4302 request: ___R,
4303 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAsset, ___T>
4304 where
4305 ___R: ::fidl_next::Encode<
4306 crate::wire::DataSinkWriteAssetRequest,
4307 <___T as ::fidl_next::Transport>::SendBuffer,
4308 >,
4309 {
4310 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4311 5866002073568727209,
4312 <super::WriteAsset as ::fidl_next::Method>::FLEXIBILITY,
4313 request,
4314 ))
4315 }
4316
4317 #[doc = " Writes firmware data from `payload`.\n\n `configuration` represents the A/B/R configuration. For platforms that do not support\n firmware A/B/R, the parameter will be ignored by the underlying device-specific logic .\n\n `type` is a device-specific string identifying the payload contents,\n used to select the proper paving logic. For example, a device with\n multiple bootloader stages might send them as separate calls to\n `WriteFirmware()`, differentiated by `type`. An empty string\n indicates the default type.\n\n `payload` may need to be resized to the partition size, so the provided\n vmo must have been created with `ZX_VMO_RESIZABLE` or must be a child\n VMO that was created with `ZX_VMO_CHILD_RESIZABLE`.\n"]
4318 pub fn write_firmware(
4319 &self,
4320
4321 configuration: impl ::fidl_next::Encode<
4322 crate::wire::Configuration,
4323 <___T as ::fidl_next::Transport>::SendBuffer,
4324 >,
4325
4326 type_: impl ::fidl_next::Encode<
4327 ::fidl_next::wire::String<'static>,
4328 <___T as ::fidl_next::Transport>::SendBuffer,
4329 >,
4330
4331 payload: impl ::fidl_next::Encode<
4332 ::fidl_next_fuchsia_mem::wire::Buffer,
4333 <___T as ::fidl_next::Transport>::SendBuffer,
4334 >,
4335 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteFirmware, ___T>
4336 where
4337 <___T as ::fidl_next::Transport>::SendBuffer:
4338 ::fidl_next::encoder::InternalHandleEncoder,
4339 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4340 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4341 {
4342 self.write_firmware_with(crate::generic::DataSinkWriteFirmwareRequest {
4343 configuration,
4344
4345 type_,
4346
4347 payload,
4348 })
4349 }
4350
4351 #[doc = " Writes firmware data from `payload`.\n\n `configuration` represents the A/B/R configuration. For platforms that do not support\n firmware A/B/R, the parameter will be ignored by the underlying device-specific logic .\n\n `type` is a device-specific string identifying the payload contents,\n used to select the proper paving logic. For example, a device with\n multiple bootloader stages might send them as separate calls to\n `WriteFirmware()`, differentiated by `type`. An empty string\n indicates the default type.\n\n `payload` may need to be resized to the partition size, so the provided\n vmo must have been created with `ZX_VMO_RESIZABLE` or must be a child\n VMO that was created with `ZX_VMO_CHILD_RESIZABLE`.\n"]
4352 pub fn write_firmware_with<___R>(
4353 &self,
4354 request: ___R,
4355 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteFirmware, ___T>
4356 where
4357 ___R: ::fidl_next::Encode<
4358 crate::wire::DataSinkWriteFirmwareRequest<'static>,
4359 <___T as ::fidl_next::Transport>::SendBuffer,
4360 >,
4361 {
4362 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4363 5857937666141634199,
4364 <super::WriteFirmware as ::fidl_next::Method>::FLEXIBILITY,
4365 request,
4366 ))
4367 }
4368
4369 #[doc = " Read firmware corresponding to `configuration` and `type`.\n\n Parameter `configuration` and `type` are the same as WriteFirmware.\n\n If ReadFirmware returns error, caller should assume that firmware image does not exist\n or is in a bad state, or firmware read is not defined for the product.\n"]
4370 pub fn read_firmware(
4371 &self,
4372
4373 configuration: impl ::fidl_next::Encode<
4374 crate::wire::Configuration,
4375 <___T as ::fidl_next::Transport>::SendBuffer,
4376 >,
4377
4378 type_: impl ::fidl_next::Encode<
4379 ::fidl_next::wire::String<'static>,
4380 <___T as ::fidl_next::Transport>::SendBuffer,
4381 >,
4382 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadFirmware, ___T>
4383 where
4384 <___T as ::fidl_next::Transport>::SendBuffer:
4385 ::fidl_next::encoder::InternalHandleEncoder,
4386 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4387 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4388 {
4389 self.read_firmware_with(crate::generic::DataSinkReadFirmwareRequest {
4390 configuration,
4391
4392 type_,
4393 })
4394 }
4395
4396 #[doc = " Read firmware corresponding to `configuration` and `type`.\n\n Parameter `configuration` and `type` are the same as WriteFirmware.\n\n If ReadFirmware returns error, caller should assume that firmware image does not exist\n or is in a bad state, or firmware read is not defined for the product.\n"]
4397 pub fn read_firmware_with<___R>(
4398 &self,
4399 request: ___R,
4400 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadFirmware, ___T>
4401 where
4402 ___R: ::fidl_next::Encode<
4403 crate::wire::DataSinkReadFirmwareRequest<'static>,
4404 <___T as ::fidl_next::Transport>::SendBuffer,
4405 >,
4406 {
4407 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4408 916059865846835651,
4409 <super::ReadFirmware as ::fidl_next::Method>::FLEXIBILITY,
4410 request,
4411 ))
4412 }
4413
4414 #[doc = " Write a raw volume image to the device. The image will be passed as it is to the device\n partitioner backend to write. Therefore the format and write logic for the image is up to\n the product to define. It differs from the legacy WriteVolume(), which was specifically\n for writing the FVM sparse image, in that the paver will not perform any FVM related\n parsing or other operation of the image. Thus it is not dependent on the volume driver\n version and less susceptible to an outdated paver.\n\n Returns ZX_ERR_NOT_SUPPORTED if the backend does not support opaque volume blobs.\n"]
4415 pub fn write_opaque_volume(
4416 &self,
4417
4418 payload: impl ::fidl_next::Encode<
4419 ::fidl_next_fuchsia_mem::wire::Buffer,
4420 <___T as ::fidl_next::Transport>::SendBuffer,
4421 >,
4422 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteOpaqueVolume, ___T>
4423 where
4424 <___T as ::fidl_next::Transport>::SendBuffer:
4425 ::fidl_next::encoder::InternalHandleEncoder,
4426 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4427 {
4428 self.write_opaque_volume_with(crate::generic::DataSinkWriteOpaqueVolumeRequest {
4429 payload,
4430 })
4431 }
4432
4433 #[doc = " Write a raw volume image to the device. The image will be passed as it is to the device\n partitioner backend to write. Therefore the format and write logic for the image is up to\n the product to define. It differs from the legacy WriteVolume(), which was specifically\n for writing the FVM sparse image, in that the paver will not perform any FVM related\n parsing or other operation of the image. Thus it is not dependent on the volume driver\n version and less susceptible to an outdated paver.\n\n Returns ZX_ERR_NOT_SUPPORTED if the backend does not support opaque volume blobs.\n"]
4434 pub fn write_opaque_volume_with<___R>(
4435 &self,
4436 request: ___R,
4437 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteOpaqueVolume, ___T>
4438 where
4439 ___R: ::fidl_next::Encode<
4440 crate::wire::DataSinkWriteOpaqueVolumeRequest,
4441 <___T as ::fidl_next::Transport>::SendBuffer,
4442 >,
4443 {
4444 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4445 5225502591032888697,
4446 <super::WriteOpaqueVolume as ::fidl_next::Method>::FLEXIBILITY,
4447 request,
4448 ))
4449 }
4450
4451 #[doc = " Writes an image in the Android Sparse format. Identical in behaviour to\n `WriteOpaqueVolume`, except the contents of `payload` are parsed as a sparse image and\n unpacked before being written to disk.\n"]
4452 pub fn write_sparse_volume(
4453 &self,
4454
4455 payload: impl ::fidl_next::Encode<
4456 ::fidl_next_fuchsia_mem::wire::Buffer,
4457 <___T as ::fidl_next::Transport>::SendBuffer,
4458 >,
4459 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteSparseVolume, ___T>
4460 where
4461 <___T as ::fidl_next::Transport>::SendBuffer:
4462 ::fidl_next::encoder::InternalHandleEncoder,
4463 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4464 {
4465 self.write_sparse_volume_with(crate::generic::DataSinkWriteSparseVolumeRequest {
4466 payload,
4467 })
4468 }
4469
4470 #[doc = " Writes an image in the Android Sparse format. Identical in behaviour to\n `WriteOpaqueVolume`, except the contents of `payload` are parsed as a sparse image and\n unpacked before being written to disk.\n"]
4471 pub fn write_sparse_volume_with<___R>(
4472 &self,
4473 request: ___R,
4474 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteSparseVolume, ___T>
4475 where
4476 ___R: ::fidl_next::Encode<
4477 crate::wire::DataSinkWriteSparseVolumeRequest,
4478 <___T as ::fidl_next::Transport>::SendBuffer,
4479 >,
4480 {
4481 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4482 3751308758441123878,
4483 <super::WriteSparseVolume as ::fidl_next::Method>::FLEXIBILITY,
4484 request,
4485 ))
4486 }
4487
4488 #[doc = " Flush all previously buffered writes to persistent storage.\n"]
4489 pub fn flush(&self) -> ::fidl_next::TwoWayFuture<'_, super::Flush, ___T> {
4490 ::fidl_next::TwoWayFuture::from_untyped(
4491 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4492 4276682289646022969,
4493 <super::Flush as ::fidl_next::Method>::FLEXIBILITY,
4494 (),
4495 ),
4496 )
4497 }
4498 }
4499
4500 #[repr(transparent)]
4502 pub struct DataSinkServer<___T: ::fidl_next::Transport> {
4503 server: ::fidl_next::protocol::Server<___T>,
4504 }
4505
4506 impl<___T> DataSinkServer<___T> where ___T: ::fidl_next::Transport {}
4507 }
4508}
4509
4510#[diagnostic::on_unimplemented(
4511 note = "If {Self} implements the non-local DataSinkClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4512)]
4513
4514pub trait DataSinkLocalClientHandler<
4518 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4519 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4520>
4521{
4522}
4523
4524impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DataSink
4525where
4526 ___H: DataSinkLocalClientHandler<___T>,
4527 ___T: ::fidl_next::Transport,
4528{
4529 async fn on_event(
4530 handler: &mut ___H,
4531 mut message: ::fidl_next::Message<___T>,
4532 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4533 match *message.header().ordinal {
4534 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4535 }
4536 }
4537}
4538
4539#[diagnostic::on_unimplemented(
4540 note = "If {Self} implements the non-local DataSinkServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4541)]
4542
4543pub trait DataSinkLocalServerHandler<
4547 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4548 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4549>
4550{
4551 #[doc = " Reads the partition corresponding to `configuration` and `asset` into a vmo and returns it.\n The size field of the returned `Buffer` will be the size of just the asset, if it can be\n determined. Otherwise, it will be the size of the entire partition.\n The size and stream size of the vmo in the returned `Buffer` will always be the size of the\n entire partition.\n"]
4552 fn read_asset(
4553 &mut self,
4554
4555 request: ::fidl_next::Request<data_sink::ReadAsset, ___T>,
4556
4557 responder: ::fidl_next::Responder<data_sink::ReadAsset, ___T>,
4558 ) -> impl ::core::future::Future<Output = ()>;
4559
4560 #[doc = " Writes partition corresponding to `configuration` and `asset` with data from `payload`.\n `payload` may need to be resized to the partition size, so the provided vmo must have\n been created with `ZX_VMO_RESIZABLE` or must be a child VMO that was created with\n `ZX_VMO_CHILD_RESIZABLE`. Will zero out rest of the partition if `payload` is smaller\n than the size of the partition being written.\n\n\n Returns `ZX_ERR_INVALID_ARGS` if `configuration` specifies active configuration.\n"]
4561 fn write_asset(
4562 &mut self,
4563
4564 request: ::fidl_next::Request<data_sink::WriteAsset, ___T>,
4565
4566 responder: ::fidl_next::Responder<data_sink::WriteAsset, ___T>,
4567 ) -> impl ::core::future::Future<Output = ()>;
4568
4569 #[doc = " Writes firmware data from `payload`.\n\n `configuration` represents the A/B/R configuration. For platforms that do not support\n firmware A/B/R, the parameter will be ignored by the underlying device-specific logic .\n\n `type` is a device-specific string identifying the payload contents,\n used to select the proper paving logic. For example, a device with\n multiple bootloader stages might send them as separate calls to\n `WriteFirmware()`, differentiated by `type`. An empty string\n indicates the default type.\n\n `payload` may need to be resized to the partition size, so the provided\n vmo must have been created with `ZX_VMO_RESIZABLE` or must be a child\n VMO that was created with `ZX_VMO_CHILD_RESIZABLE`.\n"]
4570 fn write_firmware(
4571 &mut self,
4572
4573 request: ::fidl_next::Request<data_sink::WriteFirmware, ___T>,
4574
4575 responder: ::fidl_next::Responder<data_sink::WriteFirmware, ___T>,
4576 ) -> impl ::core::future::Future<Output = ()>;
4577
4578 #[doc = " Read firmware corresponding to `configuration` and `type`.\n\n Parameter `configuration` and `type` are the same as WriteFirmware.\n\n If ReadFirmware returns error, caller should assume that firmware image does not exist\n or is in a bad state, or firmware read is not defined for the product.\n"]
4579 fn read_firmware(
4580 &mut self,
4581
4582 request: ::fidl_next::Request<data_sink::ReadFirmware, ___T>,
4583
4584 responder: ::fidl_next::Responder<data_sink::ReadFirmware, ___T>,
4585 ) -> impl ::core::future::Future<Output = ()>;
4586
4587 #[doc = " Write a raw volume image to the device. The image will be passed as it is to the device\n partitioner backend to write. Therefore the format and write logic for the image is up to\n the product to define. It differs from the legacy WriteVolume(), which was specifically\n for writing the FVM sparse image, in that the paver will not perform any FVM related\n parsing or other operation of the image. Thus it is not dependent on the volume driver\n version and less susceptible to an outdated paver.\n\n Returns ZX_ERR_NOT_SUPPORTED if the backend does not support opaque volume blobs.\n"]
4588 fn write_opaque_volume(
4589 &mut self,
4590
4591 request: ::fidl_next::Request<data_sink::WriteOpaqueVolume, ___T>,
4592
4593 responder: ::fidl_next::Responder<data_sink::WriteOpaqueVolume, ___T>,
4594 ) -> impl ::core::future::Future<Output = ()>;
4595
4596 #[doc = " Writes an image in the Android Sparse format. Identical in behaviour to\n `WriteOpaqueVolume`, except the contents of `payload` are parsed as a sparse image and\n unpacked before being written to disk.\n"]
4597 fn write_sparse_volume(
4598 &mut self,
4599
4600 request: ::fidl_next::Request<data_sink::WriteSparseVolume, ___T>,
4601
4602 responder: ::fidl_next::Responder<data_sink::WriteSparseVolume, ___T>,
4603 ) -> impl ::core::future::Future<Output = ()>;
4604
4605 #[doc = " Flush all previously buffered writes to persistent storage.\n"]
4606 fn flush(
4607 &mut self,
4608
4609 responder: ::fidl_next::Responder<data_sink::Flush, ___T>,
4610 ) -> impl ::core::future::Future<Output = ()>;
4611}
4612
4613impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DataSink
4614where
4615 ___H: DataSinkLocalServerHandler<___T>,
4616 ___T: ::fidl_next::Transport,
4617 for<'de> crate::wire::DataSinkReadAssetRequest: ::fidl_next::Decode<
4618 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4619 Constraint = (),
4620 >,
4621 for<'de> crate::wire::DataSinkWriteAssetRequest: ::fidl_next::Decode<
4622 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4623 Constraint = (),
4624 >,
4625 for<'de> crate::wire::DataSinkWriteFirmwareRequest<'de>: ::fidl_next::Decode<
4626 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4627 Constraint = (),
4628 >,
4629 for<'de> crate::wire::DataSinkReadFirmwareRequest<'de>: ::fidl_next::Decode<
4630 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4631 Constraint = (),
4632 >,
4633 for<'de> crate::wire::DataSinkWriteOpaqueVolumeRequest: ::fidl_next::Decode<
4634 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4635 Constraint = (),
4636 >,
4637 for<'de> crate::wire::DataSinkWriteSparseVolumeRequest: ::fidl_next::Decode<
4638 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4639 Constraint = (),
4640 >,
4641{
4642 async fn on_one_way(
4643 handler: &mut ___H,
4644 mut message: ::fidl_next::Message<___T>,
4645 ) -> ::core::result::Result<
4646 (),
4647 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4648 > {
4649 match *message.header().ordinal {
4650 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4651 }
4652 }
4653
4654 async fn on_two_way(
4655 handler: &mut ___H,
4656 mut message: ::fidl_next::Message<___T>,
4657 responder: ::fidl_next::protocol::Responder<___T>,
4658 ) -> ::core::result::Result<
4659 (),
4660 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4661 > {
4662 match *message.header().ordinal {
4663 1322408908668565656 => {
4664 let responder = ::fidl_next::Responder::from_untyped(responder);
4665
4666 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4667 Ok(decoded) => {
4668 handler
4669 .read_asset(::fidl_next::Request::from_decoded(decoded), responder)
4670 .await;
4671 Ok(())
4672 }
4673 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4674 ordinal: 1322408908668565656,
4675 error,
4676 }),
4677 }
4678 }
4679
4680 5866002073568727209 => {
4681 let responder = ::fidl_next::Responder::from_untyped(responder);
4682
4683 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4684 Ok(decoded) => {
4685 handler
4686 .write_asset(::fidl_next::Request::from_decoded(decoded), responder)
4687 .await;
4688 Ok(())
4689 }
4690 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4691 ordinal: 5866002073568727209,
4692 error,
4693 }),
4694 }
4695 }
4696
4697 5857937666141634199 => {
4698 let responder = ::fidl_next::Responder::from_untyped(responder);
4699
4700 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4701 Ok(decoded) => {
4702 handler
4703 .write_firmware(::fidl_next::Request::from_decoded(decoded), responder)
4704 .await;
4705 Ok(())
4706 }
4707 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4708 ordinal: 5857937666141634199,
4709 error,
4710 }),
4711 }
4712 }
4713
4714 916059865846835651 => {
4715 let responder = ::fidl_next::Responder::from_untyped(responder);
4716
4717 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4718 Ok(decoded) => {
4719 handler
4720 .read_firmware(::fidl_next::Request::from_decoded(decoded), responder)
4721 .await;
4722 Ok(())
4723 }
4724 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4725 ordinal: 916059865846835651,
4726 error,
4727 }),
4728 }
4729 }
4730
4731 5225502591032888697 => {
4732 let responder = ::fidl_next::Responder::from_untyped(responder);
4733
4734 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4735 Ok(decoded) => {
4736 handler
4737 .write_opaque_volume(
4738 ::fidl_next::Request::from_decoded(decoded),
4739 responder,
4740 )
4741 .await;
4742 Ok(())
4743 }
4744 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4745 ordinal: 5225502591032888697,
4746 error,
4747 }),
4748 }
4749 }
4750
4751 3751308758441123878 => {
4752 let responder = ::fidl_next::Responder::from_untyped(responder);
4753
4754 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4755 Ok(decoded) => {
4756 handler
4757 .write_sparse_volume(
4758 ::fidl_next::Request::from_decoded(decoded),
4759 responder,
4760 )
4761 .await;
4762 Ok(())
4763 }
4764 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4765 ordinal: 3751308758441123878,
4766 error,
4767 }),
4768 }
4769 }
4770
4771 4276682289646022969 => {
4772 let responder = ::fidl_next::Responder::from_untyped(responder);
4773
4774 handler.flush(responder).await;
4775 Ok(())
4776 }
4777
4778 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4779 }
4780 }
4781}
4782
4783pub trait DataSinkClientHandler<
4787 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4788 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4789>
4790{
4791}
4792
4793impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DataSink
4794where
4795 ___H: DataSinkClientHandler<___T> + ::core::marker::Send,
4796 ___T: ::fidl_next::Transport,
4797{
4798 async fn on_event(
4799 handler: &mut ___H,
4800 mut message: ::fidl_next::Message<___T>,
4801 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4802 match *message.header().ordinal {
4803 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4804 }
4805 }
4806}
4807
4808pub trait DataSinkServerHandler<
4812 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4813 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4814>
4815{
4816 #[doc = " Reads the partition corresponding to `configuration` and `asset` into a vmo and returns it.\n The size field of the returned `Buffer` will be the size of just the asset, if it can be\n determined. Otherwise, it will be the size of the entire partition.\n The size and stream size of the vmo in the returned `Buffer` will always be the size of the\n entire partition.\n"]
4817 fn read_asset(
4818 &mut self,
4819
4820 request: ::fidl_next::Request<data_sink::ReadAsset, ___T>,
4821
4822 responder: ::fidl_next::Responder<data_sink::ReadAsset, ___T>,
4823 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4824
4825 #[doc = " Writes partition corresponding to `configuration` and `asset` with data from `payload`.\n `payload` may need to be resized to the partition size, so the provided vmo must have\n been created with `ZX_VMO_RESIZABLE` or must be a child VMO that was created with\n `ZX_VMO_CHILD_RESIZABLE`. Will zero out rest of the partition if `payload` is smaller\n than the size of the partition being written.\n\n\n Returns `ZX_ERR_INVALID_ARGS` if `configuration` specifies active configuration.\n"]
4826 fn write_asset(
4827 &mut self,
4828
4829 request: ::fidl_next::Request<data_sink::WriteAsset, ___T>,
4830
4831 responder: ::fidl_next::Responder<data_sink::WriteAsset, ___T>,
4832 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4833
4834 #[doc = " Writes firmware data from `payload`.\n\n `configuration` represents the A/B/R configuration. For platforms that do not support\n firmware A/B/R, the parameter will be ignored by the underlying device-specific logic .\n\n `type` is a device-specific string identifying the payload contents,\n used to select the proper paving logic. For example, a device with\n multiple bootloader stages might send them as separate calls to\n `WriteFirmware()`, differentiated by `type`. An empty string\n indicates the default type.\n\n `payload` may need to be resized to the partition size, so the provided\n vmo must have been created with `ZX_VMO_RESIZABLE` or must be a child\n VMO that was created with `ZX_VMO_CHILD_RESIZABLE`.\n"]
4835 fn write_firmware(
4836 &mut self,
4837
4838 request: ::fidl_next::Request<data_sink::WriteFirmware, ___T>,
4839
4840 responder: ::fidl_next::Responder<data_sink::WriteFirmware, ___T>,
4841 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4842
4843 #[doc = " Read firmware corresponding to `configuration` and `type`.\n\n Parameter `configuration` and `type` are the same as WriteFirmware.\n\n If ReadFirmware returns error, caller should assume that firmware image does not exist\n or is in a bad state, or firmware read is not defined for the product.\n"]
4844 fn read_firmware(
4845 &mut self,
4846
4847 request: ::fidl_next::Request<data_sink::ReadFirmware, ___T>,
4848
4849 responder: ::fidl_next::Responder<data_sink::ReadFirmware, ___T>,
4850 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4851
4852 #[doc = " Write a raw volume image to the device. The image will be passed as it is to the device\n partitioner backend to write. Therefore the format and write logic for the image is up to\n the product to define. It differs from the legacy WriteVolume(), which was specifically\n for writing the FVM sparse image, in that the paver will not perform any FVM related\n parsing or other operation of the image. Thus it is not dependent on the volume driver\n version and less susceptible to an outdated paver.\n\n Returns ZX_ERR_NOT_SUPPORTED if the backend does not support opaque volume blobs.\n"]
4853 fn write_opaque_volume(
4854 &mut self,
4855
4856 request: ::fidl_next::Request<data_sink::WriteOpaqueVolume, ___T>,
4857
4858 responder: ::fidl_next::Responder<data_sink::WriteOpaqueVolume, ___T>,
4859 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4860
4861 #[doc = " Writes an image in the Android Sparse format. Identical in behaviour to\n `WriteOpaqueVolume`, except the contents of `payload` are parsed as a sparse image and\n unpacked before being written to disk.\n"]
4862 fn write_sparse_volume(
4863 &mut self,
4864
4865 request: ::fidl_next::Request<data_sink::WriteSparseVolume, ___T>,
4866
4867 responder: ::fidl_next::Responder<data_sink::WriteSparseVolume, ___T>,
4868 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4869
4870 #[doc = " Flush all previously buffered writes to persistent storage.\n"]
4871 fn flush(
4872 &mut self,
4873
4874 responder: ::fidl_next::Responder<data_sink::Flush, ___T>,
4875 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4876}
4877
4878impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DataSink
4879where
4880 ___H: DataSinkServerHandler<___T> + ::core::marker::Send,
4881 ___T: ::fidl_next::Transport,
4882 for<'de> crate::wire::DataSinkReadAssetRequest: ::fidl_next::Decode<
4883 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4884 Constraint = (),
4885 >,
4886 for<'de> crate::wire::DataSinkWriteAssetRequest: ::fidl_next::Decode<
4887 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4888 Constraint = (),
4889 >,
4890 for<'de> crate::wire::DataSinkWriteFirmwareRequest<'de>: ::fidl_next::Decode<
4891 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4892 Constraint = (),
4893 >,
4894 for<'de> crate::wire::DataSinkReadFirmwareRequest<'de>: ::fidl_next::Decode<
4895 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4896 Constraint = (),
4897 >,
4898 for<'de> crate::wire::DataSinkWriteOpaqueVolumeRequest: ::fidl_next::Decode<
4899 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4900 Constraint = (),
4901 >,
4902 for<'de> crate::wire::DataSinkWriteSparseVolumeRequest: ::fidl_next::Decode<
4903 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4904 Constraint = (),
4905 >,
4906{
4907 async fn on_one_way(
4908 handler: &mut ___H,
4909 mut message: ::fidl_next::Message<___T>,
4910 ) -> ::core::result::Result<
4911 (),
4912 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4913 > {
4914 match *message.header().ordinal {
4915 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4916 }
4917 }
4918
4919 async fn on_two_way(
4920 handler: &mut ___H,
4921 mut message: ::fidl_next::Message<___T>,
4922 responder: ::fidl_next::protocol::Responder<___T>,
4923 ) -> ::core::result::Result<
4924 (),
4925 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4926 > {
4927 match *message.header().ordinal {
4928 1322408908668565656 => {
4929 let responder = ::fidl_next::Responder::from_untyped(responder);
4930
4931 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4932 Ok(decoded) => {
4933 handler
4934 .read_asset(::fidl_next::Request::from_decoded(decoded), responder)
4935 .await;
4936 Ok(())
4937 }
4938 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4939 ordinal: 1322408908668565656,
4940 error,
4941 }),
4942 }
4943 }
4944
4945 5866002073568727209 => {
4946 let responder = ::fidl_next::Responder::from_untyped(responder);
4947
4948 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4949 Ok(decoded) => {
4950 handler
4951 .write_asset(::fidl_next::Request::from_decoded(decoded), responder)
4952 .await;
4953 Ok(())
4954 }
4955 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4956 ordinal: 5866002073568727209,
4957 error,
4958 }),
4959 }
4960 }
4961
4962 5857937666141634199 => {
4963 let responder = ::fidl_next::Responder::from_untyped(responder);
4964
4965 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4966 Ok(decoded) => {
4967 handler
4968 .write_firmware(::fidl_next::Request::from_decoded(decoded), responder)
4969 .await;
4970 Ok(())
4971 }
4972 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4973 ordinal: 5857937666141634199,
4974 error,
4975 }),
4976 }
4977 }
4978
4979 916059865846835651 => {
4980 let responder = ::fidl_next::Responder::from_untyped(responder);
4981
4982 match ::fidl_next::AsDecoderExt::into_decoded(message) {
4983 Ok(decoded) => {
4984 handler
4985 .read_firmware(::fidl_next::Request::from_decoded(decoded), responder)
4986 .await;
4987 Ok(())
4988 }
4989 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4990 ordinal: 916059865846835651,
4991 error,
4992 }),
4993 }
4994 }
4995
4996 5225502591032888697 => {
4997 let responder = ::fidl_next::Responder::from_untyped(responder);
4998
4999 match ::fidl_next::AsDecoderExt::into_decoded(message) {
5000 Ok(decoded) => {
5001 handler
5002 .write_opaque_volume(
5003 ::fidl_next::Request::from_decoded(decoded),
5004 responder,
5005 )
5006 .await;
5007 Ok(())
5008 }
5009 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5010 ordinal: 5225502591032888697,
5011 error,
5012 }),
5013 }
5014 }
5015
5016 3751308758441123878 => {
5017 let responder = ::fidl_next::Responder::from_untyped(responder);
5018
5019 match ::fidl_next::AsDecoderExt::into_decoded(message) {
5020 Ok(decoded) => {
5021 handler
5022 .write_sparse_volume(
5023 ::fidl_next::Request::from_decoded(decoded),
5024 responder,
5025 )
5026 .await;
5027 Ok(())
5028 }
5029 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5030 ordinal: 3751308758441123878,
5031 error,
5032 }),
5033 }
5034 }
5035
5036 4276682289646022969 => {
5037 let responder = ::fidl_next::Responder::from_untyped(responder);
5038
5039 handler.flush(responder).await;
5040 Ok(())
5041 }
5042
5043 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5044 }
5045 }
5046}
5047
5048impl<___T> DataSinkClientHandler<___T> for ::fidl_next::IgnoreEvents where
5049 ___T: ::fidl_next::Transport
5050{
5051}
5052
5053impl<___H, ___T> DataSinkLocalClientHandler<___T> for ::fidl_next::Local<___H>
5054where
5055 ___H: DataSinkClientHandler<___T>,
5056 ___T: ::fidl_next::Transport,
5057{
5058}
5059
5060impl<___H, ___T> DataSinkLocalServerHandler<___T> for ::fidl_next::Local<___H>
5061where
5062 ___H: DataSinkServerHandler<___T>,
5063 ___T: ::fidl_next::Transport,
5064{
5065 async fn read_asset(
5066 &mut self,
5067
5068 request: ::fidl_next::Request<data_sink::ReadAsset, ___T>,
5069
5070 responder: ::fidl_next::Responder<data_sink::ReadAsset, ___T>,
5071 ) {
5072 ___H::read_asset(&mut self.0, request, responder).await
5073 }
5074
5075 async fn write_asset(
5076 &mut self,
5077
5078 request: ::fidl_next::Request<data_sink::WriteAsset, ___T>,
5079
5080 responder: ::fidl_next::Responder<data_sink::WriteAsset, ___T>,
5081 ) {
5082 ___H::write_asset(&mut self.0, request, responder).await
5083 }
5084
5085 async fn write_firmware(
5086 &mut self,
5087
5088 request: ::fidl_next::Request<data_sink::WriteFirmware, ___T>,
5089
5090 responder: ::fidl_next::Responder<data_sink::WriteFirmware, ___T>,
5091 ) {
5092 ___H::write_firmware(&mut self.0, request, responder).await
5093 }
5094
5095 async fn read_firmware(
5096 &mut self,
5097
5098 request: ::fidl_next::Request<data_sink::ReadFirmware, ___T>,
5099
5100 responder: ::fidl_next::Responder<data_sink::ReadFirmware, ___T>,
5101 ) {
5102 ___H::read_firmware(&mut self.0, request, responder).await
5103 }
5104
5105 async fn write_opaque_volume(
5106 &mut self,
5107
5108 request: ::fidl_next::Request<data_sink::WriteOpaqueVolume, ___T>,
5109
5110 responder: ::fidl_next::Responder<data_sink::WriteOpaqueVolume, ___T>,
5111 ) {
5112 ___H::write_opaque_volume(&mut self.0, request, responder).await
5113 }
5114
5115 async fn write_sparse_volume(
5116 &mut self,
5117
5118 request: ::fidl_next::Request<data_sink::WriteSparseVolume, ___T>,
5119
5120 responder: ::fidl_next::Responder<data_sink::WriteSparseVolume, ___T>,
5121 ) {
5122 ___H::write_sparse_volume(&mut self.0, request, responder).await
5123 }
5124
5125 async fn flush(&mut self, responder: ::fidl_next::Responder<data_sink::Flush, ___T>) {
5126 ___H::flush(&mut self.0, responder).await
5127 }
5128}
5129
5130#[doc = " Specialized DataSink with dynamic partition tables.\n"]
5132#[derive(PartialEq, Debug)]
5133pub struct DynamicDataSink;
5134
5135#[cfg(target_os = "fuchsia")]
5136impl ::fidl_next::HasTransport for DynamicDataSink {
5137 type Transport = ::fidl_next::fuchsia::zx::Channel;
5138}
5139
5140pub mod dynamic_data_sink {
5141 pub mod prelude {
5142 pub use crate::{
5143 DynamicDataSink, DynamicDataSinkClientHandler, DynamicDataSinkLocalClientHandler,
5144 DynamicDataSinkLocalServerHandler, DynamicDataSinkServerHandler, dynamic_data_sink,
5145 };
5146
5147 pub use crate::natural::DataSinkFlushResponse;
5148
5149 pub use crate::natural::DataSinkReadAssetRequest;
5150
5151 pub use crate::natural::DataSinkReadFirmwareRequest;
5152
5153 pub use crate::natural::DataSinkWriteAssetRequest;
5154
5155 pub use crate::natural::DataSinkWriteAssetResponse;
5156
5157 pub use crate::natural::DataSinkWriteFirmwareRequest;
5158
5159 pub use crate::natural::DataSinkWriteFirmwareResponse;
5160
5161 pub use crate::natural::DataSinkWriteOpaqueVolumeRequest;
5162
5163 pub use crate::natural::DataSinkWriteSparseVolumeRequest;
5164
5165 pub use crate::natural::DataSinkReadAssetResponse;
5166
5167 pub use crate::natural::DataSinkReadFirmwareResponse;
5168
5169 pub use crate::natural::DataSinkWriteOpaqueVolumeResponse;
5170
5171 pub use crate::natural::DataSinkWriteSparseVolumeResponse;
5172
5173 pub use crate::natural::DynamicDataSinkInitializePartitionTablesResponse;
5174
5175 pub use crate::natural::DynamicDataSinkWipePartitionTablesResponse;
5176 }
5177
5178 pub struct ReadAsset;
5179
5180 impl ::fidl_next::Method for ReadAsset {
5181 const ORDINAL: u64 = 1322408908668565656;
5182 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5183 ::fidl_next::protocol::Flexibility::Strict;
5184
5185 type Protocol = crate::DynamicDataSink;
5186
5187 type Request = crate::wire::DataSinkReadAssetRequest;
5188 }
5189
5190 impl ::fidl_next::TwoWayMethod for ReadAsset {
5191 type Response = ::fidl_next::wire::Result<
5192 'static,
5193 crate::wire::DataSinkReadAssetResponse,
5194 ::fidl_next::wire::fuchsia::Status,
5195 >;
5196 }
5197
5198 impl<___R> ::fidl_next::Respond<___R> for ReadAsset {
5199 type Output = ::core::result::Result<
5200 crate::generic::DataSinkReadAssetResponse<___R>,
5201 ::fidl_next::never::Never,
5202 >;
5203
5204 fn respond(response: ___R) -> Self::Output {
5205 ::core::result::Result::Ok(crate::generic::DataSinkReadAssetResponse {
5206 asset: response,
5207 })
5208 }
5209 }
5210
5211 impl<___R> ::fidl_next::RespondErr<___R> for ReadAsset {
5212 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5213
5214 fn respond_err(response: ___R) -> Self::Output {
5215 ::core::result::Result::Err(response)
5216 }
5217 }
5218
5219 pub struct WriteAsset;
5220
5221 impl ::fidl_next::Method for WriteAsset {
5222 const ORDINAL: u64 = 5866002073568727209;
5223 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5224 ::fidl_next::protocol::Flexibility::Strict;
5225
5226 type Protocol = crate::DynamicDataSink;
5227
5228 type Request = crate::wire::DataSinkWriteAssetRequest;
5229 }
5230
5231 impl ::fidl_next::TwoWayMethod for WriteAsset {
5232 type Response = ::fidl_next::wire::Strict<crate::wire::DataSinkWriteAssetResponse>;
5233 }
5234
5235 impl<___R> ::fidl_next::Respond<___R> for WriteAsset {
5236 type Output = ::fidl_next::Strict<crate::generic::DataSinkWriteAssetResponse<___R>>;
5237
5238 fn respond(response: ___R) -> Self::Output {
5239 ::fidl_next::Strict(crate::generic::DataSinkWriteAssetResponse { status: response })
5240 }
5241 }
5242
5243 pub struct WriteFirmware;
5244
5245 impl ::fidl_next::Method for WriteFirmware {
5246 const ORDINAL: u64 = 5857937666141634199;
5247 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5248 ::fidl_next::protocol::Flexibility::Strict;
5249
5250 type Protocol = crate::DynamicDataSink;
5251
5252 type Request = crate::wire::DataSinkWriteFirmwareRequest<'static>;
5253 }
5254
5255 impl ::fidl_next::TwoWayMethod for WriteFirmware {
5256 type Response = ::fidl_next::wire::Strict<crate::wire::DataSinkWriteFirmwareResponse>;
5257 }
5258
5259 impl<___R> ::fidl_next::Respond<___R> for WriteFirmware {
5260 type Output = ::fidl_next::Strict<crate::generic::DataSinkWriteFirmwareResponse<___R>>;
5261
5262 fn respond(response: ___R) -> Self::Output {
5263 ::fidl_next::Strict(crate::generic::DataSinkWriteFirmwareResponse { result: response })
5264 }
5265 }
5266
5267 pub struct ReadFirmware;
5268
5269 impl ::fidl_next::Method for ReadFirmware {
5270 const ORDINAL: u64 = 916059865846835651;
5271 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5272 ::fidl_next::protocol::Flexibility::Strict;
5273
5274 type Protocol = crate::DynamicDataSink;
5275
5276 type Request = crate::wire::DataSinkReadFirmwareRequest<'static>;
5277 }
5278
5279 impl ::fidl_next::TwoWayMethod for ReadFirmware {
5280 type Response = ::fidl_next::wire::Result<
5281 'static,
5282 crate::wire::DataSinkReadFirmwareResponse,
5283 ::fidl_next::wire::fuchsia::Status,
5284 >;
5285 }
5286
5287 impl<___R> ::fidl_next::Respond<___R> for ReadFirmware {
5288 type Output = ::core::result::Result<
5289 crate::generic::DataSinkReadFirmwareResponse<___R>,
5290 ::fidl_next::never::Never,
5291 >;
5292
5293 fn respond(response: ___R) -> Self::Output {
5294 ::core::result::Result::Ok(crate::generic::DataSinkReadFirmwareResponse {
5295 firmware: response,
5296 })
5297 }
5298 }
5299
5300 impl<___R> ::fidl_next::RespondErr<___R> for ReadFirmware {
5301 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5302
5303 fn respond_err(response: ___R) -> Self::Output {
5304 ::core::result::Result::Err(response)
5305 }
5306 }
5307
5308 pub struct WriteOpaqueVolume;
5309
5310 impl ::fidl_next::Method for WriteOpaqueVolume {
5311 const ORDINAL: u64 = 5225502591032888697;
5312 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5313 ::fidl_next::protocol::Flexibility::Strict;
5314
5315 type Protocol = crate::DynamicDataSink;
5316
5317 type Request = crate::wire::DataSinkWriteOpaqueVolumeRequest;
5318 }
5319
5320 impl ::fidl_next::TwoWayMethod for WriteOpaqueVolume {
5321 type Response = ::fidl_next::wire::Result<
5322 'static,
5323 crate::wire::DataSinkWriteOpaqueVolumeResponse,
5324 ::fidl_next::wire::fuchsia::Status,
5325 >;
5326 }
5327
5328 impl<___R> ::fidl_next::Respond<___R> for WriteOpaqueVolume {
5329 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5330
5331 fn respond(response: ___R) -> Self::Output {
5332 ::core::result::Result::Ok(response)
5333 }
5334 }
5335
5336 impl<___R> ::fidl_next::RespondErr<___R> for WriteOpaqueVolume {
5337 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5338
5339 fn respond_err(response: ___R) -> Self::Output {
5340 ::core::result::Result::Err(response)
5341 }
5342 }
5343
5344 pub struct WriteSparseVolume;
5345
5346 impl ::fidl_next::Method for WriteSparseVolume {
5347 const ORDINAL: u64 = 3751308758441123878;
5348 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5349 ::fidl_next::protocol::Flexibility::Strict;
5350
5351 type Protocol = crate::DynamicDataSink;
5352
5353 type Request = crate::wire::DataSinkWriteSparseVolumeRequest;
5354 }
5355
5356 impl ::fidl_next::TwoWayMethod for WriteSparseVolume {
5357 type Response = ::fidl_next::wire::Result<
5358 'static,
5359 crate::wire::DataSinkWriteSparseVolumeResponse,
5360 ::fidl_next::wire::fuchsia::Status,
5361 >;
5362 }
5363
5364 impl<___R> ::fidl_next::Respond<___R> for WriteSparseVolume {
5365 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5366
5367 fn respond(response: ___R) -> Self::Output {
5368 ::core::result::Result::Ok(response)
5369 }
5370 }
5371
5372 impl<___R> ::fidl_next::RespondErr<___R> for WriteSparseVolume {
5373 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5374
5375 fn respond_err(response: ___R) -> Self::Output {
5376 ::core::result::Result::Err(response)
5377 }
5378 }
5379
5380 pub struct Flush;
5381
5382 impl ::fidl_next::Method for Flush {
5383 const ORDINAL: u64 = 4276682289646022969;
5384 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5385 ::fidl_next::protocol::Flexibility::Strict;
5386
5387 type Protocol = crate::DynamicDataSink;
5388
5389 type Request = ::fidl_next::wire::EmptyMessageBody;
5390 }
5391
5392 impl ::fidl_next::TwoWayMethod for Flush {
5393 type Response = ::fidl_next::wire::Strict<crate::wire::DataSinkFlushResponse>;
5394 }
5395
5396 impl<___R> ::fidl_next::Respond<___R> for Flush {
5397 type Output = ::fidl_next::Strict<crate::generic::DataSinkFlushResponse<___R>>;
5398
5399 fn respond(response: ___R) -> Self::Output {
5400 ::fidl_next::Strict(crate::generic::DataSinkFlushResponse { status: response })
5401 }
5402 }
5403
5404 pub struct InitializePartitionTables;
5405
5406 impl ::fidl_next::Method for InitializePartitionTables {
5407 const ORDINAL: u64 = 5510588692033085310;
5408 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5409 ::fidl_next::protocol::Flexibility::Strict;
5410
5411 type Protocol = crate::DynamicDataSink;
5412
5413 type Request = ::fidl_next::wire::EmptyMessageBody;
5414 }
5415
5416 impl ::fidl_next::TwoWayMethod for InitializePartitionTables {
5417 type Response = ::fidl_next::wire::Strict<
5418 crate::wire::DynamicDataSinkInitializePartitionTablesResponse,
5419 >;
5420 }
5421
5422 impl<___R> ::fidl_next::Respond<___R> for InitializePartitionTables {
5423 type Output = ::fidl_next::Strict<
5424 crate::generic::DynamicDataSinkInitializePartitionTablesResponse<___R>,
5425 >;
5426
5427 fn respond(response: ___R) -> Self::Output {
5428 ::fidl_next::Strict(crate::generic::DynamicDataSinkInitializePartitionTablesResponse {
5429 status: response,
5430 })
5431 }
5432 }
5433
5434 pub struct WipePartitionTables;
5435
5436 impl ::fidl_next::Method for WipePartitionTables {
5437 const ORDINAL: u64 = 547117999305978572;
5438 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5439 ::fidl_next::protocol::Flexibility::Strict;
5440
5441 type Protocol = crate::DynamicDataSink;
5442
5443 type Request = ::fidl_next::wire::EmptyMessageBody;
5444 }
5445
5446 impl ::fidl_next::TwoWayMethod for WipePartitionTables {
5447 type Response =
5448 ::fidl_next::wire::Strict<crate::wire::DynamicDataSinkWipePartitionTablesResponse>;
5449 }
5450
5451 impl<___R> ::fidl_next::Respond<___R> for WipePartitionTables {
5452 type Output =
5453 ::fidl_next::Strict<crate::generic::DynamicDataSinkWipePartitionTablesResponse<___R>>;
5454
5455 fn respond(response: ___R) -> Self::Output {
5456 ::fidl_next::Strict(crate::generic::DynamicDataSinkWipePartitionTablesResponse {
5457 status: response,
5458 })
5459 }
5460 }
5461
5462 mod ___detail {
5463 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DynamicDataSink
5464 where
5465 ___T: ::fidl_next::Transport,
5466 {
5467 type Client = DynamicDataSinkClient<___T>;
5468 type Server = DynamicDataSinkServer<___T>;
5469 }
5470
5471 #[repr(transparent)]
5473 pub struct DynamicDataSinkClient<___T: ::fidl_next::Transport> {
5474 #[allow(dead_code)]
5475 client: ::fidl_next::protocol::Client<___T>,
5476 }
5477
5478 impl<___T> DynamicDataSinkClient<___T>
5479 where
5480 ___T: ::fidl_next::Transport,
5481 {
5482 #[doc = " Reads the partition corresponding to `configuration` and `asset` into a vmo and returns it.\n The size field of the returned `Buffer` will be the size of just the asset, if it can be\n determined. Otherwise, it will be the size of the entire partition.\n The size and stream size of the vmo in the returned `Buffer` will always be the size of the\n entire partition.\n"]
5483 pub fn read_asset(
5484 &self,
5485
5486 configuration: impl ::fidl_next::Encode<
5487 crate::wire::Configuration,
5488 <___T as ::fidl_next::Transport>::SendBuffer,
5489 >,
5490
5491 asset: impl ::fidl_next::Encode<
5492 crate::wire::Asset,
5493 <___T as ::fidl_next::Transport>::SendBuffer,
5494 >,
5495 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAsset, ___T>
5496 where
5497 <___T as ::fidl_next::Transport>::SendBuffer:
5498 ::fidl_next::encoder::InternalHandleEncoder,
5499 {
5500 self.read_asset_with(crate::generic::DataSinkReadAssetRequest {
5501 configuration,
5502
5503 asset,
5504 })
5505 }
5506
5507 #[doc = " Reads the partition corresponding to `configuration` and `asset` into a vmo and returns it.\n The size field of the returned `Buffer` will be the size of just the asset, if it can be\n determined. Otherwise, it will be the size of the entire partition.\n The size and stream size of the vmo in the returned `Buffer` will always be the size of the\n entire partition.\n"]
5508 pub fn read_asset_with<___R>(
5509 &self,
5510 request: ___R,
5511 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAsset, ___T>
5512 where
5513 ___R: ::fidl_next::Encode<
5514 crate::wire::DataSinkReadAssetRequest,
5515 <___T as ::fidl_next::Transport>::SendBuffer,
5516 >,
5517 {
5518 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5519 1322408908668565656,
5520 <super::ReadAsset as ::fidl_next::Method>::FLEXIBILITY,
5521 request,
5522 ))
5523 }
5524
5525 #[doc = " Writes partition corresponding to `configuration` and `asset` with data from `payload`.\n `payload` may need to be resized to the partition size, so the provided vmo must have\n been created with `ZX_VMO_RESIZABLE` or must be a child VMO that was created with\n `ZX_VMO_CHILD_RESIZABLE`. Will zero out rest of the partition if `payload` is smaller\n than the size of the partition being written.\n\n\n Returns `ZX_ERR_INVALID_ARGS` if `configuration` specifies active configuration.\n"]
5526 pub fn write_asset(
5527 &self,
5528
5529 configuration: impl ::fidl_next::Encode<
5530 crate::wire::Configuration,
5531 <___T as ::fidl_next::Transport>::SendBuffer,
5532 >,
5533
5534 asset: impl ::fidl_next::Encode<
5535 crate::wire::Asset,
5536 <___T as ::fidl_next::Transport>::SendBuffer,
5537 >,
5538
5539 payload: impl ::fidl_next::Encode<
5540 ::fidl_next_fuchsia_mem::wire::Buffer,
5541 <___T as ::fidl_next::Transport>::SendBuffer,
5542 >,
5543 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAsset, ___T>
5544 where
5545 <___T as ::fidl_next::Transport>::SendBuffer:
5546 ::fidl_next::encoder::InternalHandleEncoder,
5547 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5548 {
5549 self.write_asset_with(crate::generic::DataSinkWriteAssetRequest {
5550 configuration,
5551
5552 asset,
5553
5554 payload,
5555 })
5556 }
5557
5558 #[doc = " Writes partition corresponding to `configuration` and `asset` with data from `payload`.\n `payload` may need to be resized to the partition size, so the provided vmo must have\n been created with `ZX_VMO_RESIZABLE` or must be a child VMO that was created with\n `ZX_VMO_CHILD_RESIZABLE`. Will zero out rest of the partition if `payload` is smaller\n than the size of the partition being written.\n\n\n Returns `ZX_ERR_INVALID_ARGS` if `configuration` specifies active configuration.\n"]
5559 pub fn write_asset_with<___R>(
5560 &self,
5561 request: ___R,
5562 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAsset, ___T>
5563 where
5564 ___R: ::fidl_next::Encode<
5565 crate::wire::DataSinkWriteAssetRequest,
5566 <___T as ::fidl_next::Transport>::SendBuffer,
5567 >,
5568 {
5569 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5570 5866002073568727209,
5571 <super::WriteAsset as ::fidl_next::Method>::FLEXIBILITY,
5572 request,
5573 ))
5574 }
5575
5576 #[doc = " Writes firmware data from `payload`.\n\n `configuration` represents the A/B/R configuration. For platforms that do not support\n firmware A/B/R, the parameter will be ignored by the underlying device-specific logic .\n\n `type` is a device-specific string identifying the payload contents,\n used to select the proper paving logic. For example, a device with\n multiple bootloader stages might send them as separate calls to\n `WriteFirmware()`, differentiated by `type`. An empty string\n indicates the default type.\n\n `payload` may need to be resized to the partition size, so the provided\n vmo must have been created with `ZX_VMO_RESIZABLE` or must be a child\n VMO that was created with `ZX_VMO_CHILD_RESIZABLE`.\n"]
5577 pub fn write_firmware(
5578 &self,
5579
5580 configuration: impl ::fidl_next::Encode<
5581 crate::wire::Configuration,
5582 <___T as ::fidl_next::Transport>::SendBuffer,
5583 >,
5584
5585 type_: impl ::fidl_next::Encode<
5586 ::fidl_next::wire::String<'static>,
5587 <___T as ::fidl_next::Transport>::SendBuffer,
5588 >,
5589
5590 payload: impl ::fidl_next::Encode<
5591 ::fidl_next_fuchsia_mem::wire::Buffer,
5592 <___T as ::fidl_next::Transport>::SendBuffer,
5593 >,
5594 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteFirmware, ___T>
5595 where
5596 <___T as ::fidl_next::Transport>::SendBuffer:
5597 ::fidl_next::encoder::InternalHandleEncoder,
5598 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5599 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5600 {
5601 self.write_firmware_with(crate::generic::DataSinkWriteFirmwareRequest {
5602 configuration,
5603
5604 type_,
5605
5606 payload,
5607 })
5608 }
5609
5610 #[doc = " Writes firmware data from `payload`.\n\n `configuration` represents the A/B/R configuration. For platforms that do not support\n firmware A/B/R, the parameter will be ignored by the underlying device-specific logic .\n\n `type` is a device-specific string identifying the payload contents,\n used to select the proper paving logic. For example, a device with\n multiple bootloader stages might send them as separate calls to\n `WriteFirmware()`, differentiated by `type`. An empty string\n indicates the default type.\n\n `payload` may need to be resized to the partition size, so the provided\n vmo must have been created with `ZX_VMO_RESIZABLE` or must be a child\n VMO that was created with `ZX_VMO_CHILD_RESIZABLE`.\n"]
5611 pub fn write_firmware_with<___R>(
5612 &self,
5613 request: ___R,
5614 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteFirmware, ___T>
5615 where
5616 ___R: ::fidl_next::Encode<
5617 crate::wire::DataSinkWriteFirmwareRequest<'static>,
5618 <___T as ::fidl_next::Transport>::SendBuffer,
5619 >,
5620 {
5621 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5622 5857937666141634199,
5623 <super::WriteFirmware as ::fidl_next::Method>::FLEXIBILITY,
5624 request,
5625 ))
5626 }
5627
5628 #[doc = " Read firmware corresponding to `configuration` and `type`.\n\n Parameter `configuration` and `type` are the same as WriteFirmware.\n\n If ReadFirmware returns error, caller should assume that firmware image does not exist\n or is in a bad state, or firmware read is not defined for the product.\n"]
5629 pub fn read_firmware(
5630 &self,
5631
5632 configuration: impl ::fidl_next::Encode<
5633 crate::wire::Configuration,
5634 <___T as ::fidl_next::Transport>::SendBuffer,
5635 >,
5636
5637 type_: impl ::fidl_next::Encode<
5638 ::fidl_next::wire::String<'static>,
5639 <___T as ::fidl_next::Transport>::SendBuffer,
5640 >,
5641 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadFirmware, ___T>
5642 where
5643 <___T as ::fidl_next::Transport>::SendBuffer:
5644 ::fidl_next::encoder::InternalHandleEncoder,
5645 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5646 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5647 {
5648 self.read_firmware_with(crate::generic::DataSinkReadFirmwareRequest {
5649 configuration,
5650
5651 type_,
5652 })
5653 }
5654
5655 #[doc = " Read firmware corresponding to `configuration` and `type`.\n\n Parameter `configuration` and `type` are the same as WriteFirmware.\n\n If ReadFirmware returns error, caller should assume that firmware image does not exist\n or is in a bad state, or firmware read is not defined for the product.\n"]
5656 pub fn read_firmware_with<___R>(
5657 &self,
5658 request: ___R,
5659 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadFirmware, ___T>
5660 where
5661 ___R: ::fidl_next::Encode<
5662 crate::wire::DataSinkReadFirmwareRequest<'static>,
5663 <___T as ::fidl_next::Transport>::SendBuffer,
5664 >,
5665 {
5666 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5667 916059865846835651,
5668 <super::ReadFirmware as ::fidl_next::Method>::FLEXIBILITY,
5669 request,
5670 ))
5671 }
5672
5673 #[doc = " Write a raw volume image to the device. The image will be passed as it is to the device\n partitioner backend to write. Therefore the format and write logic for the image is up to\n the product to define. It differs from the legacy WriteVolume(), which was specifically\n for writing the FVM sparse image, in that the paver will not perform any FVM related\n parsing or other operation of the image. Thus it is not dependent on the volume driver\n version and less susceptible to an outdated paver.\n\n Returns ZX_ERR_NOT_SUPPORTED if the backend does not support opaque volume blobs.\n"]
5674 pub fn write_opaque_volume(
5675 &self,
5676
5677 payload: impl ::fidl_next::Encode<
5678 ::fidl_next_fuchsia_mem::wire::Buffer,
5679 <___T as ::fidl_next::Transport>::SendBuffer,
5680 >,
5681 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteOpaqueVolume, ___T>
5682 where
5683 <___T as ::fidl_next::Transport>::SendBuffer:
5684 ::fidl_next::encoder::InternalHandleEncoder,
5685 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5686 {
5687 self.write_opaque_volume_with(crate::generic::DataSinkWriteOpaqueVolumeRequest {
5688 payload,
5689 })
5690 }
5691
5692 #[doc = " Write a raw volume image to the device. The image will be passed as it is to the device\n partitioner backend to write. Therefore the format and write logic for the image is up to\n the product to define. It differs from the legacy WriteVolume(), which was specifically\n for writing the FVM sparse image, in that the paver will not perform any FVM related\n parsing or other operation of the image. Thus it is not dependent on the volume driver\n version and less susceptible to an outdated paver.\n\n Returns ZX_ERR_NOT_SUPPORTED if the backend does not support opaque volume blobs.\n"]
5693 pub fn write_opaque_volume_with<___R>(
5694 &self,
5695 request: ___R,
5696 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteOpaqueVolume, ___T>
5697 where
5698 ___R: ::fidl_next::Encode<
5699 crate::wire::DataSinkWriteOpaqueVolumeRequest,
5700 <___T as ::fidl_next::Transport>::SendBuffer,
5701 >,
5702 {
5703 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5704 5225502591032888697,
5705 <super::WriteOpaqueVolume as ::fidl_next::Method>::FLEXIBILITY,
5706 request,
5707 ))
5708 }
5709
5710 #[doc = " Writes an image in the Android Sparse format. Identical in behaviour to\n `WriteOpaqueVolume`, except the contents of `payload` are parsed as a sparse image and\n unpacked before being written to disk.\n"]
5711 pub fn write_sparse_volume(
5712 &self,
5713
5714 payload: impl ::fidl_next::Encode<
5715 ::fidl_next_fuchsia_mem::wire::Buffer,
5716 <___T as ::fidl_next::Transport>::SendBuffer,
5717 >,
5718 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteSparseVolume, ___T>
5719 where
5720 <___T as ::fidl_next::Transport>::SendBuffer:
5721 ::fidl_next::encoder::InternalHandleEncoder,
5722 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5723 {
5724 self.write_sparse_volume_with(crate::generic::DataSinkWriteSparseVolumeRequest {
5725 payload,
5726 })
5727 }
5728
5729 #[doc = " Writes an image in the Android Sparse format. Identical in behaviour to\n `WriteOpaqueVolume`, except the contents of `payload` are parsed as a sparse image and\n unpacked before being written to disk.\n"]
5730 pub fn write_sparse_volume_with<___R>(
5731 &self,
5732 request: ___R,
5733 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteSparseVolume, ___T>
5734 where
5735 ___R: ::fidl_next::Encode<
5736 crate::wire::DataSinkWriteSparseVolumeRequest,
5737 <___T as ::fidl_next::Transport>::SendBuffer,
5738 >,
5739 {
5740 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5741 3751308758441123878,
5742 <super::WriteSparseVolume as ::fidl_next::Method>::FLEXIBILITY,
5743 request,
5744 ))
5745 }
5746
5747 #[doc = " Flush all previously buffered writes to persistent storage.\n"]
5748 pub fn flush(&self) -> ::fidl_next::TwoWayFuture<'_, super::Flush, ___T> {
5749 ::fidl_next::TwoWayFuture::from_untyped(
5750 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
5751 4276682289646022969,
5752 <super::Flush as ::fidl_next::Method>::FLEXIBILITY,
5753 (),
5754 ),
5755 )
5756 }
5757
5758 #[doc = " Initializes partitions on given block device.\n\n Currently only supported on devices which don\'t support fastboot (which is the preferred\n mechanism for device setup).\n\n *WARNING*: This API will wipe the existing partitions and data loss may occur. Non-Fuchsia\n partitions *may* be preserved, although this is behaviour is board-specific.\n"]
5759 pub fn initialize_partition_tables(
5760 &self,
5761 ) -> ::fidl_next::TwoWayFuture<'_, super::InitializePartitionTables, ___T> {
5762 ::fidl_next::TwoWayFuture::from_untyped(
5763 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
5764 5510588692033085310,
5765 <super::InitializePartitionTables as ::fidl_next::Method>::FLEXIBILITY,
5766 (),
5767 ),
5768 )
5769 }
5770
5771 #[doc = " Wipes all entries from the partition table of the specified block device.\n Currently only supported on devices with a GPT.\n\n *WARNING*: This API may destructively remove non-fuchsia maintained partitions from\n the block device.\n"]
5772 pub fn wipe_partition_tables(
5773 &self,
5774 ) -> ::fidl_next::TwoWayFuture<'_, super::WipePartitionTables, ___T> {
5775 ::fidl_next::TwoWayFuture::from_untyped(
5776 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
5777 547117999305978572,
5778 <super::WipePartitionTables as ::fidl_next::Method>::FLEXIBILITY,
5779 (),
5780 ),
5781 )
5782 }
5783 }
5784
5785 #[repr(transparent)]
5787 pub struct DynamicDataSinkServer<___T: ::fidl_next::Transport> {
5788 server: ::fidl_next::protocol::Server<___T>,
5789 }
5790
5791 impl<___T> DynamicDataSinkServer<___T> where ___T: ::fidl_next::Transport {}
5792 }
5793}
5794
5795#[diagnostic::on_unimplemented(
5796 note = "If {Self} implements the non-local DynamicDataSinkClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5797)]
5798
5799pub trait DynamicDataSinkLocalClientHandler<
5803 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5804 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5805>
5806{
5807}
5808
5809impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DynamicDataSink
5810where
5811 ___H: DynamicDataSinkLocalClientHandler<___T>,
5812 ___T: ::fidl_next::Transport,
5813{
5814 async fn on_event(
5815 handler: &mut ___H,
5816 mut message: ::fidl_next::Message<___T>,
5817 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5818 match *message.header().ordinal {
5819 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5820 }
5821 }
5822}
5823
5824#[diagnostic::on_unimplemented(
5825 note = "If {Self} implements the non-local DynamicDataSinkServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5826)]
5827
5828pub trait DynamicDataSinkLocalServerHandler<
5832 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5833 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5834>
5835{
5836 #[doc = " Reads the partition corresponding to `configuration` and `asset` into a vmo and returns it.\n The size field of the returned `Buffer` will be the size of just the asset, if it can be\n determined. Otherwise, it will be the size of the entire partition.\n The size and stream size of the vmo in the returned `Buffer` will always be the size of the\n entire partition.\n"]
5837 fn read_asset(
5838 &mut self,
5839
5840 request: ::fidl_next::Request<dynamic_data_sink::ReadAsset, ___T>,
5841
5842 responder: ::fidl_next::Responder<dynamic_data_sink::ReadAsset, ___T>,
5843 ) -> impl ::core::future::Future<Output = ()>;
5844
5845 #[doc = " Writes partition corresponding to `configuration` and `asset` with data from `payload`.\n `payload` may need to be resized to the partition size, so the provided vmo must have\n been created with `ZX_VMO_RESIZABLE` or must be a child VMO that was created with\n `ZX_VMO_CHILD_RESIZABLE`. Will zero out rest of the partition if `payload` is smaller\n than the size of the partition being written.\n\n\n Returns `ZX_ERR_INVALID_ARGS` if `configuration` specifies active configuration.\n"]
5846 fn write_asset(
5847 &mut self,
5848
5849 request: ::fidl_next::Request<dynamic_data_sink::WriteAsset, ___T>,
5850
5851 responder: ::fidl_next::Responder<dynamic_data_sink::WriteAsset, ___T>,
5852 ) -> impl ::core::future::Future<Output = ()>;
5853
5854 #[doc = " Writes firmware data from `payload`.\n\n `configuration` represents the A/B/R configuration. For platforms that do not support\n firmware A/B/R, the parameter will be ignored by the underlying device-specific logic .\n\n `type` is a device-specific string identifying the payload contents,\n used to select the proper paving logic. For example, a device with\n multiple bootloader stages might send them as separate calls to\n `WriteFirmware()`, differentiated by `type`. An empty string\n indicates the default type.\n\n `payload` may need to be resized to the partition size, so the provided\n vmo must have been created with `ZX_VMO_RESIZABLE` or must be a child\n VMO that was created with `ZX_VMO_CHILD_RESIZABLE`.\n"]
5855 fn write_firmware(
5856 &mut self,
5857
5858 request: ::fidl_next::Request<dynamic_data_sink::WriteFirmware, ___T>,
5859
5860 responder: ::fidl_next::Responder<dynamic_data_sink::WriteFirmware, ___T>,
5861 ) -> impl ::core::future::Future<Output = ()>;
5862
5863 #[doc = " Read firmware corresponding to `configuration` and `type`.\n\n Parameter `configuration` and `type` are the same as WriteFirmware.\n\n If ReadFirmware returns error, caller should assume that firmware image does not exist\n or is in a bad state, or firmware read is not defined for the product.\n"]
5864 fn read_firmware(
5865 &mut self,
5866
5867 request: ::fidl_next::Request<dynamic_data_sink::ReadFirmware, ___T>,
5868
5869 responder: ::fidl_next::Responder<dynamic_data_sink::ReadFirmware, ___T>,
5870 ) -> impl ::core::future::Future<Output = ()>;
5871
5872 #[doc = " Write a raw volume image to the device. The image will be passed as it is to the device\n partitioner backend to write. Therefore the format and write logic for the image is up to\n the product to define. It differs from the legacy WriteVolume(), which was specifically\n for writing the FVM sparse image, in that the paver will not perform any FVM related\n parsing or other operation of the image. Thus it is not dependent on the volume driver\n version and less susceptible to an outdated paver.\n\n Returns ZX_ERR_NOT_SUPPORTED if the backend does not support opaque volume blobs.\n"]
5873 fn write_opaque_volume(
5874 &mut self,
5875
5876 request: ::fidl_next::Request<dynamic_data_sink::WriteOpaqueVolume, ___T>,
5877
5878 responder: ::fidl_next::Responder<dynamic_data_sink::WriteOpaqueVolume, ___T>,
5879 ) -> impl ::core::future::Future<Output = ()>;
5880
5881 #[doc = " Writes an image in the Android Sparse format. Identical in behaviour to\n `WriteOpaqueVolume`, except the contents of `payload` are parsed as a sparse image and\n unpacked before being written to disk.\n"]
5882 fn write_sparse_volume(
5883 &mut self,
5884
5885 request: ::fidl_next::Request<dynamic_data_sink::WriteSparseVolume, ___T>,
5886
5887 responder: ::fidl_next::Responder<dynamic_data_sink::WriteSparseVolume, ___T>,
5888 ) -> impl ::core::future::Future<Output = ()>;
5889
5890 #[doc = " Flush all previously buffered writes to persistent storage.\n"]
5891 fn flush(
5892 &mut self,
5893
5894 responder: ::fidl_next::Responder<dynamic_data_sink::Flush, ___T>,
5895 ) -> impl ::core::future::Future<Output = ()>;
5896
5897 #[doc = " Initializes partitions on given block device.\n\n Currently only supported on devices which don\'t support fastboot (which is the preferred\n mechanism for device setup).\n\n *WARNING*: This API will wipe the existing partitions and data loss may occur. Non-Fuchsia\n partitions *may* be preserved, although this is behaviour is board-specific.\n"]
5898 fn initialize_partition_tables(
5899 &mut self,
5900
5901 responder: ::fidl_next::Responder<dynamic_data_sink::InitializePartitionTables, ___T>,
5902 ) -> impl ::core::future::Future<Output = ()>;
5903
5904 #[doc = " Wipes all entries from the partition table of the specified block device.\n Currently only supported on devices with a GPT.\n\n *WARNING*: This API may destructively remove non-fuchsia maintained partitions from\n the block device.\n"]
5905 fn wipe_partition_tables(
5906 &mut self,
5907
5908 responder: ::fidl_next::Responder<dynamic_data_sink::WipePartitionTables, ___T>,
5909 ) -> impl ::core::future::Future<Output = ()>;
5910}
5911
5912impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DynamicDataSink
5913where
5914 ___H: DynamicDataSinkLocalServerHandler<___T>,
5915 ___T: ::fidl_next::Transport,
5916 for<'de> crate::wire::DataSinkReadAssetRequest: ::fidl_next::Decode<
5917 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5918 Constraint = (),
5919 >,
5920 for<'de> crate::wire::DataSinkWriteAssetRequest: ::fidl_next::Decode<
5921 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5922 Constraint = (),
5923 >,
5924 for<'de> crate::wire::DataSinkWriteFirmwareRequest<'de>: ::fidl_next::Decode<
5925 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5926 Constraint = (),
5927 >,
5928 for<'de> crate::wire::DataSinkReadFirmwareRequest<'de>: ::fidl_next::Decode<
5929 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5930 Constraint = (),
5931 >,
5932 for<'de> crate::wire::DataSinkWriteOpaqueVolumeRequest: ::fidl_next::Decode<
5933 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5934 Constraint = (),
5935 >,
5936 for<'de> crate::wire::DataSinkWriteSparseVolumeRequest: ::fidl_next::Decode<
5937 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5938 Constraint = (),
5939 >,
5940{
5941 async fn on_one_way(
5942 handler: &mut ___H,
5943 mut message: ::fidl_next::Message<___T>,
5944 ) -> ::core::result::Result<
5945 (),
5946 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5947 > {
5948 match *message.header().ordinal {
5949 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5950 }
5951 }
5952
5953 async fn on_two_way(
5954 handler: &mut ___H,
5955 mut message: ::fidl_next::Message<___T>,
5956 responder: ::fidl_next::protocol::Responder<___T>,
5957 ) -> ::core::result::Result<
5958 (),
5959 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5960 > {
5961 match *message.header().ordinal {
5962 1322408908668565656 => {
5963 let responder = ::fidl_next::Responder::from_untyped(responder);
5964
5965 match ::fidl_next::AsDecoderExt::into_decoded(message) {
5966 Ok(decoded) => {
5967 handler
5968 .read_asset(::fidl_next::Request::from_decoded(decoded), responder)
5969 .await;
5970 Ok(())
5971 }
5972 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5973 ordinal: 1322408908668565656,
5974 error,
5975 }),
5976 }
5977 }
5978
5979 5866002073568727209 => {
5980 let responder = ::fidl_next::Responder::from_untyped(responder);
5981
5982 match ::fidl_next::AsDecoderExt::into_decoded(message) {
5983 Ok(decoded) => {
5984 handler
5985 .write_asset(::fidl_next::Request::from_decoded(decoded), responder)
5986 .await;
5987 Ok(())
5988 }
5989 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5990 ordinal: 5866002073568727209,
5991 error,
5992 }),
5993 }
5994 }
5995
5996 5857937666141634199 => {
5997 let responder = ::fidl_next::Responder::from_untyped(responder);
5998
5999 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6000 Ok(decoded) => {
6001 handler
6002 .write_firmware(::fidl_next::Request::from_decoded(decoded), responder)
6003 .await;
6004 Ok(())
6005 }
6006 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6007 ordinal: 5857937666141634199,
6008 error,
6009 }),
6010 }
6011 }
6012
6013 916059865846835651 => {
6014 let responder = ::fidl_next::Responder::from_untyped(responder);
6015
6016 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6017 Ok(decoded) => {
6018 handler
6019 .read_firmware(::fidl_next::Request::from_decoded(decoded), responder)
6020 .await;
6021 Ok(())
6022 }
6023 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6024 ordinal: 916059865846835651,
6025 error,
6026 }),
6027 }
6028 }
6029
6030 5225502591032888697 => {
6031 let responder = ::fidl_next::Responder::from_untyped(responder);
6032
6033 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6034 Ok(decoded) => {
6035 handler
6036 .write_opaque_volume(
6037 ::fidl_next::Request::from_decoded(decoded),
6038 responder,
6039 )
6040 .await;
6041 Ok(())
6042 }
6043 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6044 ordinal: 5225502591032888697,
6045 error,
6046 }),
6047 }
6048 }
6049
6050 3751308758441123878 => {
6051 let responder = ::fidl_next::Responder::from_untyped(responder);
6052
6053 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6054 Ok(decoded) => {
6055 handler
6056 .write_sparse_volume(
6057 ::fidl_next::Request::from_decoded(decoded),
6058 responder,
6059 )
6060 .await;
6061 Ok(())
6062 }
6063 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6064 ordinal: 3751308758441123878,
6065 error,
6066 }),
6067 }
6068 }
6069
6070 4276682289646022969 => {
6071 let responder = ::fidl_next::Responder::from_untyped(responder);
6072
6073 handler.flush(responder).await;
6074 Ok(())
6075 }
6076
6077 5510588692033085310 => {
6078 let responder = ::fidl_next::Responder::from_untyped(responder);
6079
6080 handler.initialize_partition_tables(responder).await;
6081 Ok(())
6082 }
6083
6084 547117999305978572 => {
6085 let responder = ::fidl_next::Responder::from_untyped(responder);
6086
6087 handler.wipe_partition_tables(responder).await;
6088 Ok(())
6089 }
6090
6091 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6092 }
6093 }
6094}
6095
6096pub trait DynamicDataSinkClientHandler<
6100 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6101 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6102>
6103{
6104}
6105
6106impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DynamicDataSink
6107where
6108 ___H: DynamicDataSinkClientHandler<___T> + ::core::marker::Send,
6109 ___T: ::fidl_next::Transport,
6110{
6111 async fn on_event(
6112 handler: &mut ___H,
6113 mut message: ::fidl_next::Message<___T>,
6114 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6115 match *message.header().ordinal {
6116 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6117 }
6118 }
6119}
6120
6121pub trait DynamicDataSinkServerHandler<
6125 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6126 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6127>
6128{
6129 #[doc = " Reads the partition corresponding to `configuration` and `asset` into a vmo and returns it.\n The size field of the returned `Buffer` will be the size of just the asset, if it can be\n determined. Otherwise, it will be the size of the entire partition.\n The size and stream size of the vmo in the returned `Buffer` will always be the size of the\n entire partition.\n"]
6130 fn read_asset(
6131 &mut self,
6132
6133 request: ::fidl_next::Request<dynamic_data_sink::ReadAsset, ___T>,
6134
6135 responder: ::fidl_next::Responder<dynamic_data_sink::ReadAsset, ___T>,
6136 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6137
6138 #[doc = " Writes partition corresponding to `configuration` and `asset` with data from `payload`.\n `payload` may need to be resized to the partition size, so the provided vmo must have\n been created with `ZX_VMO_RESIZABLE` or must be a child VMO that was created with\n `ZX_VMO_CHILD_RESIZABLE`. Will zero out rest of the partition if `payload` is smaller\n than the size of the partition being written.\n\n\n Returns `ZX_ERR_INVALID_ARGS` if `configuration` specifies active configuration.\n"]
6139 fn write_asset(
6140 &mut self,
6141
6142 request: ::fidl_next::Request<dynamic_data_sink::WriteAsset, ___T>,
6143
6144 responder: ::fidl_next::Responder<dynamic_data_sink::WriteAsset, ___T>,
6145 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6146
6147 #[doc = " Writes firmware data from `payload`.\n\n `configuration` represents the A/B/R configuration. For platforms that do not support\n firmware A/B/R, the parameter will be ignored by the underlying device-specific logic .\n\n `type` is a device-specific string identifying the payload contents,\n used to select the proper paving logic. For example, a device with\n multiple bootloader stages might send them as separate calls to\n `WriteFirmware()`, differentiated by `type`. An empty string\n indicates the default type.\n\n `payload` may need to be resized to the partition size, so the provided\n vmo must have been created with `ZX_VMO_RESIZABLE` or must be a child\n VMO that was created with `ZX_VMO_CHILD_RESIZABLE`.\n"]
6148 fn write_firmware(
6149 &mut self,
6150
6151 request: ::fidl_next::Request<dynamic_data_sink::WriteFirmware, ___T>,
6152
6153 responder: ::fidl_next::Responder<dynamic_data_sink::WriteFirmware, ___T>,
6154 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6155
6156 #[doc = " Read firmware corresponding to `configuration` and `type`.\n\n Parameter `configuration` and `type` are the same as WriteFirmware.\n\n If ReadFirmware returns error, caller should assume that firmware image does not exist\n or is in a bad state, or firmware read is not defined for the product.\n"]
6157 fn read_firmware(
6158 &mut self,
6159
6160 request: ::fidl_next::Request<dynamic_data_sink::ReadFirmware, ___T>,
6161
6162 responder: ::fidl_next::Responder<dynamic_data_sink::ReadFirmware, ___T>,
6163 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6164
6165 #[doc = " Write a raw volume image to the device. The image will be passed as it is to the device\n partitioner backend to write. Therefore the format and write logic for the image is up to\n the product to define. It differs from the legacy WriteVolume(), which was specifically\n for writing the FVM sparse image, in that the paver will not perform any FVM related\n parsing or other operation of the image. Thus it is not dependent on the volume driver\n version and less susceptible to an outdated paver.\n\n Returns ZX_ERR_NOT_SUPPORTED if the backend does not support opaque volume blobs.\n"]
6166 fn write_opaque_volume(
6167 &mut self,
6168
6169 request: ::fidl_next::Request<dynamic_data_sink::WriteOpaqueVolume, ___T>,
6170
6171 responder: ::fidl_next::Responder<dynamic_data_sink::WriteOpaqueVolume, ___T>,
6172 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6173
6174 #[doc = " Writes an image in the Android Sparse format. Identical in behaviour to\n `WriteOpaqueVolume`, except the contents of `payload` are parsed as a sparse image and\n unpacked before being written to disk.\n"]
6175 fn write_sparse_volume(
6176 &mut self,
6177
6178 request: ::fidl_next::Request<dynamic_data_sink::WriteSparseVolume, ___T>,
6179
6180 responder: ::fidl_next::Responder<dynamic_data_sink::WriteSparseVolume, ___T>,
6181 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6182
6183 #[doc = " Flush all previously buffered writes to persistent storage.\n"]
6184 fn flush(
6185 &mut self,
6186
6187 responder: ::fidl_next::Responder<dynamic_data_sink::Flush, ___T>,
6188 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6189
6190 #[doc = " Initializes partitions on given block device.\n\n Currently only supported on devices which don\'t support fastboot (which is the preferred\n mechanism for device setup).\n\n *WARNING*: This API will wipe the existing partitions and data loss may occur. Non-Fuchsia\n partitions *may* be preserved, although this is behaviour is board-specific.\n"]
6191 fn initialize_partition_tables(
6192 &mut self,
6193
6194 responder: ::fidl_next::Responder<dynamic_data_sink::InitializePartitionTables, ___T>,
6195 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6196
6197 #[doc = " Wipes all entries from the partition table of the specified block device.\n Currently only supported on devices with a GPT.\n\n *WARNING*: This API may destructively remove non-fuchsia maintained partitions from\n the block device.\n"]
6198 fn wipe_partition_tables(
6199 &mut self,
6200
6201 responder: ::fidl_next::Responder<dynamic_data_sink::WipePartitionTables, ___T>,
6202 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6203}
6204
6205impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DynamicDataSink
6206where
6207 ___H: DynamicDataSinkServerHandler<___T> + ::core::marker::Send,
6208 ___T: ::fidl_next::Transport,
6209 for<'de> crate::wire::DataSinkReadAssetRequest: ::fidl_next::Decode<
6210 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6211 Constraint = (),
6212 >,
6213 for<'de> crate::wire::DataSinkWriteAssetRequest: ::fidl_next::Decode<
6214 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6215 Constraint = (),
6216 >,
6217 for<'de> crate::wire::DataSinkWriteFirmwareRequest<'de>: ::fidl_next::Decode<
6218 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6219 Constraint = (),
6220 >,
6221 for<'de> crate::wire::DataSinkReadFirmwareRequest<'de>: ::fidl_next::Decode<
6222 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6223 Constraint = (),
6224 >,
6225 for<'de> crate::wire::DataSinkWriteOpaqueVolumeRequest: ::fidl_next::Decode<
6226 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6227 Constraint = (),
6228 >,
6229 for<'de> crate::wire::DataSinkWriteSparseVolumeRequest: ::fidl_next::Decode<
6230 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6231 Constraint = (),
6232 >,
6233{
6234 async fn on_one_way(
6235 handler: &mut ___H,
6236 mut message: ::fidl_next::Message<___T>,
6237 ) -> ::core::result::Result<
6238 (),
6239 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6240 > {
6241 match *message.header().ordinal {
6242 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6243 }
6244 }
6245
6246 async fn on_two_way(
6247 handler: &mut ___H,
6248 mut message: ::fidl_next::Message<___T>,
6249 responder: ::fidl_next::protocol::Responder<___T>,
6250 ) -> ::core::result::Result<
6251 (),
6252 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6253 > {
6254 match *message.header().ordinal {
6255 1322408908668565656 => {
6256 let responder = ::fidl_next::Responder::from_untyped(responder);
6257
6258 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6259 Ok(decoded) => {
6260 handler
6261 .read_asset(::fidl_next::Request::from_decoded(decoded), responder)
6262 .await;
6263 Ok(())
6264 }
6265 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6266 ordinal: 1322408908668565656,
6267 error,
6268 }),
6269 }
6270 }
6271
6272 5866002073568727209 => {
6273 let responder = ::fidl_next::Responder::from_untyped(responder);
6274
6275 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6276 Ok(decoded) => {
6277 handler
6278 .write_asset(::fidl_next::Request::from_decoded(decoded), responder)
6279 .await;
6280 Ok(())
6281 }
6282 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6283 ordinal: 5866002073568727209,
6284 error,
6285 }),
6286 }
6287 }
6288
6289 5857937666141634199 => {
6290 let responder = ::fidl_next::Responder::from_untyped(responder);
6291
6292 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6293 Ok(decoded) => {
6294 handler
6295 .write_firmware(::fidl_next::Request::from_decoded(decoded), responder)
6296 .await;
6297 Ok(())
6298 }
6299 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6300 ordinal: 5857937666141634199,
6301 error,
6302 }),
6303 }
6304 }
6305
6306 916059865846835651 => {
6307 let responder = ::fidl_next::Responder::from_untyped(responder);
6308
6309 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6310 Ok(decoded) => {
6311 handler
6312 .read_firmware(::fidl_next::Request::from_decoded(decoded), responder)
6313 .await;
6314 Ok(())
6315 }
6316 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6317 ordinal: 916059865846835651,
6318 error,
6319 }),
6320 }
6321 }
6322
6323 5225502591032888697 => {
6324 let responder = ::fidl_next::Responder::from_untyped(responder);
6325
6326 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6327 Ok(decoded) => {
6328 handler
6329 .write_opaque_volume(
6330 ::fidl_next::Request::from_decoded(decoded),
6331 responder,
6332 )
6333 .await;
6334 Ok(())
6335 }
6336 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6337 ordinal: 5225502591032888697,
6338 error,
6339 }),
6340 }
6341 }
6342
6343 3751308758441123878 => {
6344 let responder = ::fidl_next::Responder::from_untyped(responder);
6345
6346 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6347 Ok(decoded) => {
6348 handler
6349 .write_sparse_volume(
6350 ::fidl_next::Request::from_decoded(decoded),
6351 responder,
6352 )
6353 .await;
6354 Ok(())
6355 }
6356 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6357 ordinal: 3751308758441123878,
6358 error,
6359 }),
6360 }
6361 }
6362
6363 4276682289646022969 => {
6364 let responder = ::fidl_next::Responder::from_untyped(responder);
6365
6366 handler.flush(responder).await;
6367 Ok(())
6368 }
6369
6370 5510588692033085310 => {
6371 let responder = ::fidl_next::Responder::from_untyped(responder);
6372
6373 handler.initialize_partition_tables(responder).await;
6374 Ok(())
6375 }
6376
6377 547117999305978572 => {
6378 let responder = ::fidl_next::Responder::from_untyped(responder);
6379
6380 handler.wipe_partition_tables(responder).await;
6381 Ok(())
6382 }
6383
6384 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6385 }
6386 }
6387}
6388
6389impl<___T> DynamicDataSinkClientHandler<___T> for ::fidl_next::IgnoreEvents where
6390 ___T: ::fidl_next::Transport
6391{
6392}
6393
6394impl<___H, ___T> DynamicDataSinkLocalClientHandler<___T> for ::fidl_next::Local<___H>
6395where
6396 ___H: DynamicDataSinkClientHandler<___T>,
6397 ___T: ::fidl_next::Transport,
6398{
6399}
6400
6401impl<___H, ___T> DynamicDataSinkLocalServerHandler<___T> for ::fidl_next::Local<___H>
6402where
6403 ___H: DynamicDataSinkServerHandler<___T>,
6404 ___T: ::fidl_next::Transport,
6405{
6406 async fn read_asset(
6407 &mut self,
6408
6409 request: ::fidl_next::Request<dynamic_data_sink::ReadAsset, ___T>,
6410
6411 responder: ::fidl_next::Responder<dynamic_data_sink::ReadAsset, ___T>,
6412 ) {
6413 ___H::read_asset(&mut self.0, request, responder).await
6414 }
6415
6416 async fn write_asset(
6417 &mut self,
6418
6419 request: ::fidl_next::Request<dynamic_data_sink::WriteAsset, ___T>,
6420
6421 responder: ::fidl_next::Responder<dynamic_data_sink::WriteAsset, ___T>,
6422 ) {
6423 ___H::write_asset(&mut self.0, request, responder).await
6424 }
6425
6426 async fn write_firmware(
6427 &mut self,
6428
6429 request: ::fidl_next::Request<dynamic_data_sink::WriteFirmware, ___T>,
6430
6431 responder: ::fidl_next::Responder<dynamic_data_sink::WriteFirmware, ___T>,
6432 ) {
6433 ___H::write_firmware(&mut self.0, request, responder).await
6434 }
6435
6436 async fn read_firmware(
6437 &mut self,
6438
6439 request: ::fidl_next::Request<dynamic_data_sink::ReadFirmware, ___T>,
6440
6441 responder: ::fidl_next::Responder<dynamic_data_sink::ReadFirmware, ___T>,
6442 ) {
6443 ___H::read_firmware(&mut self.0, request, responder).await
6444 }
6445
6446 async fn write_opaque_volume(
6447 &mut self,
6448
6449 request: ::fidl_next::Request<dynamic_data_sink::WriteOpaqueVolume, ___T>,
6450
6451 responder: ::fidl_next::Responder<dynamic_data_sink::WriteOpaqueVolume, ___T>,
6452 ) {
6453 ___H::write_opaque_volume(&mut self.0, request, responder).await
6454 }
6455
6456 async fn write_sparse_volume(
6457 &mut self,
6458
6459 request: ::fidl_next::Request<dynamic_data_sink::WriteSparseVolume, ___T>,
6460
6461 responder: ::fidl_next::Responder<dynamic_data_sink::WriteSparseVolume, ___T>,
6462 ) {
6463 ___H::write_sparse_volume(&mut self.0, request, responder).await
6464 }
6465
6466 async fn flush(&mut self, responder: ::fidl_next::Responder<dynamic_data_sink::Flush, ___T>) {
6467 ___H::flush(&mut self.0, responder).await
6468 }
6469
6470 async fn initialize_partition_tables(
6471 &mut self,
6472
6473 responder: ::fidl_next::Responder<dynamic_data_sink::InitializePartitionTables, ___T>,
6474 ) {
6475 ___H::initialize_partition_tables(&mut self.0, responder).await
6476 }
6477
6478 async fn wipe_partition_tables(
6479 &mut self,
6480
6481 responder: ::fidl_next::Responder<dynamic_data_sink::WipePartitionTables, ___T>,
6482 ) {
6483 ___H::wipe_partition_tables(&mut self.0, responder).await
6484 }
6485}
6486
6487#[doc = " Protocol for reading and writing raw boot partitions backed by a caller-provided block\n directory.\n\n All partition lookups and I/O operations performed through this protocol are scoped to the\n `block_dir` directory capability supplied by the caller in `Paver.OpenPartitionIo`. If a\n requested partition is not present in `block_dir`, operations return `ZX_ERR_NOT_FOUND`.\n"]
6489#[derive(PartialEq, Debug)]
6490pub struct PartitionIo;
6491
6492#[cfg(target_os = "fuchsia")]
6493impl ::fidl_next::HasTransport for PartitionIo {
6494 type Transport = ::fidl_next::fuchsia::zx::Channel;
6495}
6496
6497pub mod partition_io {
6498 pub mod prelude {
6499 pub use crate::{
6500 PartitionIo, PartitionIoClientHandler, PartitionIoLocalClientHandler,
6501 PartitionIoLocalServerHandler, PartitionIoServerHandler, partition_io,
6502 };
6503
6504 pub use crate::natural::PartitionIoGetPartitionSizeRequest;
6505
6506 pub use crate::natural::PartitionIoReadPartitionRequest;
6507
6508 pub use crate::natural::PartitionIoWritePartitionRequest;
6509
6510 pub use crate::natural::PartitionIoFlushResponse;
6511
6512 pub use crate::natural::PartitionIoGetPartitionSizeResponse;
6513
6514 pub use crate::natural::PartitionIoReadPartitionResponse;
6515
6516 pub use crate::natural::PartitionIoWritePartitionResponse;
6517 }
6518
6519 pub struct GetPartitionSize;
6520
6521 impl ::fidl_next::Method for GetPartitionSize {
6522 const ORDINAL: u64 = 7998442710444772283;
6523 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6524 ::fidl_next::protocol::Flexibility::Strict;
6525
6526 type Protocol = crate::PartitionIo;
6527
6528 type Request = crate::wire::PartitionIoGetPartitionSizeRequest<'static>;
6529 }
6530
6531 impl ::fidl_next::TwoWayMethod for GetPartitionSize {
6532 type Response = ::fidl_next::wire::Result<
6533 'static,
6534 crate::wire::PartitionIoGetPartitionSizeResponse,
6535 ::fidl_next::wire::fuchsia::Status,
6536 >;
6537 }
6538
6539 impl<___R> ::fidl_next::Respond<___R> for GetPartitionSize {
6540 type Output = ::core::result::Result<
6541 crate::generic::PartitionIoGetPartitionSizeResponse<___R>,
6542 ::fidl_next::never::Never,
6543 >;
6544
6545 fn respond(response: ___R) -> Self::Output {
6546 ::core::result::Result::Ok(crate::generic::PartitionIoGetPartitionSizeResponse {
6547 size: response,
6548 })
6549 }
6550 }
6551
6552 impl<___R> ::fidl_next::RespondErr<___R> for GetPartitionSize {
6553 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6554
6555 fn respond_err(response: ___R) -> Self::Output {
6556 ::core::result::Result::Err(response)
6557 }
6558 }
6559
6560 pub struct ReadPartition;
6561
6562 impl ::fidl_next::Method for ReadPartition {
6563 const ORDINAL: u64 = 9088440556294222355;
6564 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6565 ::fidl_next::protocol::Flexibility::Strict;
6566
6567 type Protocol = crate::PartitionIo;
6568
6569 type Request = crate::wire::PartitionIoReadPartitionRequest<'static>;
6570 }
6571
6572 impl ::fidl_next::TwoWayMethod for ReadPartition {
6573 type Response = ::fidl_next::wire::Result<
6574 'static,
6575 crate::wire::PartitionIoReadPartitionResponse,
6576 ::fidl_next::wire::fuchsia::Status,
6577 >;
6578 }
6579
6580 impl<___R> ::fidl_next::Respond<___R> for ReadPartition {
6581 type Output = ::core::result::Result<
6582 crate::generic::PartitionIoReadPartitionResponse<___R>,
6583 ::fidl_next::never::Never,
6584 >;
6585
6586 fn respond(response: ___R) -> Self::Output {
6587 ::core::result::Result::Ok(crate::generic::PartitionIoReadPartitionResponse {
6588 payload: response,
6589 })
6590 }
6591 }
6592
6593 impl<___R> ::fidl_next::RespondErr<___R> for ReadPartition {
6594 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6595
6596 fn respond_err(response: ___R) -> Self::Output {
6597 ::core::result::Result::Err(response)
6598 }
6599 }
6600
6601 pub struct WritePartition;
6602
6603 impl ::fidl_next::Method for WritePartition {
6604 const ORDINAL: u64 = 8353532866961435590;
6605 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6606 ::fidl_next::protocol::Flexibility::Strict;
6607
6608 type Protocol = crate::PartitionIo;
6609
6610 type Request = crate::wire::PartitionIoWritePartitionRequest<'static>;
6611 }
6612
6613 impl ::fidl_next::TwoWayMethod for WritePartition {
6614 type Response = ::fidl_next::wire::Result<
6615 'static,
6616 crate::wire::PartitionIoWritePartitionResponse,
6617 ::fidl_next::wire::fuchsia::Status,
6618 >;
6619 }
6620
6621 impl<___R> ::fidl_next::Respond<___R> for WritePartition {
6622 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6623
6624 fn respond(response: ___R) -> Self::Output {
6625 ::core::result::Result::Ok(response)
6626 }
6627 }
6628
6629 impl<___R> ::fidl_next::RespondErr<___R> for WritePartition {
6630 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6631
6632 fn respond_err(response: ___R) -> Self::Output {
6633 ::core::result::Result::Err(response)
6634 }
6635 }
6636
6637 pub struct Flush;
6638
6639 impl ::fidl_next::Method for Flush {
6640 const ORDINAL: u64 = 6702419990452357624;
6641 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6642 ::fidl_next::protocol::Flexibility::Strict;
6643
6644 type Protocol = crate::PartitionIo;
6645
6646 type Request = ::fidl_next::wire::EmptyMessageBody;
6647 }
6648
6649 impl ::fidl_next::TwoWayMethod for Flush {
6650 type Response = ::fidl_next::wire::Result<
6651 'static,
6652 crate::wire::PartitionIoFlushResponse,
6653 ::fidl_next::wire::fuchsia::Status,
6654 >;
6655 }
6656
6657 impl<___R> ::fidl_next::Respond<___R> for Flush {
6658 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6659
6660 fn respond(response: ___R) -> Self::Output {
6661 ::core::result::Result::Ok(response)
6662 }
6663 }
6664
6665 impl<___R> ::fidl_next::RespondErr<___R> for Flush {
6666 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6667
6668 fn respond_err(response: ___R) -> Self::Output {
6669 ::core::result::Result::Err(response)
6670 }
6671 }
6672
6673 mod ___detail {
6674 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::PartitionIo
6675 where
6676 ___T: ::fidl_next::Transport,
6677 {
6678 type Client = PartitionIoClient<___T>;
6679 type Server = PartitionIoServer<___T>;
6680 }
6681
6682 #[repr(transparent)]
6684 pub struct PartitionIoClient<___T: ::fidl_next::Transport> {
6685 #[allow(dead_code)]
6686 client: ::fidl_next::protocol::Client<___T>,
6687 }
6688
6689 impl<___T> PartitionIoClient<___T>
6690 where
6691 ___T: ::fidl_next::Transport,
6692 {
6693 #[doc = " Returns the size in bytes of a raw partition by name.\n"]
6694 pub fn get_partition_size(
6695 &self,
6696
6697 partition: impl ::fidl_next::Encode<
6698 ::fidl_next::wire::String<'static>,
6699 <___T as ::fidl_next::Transport>::SendBuffer,
6700 >,
6701 ) -> ::fidl_next::TwoWayFuture<'_, super::GetPartitionSize, ___T>
6702 where
6703 <___T as ::fidl_next::Transport>::SendBuffer:
6704 ::fidl_next::encoder::InternalHandleEncoder,
6705 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6706 {
6707 self.get_partition_size_with(crate::generic::PartitionIoGetPartitionSizeRequest {
6708 partition,
6709 })
6710 }
6711
6712 #[doc = " Returns the size in bytes of a raw partition by name.\n"]
6713 pub fn get_partition_size_with<___R>(
6714 &self,
6715 request: ___R,
6716 ) -> ::fidl_next::TwoWayFuture<'_, super::GetPartitionSize, ___T>
6717 where
6718 ___R: ::fidl_next::Encode<
6719 crate::wire::PartitionIoGetPartitionSizeRequest<'static>,
6720 <___T as ::fidl_next::Transport>::SendBuffer,
6721 >,
6722 {
6723 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6724 7998442710444772283,
6725 <super::GetPartitionSize as ::fidl_next::Method>::FLEXIBILITY,
6726 request,
6727 ))
6728 }
6729
6730 #[doc = " Reads `size` bytes from a raw partition by name starting at `offset`.\n\n Both `offset` and `size` may be arbitrary byte values and do not need to be aligned to the\n partition\'s block size. The `ZX_PROP_VMO_CONTENT_SIZE` property on the returned `payload`\n VMO will be set to `size`.\n\n Returns `ZX_ERR_INVALID_ARGS` if `size` is 0, or `ZX_ERR_OUT_OF_RANGE` if `offset + size`\n exceeds the partition size.\n"]
6731 pub fn read_partition(
6732 &self,
6733
6734 partition: impl ::fidl_next::Encode<
6735 ::fidl_next::wire::String<'static>,
6736 <___T as ::fidl_next::Transport>::SendBuffer,
6737 >,
6738
6739 offset: impl ::fidl_next::Encode<
6740 ::fidl_next::wire::Uint64,
6741 <___T as ::fidl_next::Transport>::SendBuffer,
6742 >,
6743
6744 size: impl ::fidl_next::Encode<
6745 ::fidl_next::wire::Uint64,
6746 <___T as ::fidl_next::Transport>::SendBuffer,
6747 >,
6748 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadPartition, ___T>
6749 where
6750 <___T as ::fidl_next::Transport>::SendBuffer:
6751 ::fidl_next::encoder::InternalHandleEncoder,
6752 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6753 {
6754 self.read_partition_with(crate::generic::PartitionIoReadPartitionRequest {
6755 partition,
6756
6757 offset,
6758
6759 size,
6760 })
6761 }
6762
6763 #[doc = " Reads `size` bytes from a raw partition by name starting at `offset`.\n\n Both `offset` and `size` may be arbitrary byte values and do not need to be aligned to the\n partition\'s block size. The `ZX_PROP_VMO_CONTENT_SIZE` property on the returned `payload`\n VMO will be set to `size`.\n\n Returns `ZX_ERR_INVALID_ARGS` if `size` is 0, or `ZX_ERR_OUT_OF_RANGE` if `offset + size`\n exceeds the partition size.\n"]
6764 pub fn read_partition_with<___R>(
6765 &self,
6766 request: ___R,
6767 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadPartition, ___T>
6768 where
6769 ___R: ::fidl_next::Encode<
6770 crate::wire::PartitionIoReadPartitionRequest<'static>,
6771 <___T as ::fidl_next::Transport>::SendBuffer,
6772 >,
6773 {
6774 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6775 9088440556294222355,
6776 <super::ReadPartition as ::fidl_next::Method>::FLEXIBILITY,
6777 request,
6778 ))
6779 }
6780
6781 #[doc = " Writes `payload` to a raw partition by name starting at `offset`.\n\n The number of bytes to write is read from the `ZX_PROP_VMO_CONTENT_SIZE` property of\n `payload`. Both `offset` and the write size may be arbitrary byte values and do not need to\n be aligned to the partition\'s block size.\n\n Any leading partial block (when `offset` is not block-aligned) is always updated via\n read-modify-write to preserve existing bytes prior to `offset`. Behavior for partition\n contents after `offset + size` is controlled by `trailing`.\n\n On some platforms, written data may be buffered in memory and is not guaranteed to be\n persisted to storage until `Flush` is called.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `offset + size` exceeds the partition size.\n"]
6782 pub fn write_partition(
6783 &self,
6784
6785 partition: impl ::fidl_next::Encode<
6786 ::fidl_next::wire::String<'static>,
6787 <___T as ::fidl_next::Transport>::SendBuffer,
6788 >,
6789
6790 offset: impl ::fidl_next::Encode<
6791 ::fidl_next::wire::Uint64,
6792 <___T as ::fidl_next::Transport>::SendBuffer,
6793 >,
6794
6795 payload: impl ::fidl_next::Encode<
6796 ::fidl_next::wire::fuchsia::Vmo,
6797 <___T as ::fidl_next::Transport>::SendBuffer,
6798 >,
6799
6800 trailing: impl ::fidl_next::Encode<
6801 crate::wire::TrailingBehavior,
6802 <___T as ::fidl_next::Transport>::SendBuffer,
6803 >,
6804 ) -> ::fidl_next::TwoWayFuture<'_, super::WritePartition, ___T>
6805 where
6806 <___T as ::fidl_next::Transport>::SendBuffer:
6807 ::fidl_next::encoder::InternalHandleEncoder,
6808 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6809 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6810 {
6811 self.write_partition_with(crate::generic::PartitionIoWritePartitionRequest {
6812 partition,
6813
6814 offset,
6815
6816 payload,
6817
6818 trailing,
6819 })
6820 }
6821
6822 #[doc = " Writes `payload` to a raw partition by name starting at `offset`.\n\n The number of bytes to write is read from the `ZX_PROP_VMO_CONTENT_SIZE` property of\n `payload`. Both `offset` and the write size may be arbitrary byte values and do not need to\n be aligned to the partition\'s block size.\n\n Any leading partial block (when `offset` is not block-aligned) is always updated via\n read-modify-write to preserve existing bytes prior to `offset`. Behavior for partition\n contents after `offset + size` is controlled by `trailing`.\n\n On some platforms, written data may be buffered in memory and is not guaranteed to be\n persisted to storage until `Flush` is called.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `offset + size` exceeds the partition size.\n"]
6823 pub fn write_partition_with<___R>(
6824 &self,
6825 request: ___R,
6826 ) -> ::fidl_next::TwoWayFuture<'_, super::WritePartition, ___T>
6827 where
6828 ___R: ::fidl_next::Encode<
6829 crate::wire::PartitionIoWritePartitionRequest<'static>,
6830 <___T as ::fidl_next::Transport>::SendBuffer,
6831 >,
6832 {
6833 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6834 8353532866961435590,
6835 <super::WritePartition as ::fidl_next::Method>::FLEXIBILITY,
6836 request,
6837 ))
6838 }
6839
6840 #[doc = " Flushes all previous `WritePartition` operations to persistent storage.\n\n Callers must invoke `Flush` after completing partition writes to ensure that any buffered\n data is persisted to storage.\n"]
6841 pub fn flush(&self) -> ::fidl_next::TwoWayFuture<'_, super::Flush, ___T> {
6842 ::fidl_next::TwoWayFuture::from_untyped(
6843 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6844 6702419990452357624,
6845 <super::Flush as ::fidl_next::Method>::FLEXIBILITY,
6846 (),
6847 ),
6848 )
6849 }
6850 }
6851
6852 #[repr(transparent)]
6854 pub struct PartitionIoServer<___T: ::fidl_next::Transport> {
6855 server: ::fidl_next::protocol::Server<___T>,
6856 }
6857
6858 impl<___T> PartitionIoServer<___T> where ___T: ::fidl_next::Transport {}
6859 }
6860}
6861
6862#[diagnostic::on_unimplemented(
6863 note = "If {Self} implements the non-local PartitionIoClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6864)]
6865
6866pub trait PartitionIoLocalClientHandler<
6870 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6871 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6872>
6873{
6874}
6875
6876impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for PartitionIo
6877where
6878 ___H: PartitionIoLocalClientHandler<___T>,
6879 ___T: ::fidl_next::Transport,
6880{
6881 async fn on_event(
6882 handler: &mut ___H,
6883 mut message: ::fidl_next::Message<___T>,
6884 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6885 match *message.header().ordinal {
6886 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6887 }
6888 }
6889}
6890
6891#[diagnostic::on_unimplemented(
6892 note = "If {Self} implements the non-local PartitionIoServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6893)]
6894
6895pub trait PartitionIoLocalServerHandler<
6899 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6900 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6901>
6902{
6903 #[doc = " Returns the size in bytes of a raw partition by name.\n"]
6904 fn get_partition_size(
6905 &mut self,
6906
6907 request: ::fidl_next::Request<partition_io::GetPartitionSize, ___T>,
6908
6909 responder: ::fidl_next::Responder<partition_io::GetPartitionSize, ___T>,
6910 ) -> impl ::core::future::Future<Output = ()>;
6911
6912 #[doc = " Reads `size` bytes from a raw partition by name starting at `offset`.\n\n Both `offset` and `size` may be arbitrary byte values and do not need to be aligned to the\n partition\'s block size. The `ZX_PROP_VMO_CONTENT_SIZE` property on the returned `payload`\n VMO will be set to `size`.\n\n Returns `ZX_ERR_INVALID_ARGS` if `size` is 0, or `ZX_ERR_OUT_OF_RANGE` if `offset + size`\n exceeds the partition size.\n"]
6913 fn read_partition(
6914 &mut self,
6915
6916 request: ::fidl_next::Request<partition_io::ReadPartition, ___T>,
6917
6918 responder: ::fidl_next::Responder<partition_io::ReadPartition, ___T>,
6919 ) -> impl ::core::future::Future<Output = ()>;
6920
6921 #[doc = " Writes `payload` to a raw partition by name starting at `offset`.\n\n The number of bytes to write is read from the `ZX_PROP_VMO_CONTENT_SIZE` property of\n `payload`. Both `offset` and the write size may be arbitrary byte values and do not need to\n be aligned to the partition\'s block size.\n\n Any leading partial block (when `offset` is not block-aligned) is always updated via\n read-modify-write to preserve existing bytes prior to `offset`. Behavior for partition\n contents after `offset + size` is controlled by `trailing`.\n\n On some platforms, written data may be buffered in memory and is not guaranteed to be\n persisted to storage until `Flush` is called.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `offset + size` exceeds the partition size.\n"]
6922 fn write_partition(
6923 &mut self,
6924
6925 request: ::fidl_next::Request<partition_io::WritePartition, ___T>,
6926
6927 responder: ::fidl_next::Responder<partition_io::WritePartition, ___T>,
6928 ) -> impl ::core::future::Future<Output = ()>;
6929
6930 #[doc = " Flushes all previous `WritePartition` operations to persistent storage.\n\n Callers must invoke `Flush` after completing partition writes to ensure that any buffered\n data is persisted to storage.\n"]
6931 fn flush(
6932 &mut self,
6933
6934 responder: ::fidl_next::Responder<partition_io::Flush, ___T>,
6935 ) -> impl ::core::future::Future<Output = ()>;
6936}
6937
6938impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for PartitionIo
6939where
6940 ___H: PartitionIoLocalServerHandler<___T>,
6941 ___T: ::fidl_next::Transport,
6942 for<'de> crate::wire::PartitionIoGetPartitionSizeRequest<'de>: ::fidl_next::Decode<
6943 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6944 Constraint = (),
6945 >,
6946 for<'de> crate::wire::PartitionIoReadPartitionRequest<'de>: ::fidl_next::Decode<
6947 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6948 Constraint = (),
6949 >,
6950 for<'de> crate::wire::PartitionIoWritePartitionRequest<'de>: ::fidl_next::Decode<
6951 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6952 Constraint = (),
6953 >,
6954{
6955 async fn on_one_way(
6956 handler: &mut ___H,
6957 mut message: ::fidl_next::Message<___T>,
6958 ) -> ::core::result::Result<
6959 (),
6960 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6961 > {
6962 match *message.header().ordinal {
6963 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
6964 }
6965 }
6966
6967 async fn on_two_way(
6968 handler: &mut ___H,
6969 mut message: ::fidl_next::Message<___T>,
6970 responder: ::fidl_next::protocol::Responder<___T>,
6971 ) -> ::core::result::Result<
6972 (),
6973 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6974 > {
6975 match *message.header().ordinal {
6976 7998442710444772283 => {
6977 let responder = ::fidl_next::Responder::from_untyped(responder);
6978
6979 match ::fidl_next::AsDecoderExt::into_decoded(message) {
6980 Ok(decoded) => {
6981 handler
6982 .get_partition_size(
6983 ::fidl_next::Request::from_decoded(decoded),
6984 responder,
6985 )
6986 .await;
6987 Ok(())
6988 }
6989 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6990 ordinal: 7998442710444772283,
6991 error,
6992 }),
6993 }
6994 }
6995
6996 9088440556294222355 => {
6997 let responder = ::fidl_next::Responder::from_untyped(responder);
6998
6999 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7000 Ok(decoded) => {
7001 handler
7002 .read_partition(::fidl_next::Request::from_decoded(decoded), responder)
7003 .await;
7004 Ok(())
7005 }
7006 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7007 ordinal: 9088440556294222355,
7008 error,
7009 }),
7010 }
7011 }
7012
7013 8353532866961435590 => {
7014 let responder = ::fidl_next::Responder::from_untyped(responder);
7015
7016 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7017 Ok(decoded) => {
7018 handler
7019 .write_partition(::fidl_next::Request::from_decoded(decoded), responder)
7020 .await;
7021 Ok(())
7022 }
7023 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7024 ordinal: 8353532866961435590,
7025 error,
7026 }),
7027 }
7028 }
7029
7030 6702419990452357624 => {
7031 let responder = ::fidl_next::Responder::from_untyped(responder);
7032
7033 handler.flush(responder).await;
7034 Ok(())
7035 }
7036
7037 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7038 }
7039 }
7040}
7041
7042pub trait PartitionIoClientHandler<
7046 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7047 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7048>
7049{
7050}
7051
7052impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for PartitionIo
7053where
7054 ___H: PartitionIoClientHandler<___T> + ::core::marker::Send,
7055 ___T: ::fidl_next::Transport,
7056{
7057 async fn on_event(
7058 handler: &mut ___H,
7059 mut message: ::fidl_next::Message<___T>,
7060 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7061 match *message.header().ordinal {
7062 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7063 }
7064 }
7065}
7066
7067pub trait PartitionIoServerHandler<
7071 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7072 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7073>
7074{
7075 #[doc = " Returns the size in bytes of a raw partition by name.\n"]
7076 fn get_partition_size(
7077 &mut self,
7078
7079 request: ::fidl_next::Request<partition_io::GetPartitionSize, ___T>,
7080
7081 responder: ::fidl_next::Responder<partition_io::GetPartitionSize, ___T>,
7082 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7083
7084 #[doc = " Reads `size` bytes from a raw partition by name starting at `offset`.\n\n Both `offset` and `size` may be arbitrary byte values and do not need to be aligned to the\n partition\'s block size. The `ZX_PROP_VMO_CONTENT_SIZE` property on the returned `payload`\n VMO will be set to `size`.\n\n Returns `ZX_ERR_INVALID_ARGS` if `size` is 0, or `ZX_ERR_OUT_OF_RANGE` if `offset + size`\n exceeds the partition size.\n"]
7085 fn read_partition(
7086 &mut self,
7087
7088 request: ::fidl_next::Request<partition_io::ReadPartition, ___T>,
7089
7090 responder: ::fidl_next::Responder<partition_io::ReadPartition, ___T>,
7091 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7092
7093 #[doc = " Writes `payload` to a raw partition by name starting at `offset`.\n\n The number of bytes to write is read from the `ZX_PROP_VMO_CONTENT_SIZE` property of\n `payload`. Both `offset` and the write size may be arbitrary byte values and do not need to\n be aligned to the partition\'s block size.\n\n Any leading partial block (when `offset` is not block-aligned) is always updated via\n read-modify-write to preserve existing bytes prior to `offset`. Behavior for partition\n contents after `offset + size` is controlled by `trailing`.\n\n On some platforms, written data may be buffered in memory and is not guaranteed to be\n persisted to storage until `Flush` is called.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `offset + size` exceeds the partition size.\n"]
7094 fn write_partition(
7095 &mut self,
7096
7097 request: ::fidl_next::Request<partition_io::WritePartition, ___T>,
7098
7099 responder: ::fidl_next::Responder<partition_io::WritePartition, ___T>,
7100 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7101
7102 #[doc = " Flushes all previous `WritePartition` operations to persistent storage.\n\n Callers must invoke `Flush` after completing partition writes to ensure that any buffered\n data is persisted to storage.\n"]
7103 fn flush(
7104 &mut self,
7105
7106 responder: ::fidl_next::Responder<partition_io::Flush, ___T>,
7107 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7108}
7109
7110impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for PartitionIo
7111where
7112 ___H: PartitionIoServerHandler<___T> + ::core::marker::Send,
7113 ___T: ::fidl_next::Transport,
7114 for<'de> crate::wire::PartitionIoGetPartitionSizeRequest<'de>: ::fidl_next::Decode<
7115 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7116 Constraint = (),
7117 >,
7118 for<'de> crate::wire::PartitionIoReadPartitionRequest<'de>: ::fidl_next::Decode<
7119 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7120 Constraint = (),
7121 >,
7122 for<'de> crate::wire::PartitionIoWritePartitionRequest<'de>: ::fidl_next::Decode<
7123 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7124 Constraint = (),
7125 >,
7126{
7127 async fn on_one_way(
7128 handler: &mut ___H,
7129 mut message: ::fidl_next::Message<___T>,
7130 ) -> ::core::result::Result<
7131 (),
7132 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7133 > {
7134 match *message.header().ordinal {
7135 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7136 }
7137 }
7138
7139 async fn on_two_way(
7140 handler: &mut ___H,
7141 mut message: ::fidl_next::Message<___T>,
7142 responder: ::fidl_next::protocol::Responder<___T>,
7143 ) -> ::core::result::Result<
7144 (),
7145 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7146 > {
7147 match *message.header().ordinal {
7148 7998442710444772283 => {
7149 let responder = ::fidl_next::Responder::from_untyped(responder);
7150
7151 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7152 Ok(decoded) => {
7153 handler
7154 .get_partition_size(
7155 ::fidl_next::Request::from_decoded(decoded),
7156 responder,
7157 )
7158 .await;
7159 Ok(())
7160 }
7161 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7162 ordinal: 7998442710444772283,
7163 error,
7164 }),
7165 }
7166 }
7167
7168 9088440556294222355 => {
7169 let responder = ::fidl_next::Responder::from_untyped(responder);
7170
7171 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7172 Ok(decoded) => {
7173 handler
7174 .read_partition(::fidl_next::Request::from_decoded(decoded), responder)
7175 .await;
7176 Ok(())
7177 }
7178 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7179 ordinal: 9088440556294222355,
7180 error,
7181 }),
7182 }
7183 }
7184
7185 8353532866961435590 => {
7186 let responder = ::fidl_next::Responder::from_untyped(responder);
7187
7188 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7189 Ok(decoded) => {
7190 handler
7191 .write_partition(::fidl_next::Request::from_decoded(decoded), responder)
7192 .await;
7193 Ok(())
7194 }
7195 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7196 ordinal: 8353532866961435590,
7197 error,
7198 }),
7199 }
7200 }
7201
7202 6702419990452357624 => {
7203 let responder = ::fidl_next::Responder::from_untyped(responder);
7204
7205 handler.flush(responder).await;
7206 Ok(())
7207 }
7208
7209 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7210 }
7211 }
7212}
7213
7214impl<___T> PartitionIoClientHandler<___T> for ::fidl_next::IgnoreEvents where
7215 ___T: ::fidl_next::Transport
7216{
7217}
7218
7219impl<___H, ___T> PartitionIoLocalClientHandler<___T> for ::fidl_next::Local<___H>
7220where
7221 ___H: PartitionIoClientHandler<___T>,
7222 ___T: ::fidl_next::Transport,
7223{
7224}
7225
7226impl<___H, ___T> PartitionIoLocalServerHandler<___T> for ::fidl_next::Local<___H>
7227where
7228 ___H: PartitionIoServerHandler<___T>,
7229 ___T: ::fidl_next::Transport,
7230{
7231 async fn get_partition_size(
7232 &mut self,
7233
7234 request: ::fidl_next::Request<partition_io::GetPartitionSize, ___T>,
7235
7236 responder: ::fidl_next::Responder<partition_io::GetPartitionSize, ___T>,
7237 ) {
7238 ___H::get_partition_size(&mut self.0, request, responder).await
7239 }
7240
7241 async fn read_partition(
7242 &mut self,
7243
7244 request: ::fidl_next::Request<partition_io::ReadPartition, ___T>,
7245
7246 responder: ::fidl_next::Responder<partition_io::ReadPartition, ___T>,
7247 ) {
7248 ___H::read_partition(&mut self.0, request, responder).await
7249 }
7250
7251 async fn write_partition(
7252 &mut self,
7253
7254 request: ::fidl_next::Request<partition_io::WritePartition, ___T>,
7255
7256 responder: ::fidl_next::Responder<partition_io::WritePartition, ___T>,
7257 ) {
7258 ___H::write_partition(&mut self.0, request, responder).await
7259 }
7260
7261 async fn flush(&mut self, responder: ::fidl_next::Responder<partition_io::Flush, ___T>) {
7262 ___H::flush(&mut self.0, responder).await
7263 }
7264}
7265
7266#[derive(PartialEq, Debug)]
7268pub struct Paver;
7269
7270impl ::fidl_next::Discoverable for Paver {
7271 const PROTOCOL_NAME: &'static str = "fuchsia.paver.Paver";
7272}
7273
7274#[cfg(target_os = "fuchsia")]
7275impl ::fidl_next::HasTransport for Paver {
7276 type Transport = ::fidl_next::fuchsia::zx::Channel;
7277}
7278
7279pub mod paver {
7280 pub mod prelude {
7281 pub use crate::{
7282 Paver, PaverClientHandler, PaverLocalClientHandler, PaverLocalServerHandler,
7283 PaverServerHandler, paver,
7284 };
7285
7286 pub use crate::natural::PaverFindBootManagerRequest;
7287
7288 pub use crate::natural::PaverFindDataSinkRequest;
7289
7290 pub use crate::natural::PaverFindPartitionTableManagerRequest;
7291
7292 pub use crate::natural::PaverFindSysconfigRequest;
7293
7294 pub use crate::natural::PaverOpenPartitionIoRequest;
7295 }
7296
7297 pub struct FindDataSink;
7298
7299 impl ::fidl_next::Method for FindDataSink {
7300 const ORDINAL: u64 = 8145380905251807465;
7301 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7302 ::fidl_next::protocol::Flexibility::Strict;
7303
7304 type Protocol = crate::Paver;
7305
7306 type Request = crate::wire::PaverFindDataSinkRequest;
7307 }
7308
7309 pub struct OpenPartitionIo;
7310
7311 impl ::fidl_next::Method for OpenPartitionIo {
7312 const ORDINAL: u64 = 5030526122350152055;
7313 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7314 ::fidl_next::protocol::Flexibility::Strict;
7315
7316 type Protocol = crate::Paver;
7317
7318 type Request = crate::wire::PaverOpenPartitionIoRequest;
7319 }
7320
7321 pub struct FindPartitionTableManager;
7322
7323 impl ::fidl_next::Method for FindPartitionTableManager {
7324 const ORDINAL: u64 = 1196021039440196731;
7325 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7326 ::fidl_next::protocol::Flexibility::Strict;
7327
7328 type Protocol = crate::Paver;
7329
7330 type Request = crate::wire::PaverFindPartitionTableManagerRequest;
7331 }
7332
7333 pub struct FindBootManager;
7334
7335 impl ::fidl_next::Method for FindBootManager {
7336 const ORDINAL: u64 = 6723886364918555715;
7337 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7338 ::fidl_next::protocol::Flexibility::Strict;
7339
7340 type Protocol = crate::Paver;
7341
7342 type Request = crate::wire::PaverFindBootManagerRequest;
7343 }
7344
7345 pub struct FindSysconfig;
7346
7347 impl ::fidl_next::Method for FindSysconfig {
7348 const ORDINAL: u64 = 6065463985970724909;
7349 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7350 ::fidl_next::protocol::Flexibility::Strict;
7351
7352 type Protocol = crate::Paver;
7353
7354 type Request = crate::wire::PaverFindSysconfigRequest;
7355 }
7356
7357 mod ___detail {
7358 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Paver
7359 where
7360 ___T: ::fidl_next::Transport,
7361 {
7362 type Client = PaverClient<___T>;
7363 type Server = PaverServer<___T>;
7364 }
7365
7366 #[repr(transparent)]
7368 pub struct PaverClient<___T: ::fidl_next::Transport> {
7369 #[allow(dead_code)]
7370 client: ::fidl_next::protocol::Client<___T>,
7371 }
7372
7373 impl<___T> PaverClient<___T>
7374 where
7375 ___T: ::fidl_next::Transport,
7376 {
7377 #[doc = " Attempts to auto-discover the data sink where assets and volumes will get paved to.\n On devices with GPT, the partition must have a valid FVM partition in order for\n auto-discovery to find it. If multiple devices are found suitable, error is returned.\n\n `data_sink` will be closed on error, with an epitaph provided on failure reason.\n"]
7378 pub fn find_data_sink(
7379 &self,
7380
7381 data_sink: impl ::fidl_next::Encode<
7382 ::fidl_next::ServerEnd<crate::DataSink, ::fidl_next::wire::fuchsia::Channel>,
7383 <___T as ::fidl_next::Transport>::SendBuffer,
7384 >,
7385 ) -> ::fidl_next::SendFuture<'_, ___T>
7386 where
7387 <___T as ::fidl_next::Transport>::SendBuffer:
7388 ::fidl_next::encoder::InternalHandleEncoder,
7389 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7390 {
7391 self.find_data_sink_with(crate::generic::PaverFindDataSinkRequest { data_sink })
7392 }
7393
7394 #[doc = " Attempts to auto-discover the data sink where assets and volumes will get paved to.\n On devices with GPT, the partition must have a valid FVM partition in order for\n auto-discovery to find it. If multiple devices are found suitable, error is returned.\n\n `data_sink` will be closed on error, with an epitaph provided on failure reason.\n"]
7395 pub fn find_data_sink_with<___R>(
7396 &self,
7397 request: ___R,
7398 ) -> ::fidl_next::SendFuture<'_, ___T>
7399 where
7400 ___R: ::fidl_next::Encode<
7401 crate::wire::PaverFindDataSinkRequest,
7402 <___T as ::fidl_next::Transport>::SendBuffer,
7403 >,
7404 {
7405 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7406 8145380905251807465,
7407 <super::FindDataSink as ::fidl_next::Method>::FLEXIBILITY,
7408 request,
7409 ))
7410 }
7411
7412 #[doc = " Opens a `PartitionIo` session backed by block devices in the caller-provided `block_dir`.\n\n Under the capability-delegated permission model, the paver component does not hold ambient\n access to all system block partitions. Instead, the caller (such as `system-updater` or\n `fastboot`) is responsible for routing the required block device capabilities into its own\n namespace (for example, via a scoped `/block` or `/block/ota` directory exposed by `fshost`)\n and passing `block_dir` to the paver for the duration of the `PartitionIo` session.\n\n `block_dir` is expected to follow the `fshost` `/block` directory layout (see\n https://fuchsia.dev/fuchsia-src/development/storage/storage-partition-routing): each entry\n `<entry>/` is a subdirectory containing a `fuchsia.storage.block.Block` protocol node at\n `<entry>/fuchsia.storage.block.Block`.\n\n `partition_io` will be closed on error, with an epitaph provided on failure reason.\n"]
7413 pub fn open_partition_io(
7414 &self,
7415
7416 block_dir: impl ::fidl_next::Encode<
7417 ::fidl_next::ClientEnd<
7418 ::fidl_next_fuchsia_io::Directory,
7419 ::fidl_next::wire::fuchsia::Channel,
7420 >,
7421 <___T as ::fidl_next::Transport>::SendBuffer,
7422 >,
7423
7424 partition_io: impl ::fidl_next::Encode<
7425 ::fidl_next::ServerEnd<crate::PartitionIo, ::fidl_next::wire::fuchsia::Channel>,
7426 <___T as ::fidl_next::Transport>::SendBuffer,
7427 >,
7428 ) -> ::fidl_next::SendFuture<'_, ___T>
7429 where
7430 <___T as ::fidl_next::Transport>::SendBuffer:
7431 ::fidl_next::encoder::InternalHandleEncoder,
7432 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7433 {
7434 self.open_partition_io_with(crate::generic::PaverOpenPartitionIoRequest {
7435 block_dir,
7436
7437 partition_io,
7438 })
7439 }
7440
7441 #[doc = " Opens a `PartitionIo` session backed by block devices in the caller-provided `block_dir`.\n\n Under the capability-delegated permission model, the paver component does not hold ambient\n access to all system block partitions. Instead, the caller (such as `system-updater` or\n `fastboot`) is responsible for routing the required block device capabilities into its own\n namespace (for example, via a scoped `/block` or `/block/ota` directory exposed by `fshost`)\n and passing `block_dir` to the paver for the duration of the `PartitionIo` session.\n\n `block_dir` is expected to follow the `fshost` `/block` directory layout (see\n https://fuchsia.dev/fuchsia-src/development/storage/storage-partition-routing): each entry\n `<entry>/` is a subdirectory containing a `fuchsia.storage.block.Block` protocol node at\n `<entry>/fuchsia.storage.block.Block`.\n\n `partition_io` will be closed on error, with an epitaph provided on failure reason.\n"]
7442 pub fn open_partition_io_with<___R>(
7443 &self,
7444 request: ___R,
7445 ) -> ::fidl_next::SendFuture<'_, ___T>
7446 where
7447 ___R: ::fidl_next::Encode<
7448 crate::wire::PaverOpenPartitionIoRequest,
7449 <___T as ::fidl_next::Transport>::SendBuffer,
7450 >,
7451 {
7452 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7453 5030526122350152055,
7454 <super::OpenPartitionIo as ::fidl_next::Method>::FLEXIBILITY,
7455 request,
7456 ))
7457 }
7458
7459 #[doc = " Like `FindDataSink`, but the returned block device will be dynamic, supporting partition\n table manipulation.\n\n `data_sink` will be closed on error, with an epitaph provided on failure reason.\n"]
7460 pub fn find_partition_table_manager(
7461 &self,
7462
7463 data_sink: impl ::fidl_next::Encode<
7464 ::fidl_next::ServerEnd<
7465 crate::DynamicDataSink,
7466 ::fidl_next::wire::fuchsia::Channel,
7467 >,
7468 <___T as ::fidl_next::Transport>::SendBuffer,
7469 >,
7470 ) -> ::fidl_next::SendFuture<'_, ___T>
7471 where
7472 <___T as ::fidl_next::Transport>::SendBuffer:
7473 ::fidl_next::encoder::InternalHandleEncoder,
7474 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7475 {
7476 self.find_partition_table_manager_with(
7477 crate::generic::PaverFindPartitionTableManagerRequest { data_sink },
7478 )
7479 }
7480
7481 #[doc = " Like `FindDataSink`, but the returned block device will be dynamic, supporting partition\n table manipulation.\n\n `data_sink` will be closed on error, with an epitaph provided on failure reason.\n"]
7482 pub fn find_partition_table_manager_with<___R>(
7483 &self,
7484 request: ___R,
7485 ) -> ::fidl_next::SendFuture<'_, ___T>
7486 where
7487 ___R: ::fidl_next::Encode<
7488 crate::wire::PaverFindPartitionTableManagerRequest,
7489 <___T as ::fidl_next::Transport>::SendBuffer,
7490 >,
7491 {
7492 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7493 1196021039440196731,
7494 <super::FindPartitionTableManager as ::fidl_next::Method>::FLEXIBILITY,
7495 request,
7496 ))
7497 }
7498
7499 #[doc = " Attempts to auto-discover the boot manager.\n\n `boot_manager` will be closed on error, with an epitaph provided on failure reason.\n ZX_ERR_NOT_SUPPORTED indicates lack of support and configuration A is always booted from.\n"]
7500 pub fn find_boot_manager(
7501 &self,
7502
7503 boot_manager: impl ::fidl_next::Encode<
7504 ::fidl_next::ServerEnd<crate::BootManager, ::fidl_next::wire::fuchsia::Channel>,
7505 <___T as ::fidl_next::Transport>::SendBuffer,
7506 >,
7507 ) -> ::fidl_next::SendFuture<'_, ___T>
7508 where
7509 <___T as ::fidl_next::Transport>::SendBuffer:
7510 ::fidl_next::encoder::InternalHandleEncoder,
7511 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7512 {
7513 self.find_boot_manager_with(crate::generic::PaverFindBootManagerRequest {
7514 boot_manager,
7515 })
7516 }
7517
7518 #[doc = " Attempts to auto-discover the boot manager.\n\n `boot_manager` will be closed on error, with an epitaph provided on failure reason.\n ZX_ERR_NOT_SUPPORTED indicates lack of support and configuration A is always booted from.\n"]
7519 pub fn find_boot_manager_with<___R>(
7520 &self,
7521 request: ___R,
7522 ) -> ::fidl_next::SendFuture<'_, ___T>
7523 where
7524 ___R: ::fidl_next::Encode<
7525 crate::wire::PaverFindBootManagerRequest,
7526 <___T as ::fidl_next::Transport>::SendBuffer,
7527 >,
7528 {
7529 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7530 6723886364918555715,
7531 <super::FindBootManager as ::fidl_next::Method>::FLEXIBILITY,
7532 request,
7533 ))
7534 }
7535
7536 #[doc = " Find Sysconfig service.\n"]
7537 pub fn find_sysconfig(
7538 &self,
7539
7540 sysconfig: impl ::fidl_next::Encode<
7541 ::fidl_next::ServerEnd<crate::Sysconfig, ::fidl_next::wire::fuchsia::Channel>,
7542 <___T as ::fidl_next::Transport>::SendBuffer,
7543 >,
7544 ) -> ::fidl_next::SendFuture<'_, ___T>
7545 where
7546 <___T as ::fidl_next::Transport>::SendBuffer:
7547 ::fidl_next::encoder::InternalHandleEncoder,
7548 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7549 {
7550 self.find_sysconfig_with(crate::generic::PaverFindSysconfigRequest { sysconfig })
7551 }
7552
7553 #[doc = " Find Sysconfig service.\n"]
7554 pub fn find_sysconfig_with<___R>(
7555 &self,
7556 request: ___R,
7557 ) -> ::fidl_next::SendFuture<'_, ___T>
7558 where
7559 ___R: ::fidl_next::Encode<
7560 crate::wire::PaverFindSysconfigRequest,
7561 <___T as ::fidl_next::Transport>::SendBuffer,
7562 >,
7563 {
7564 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7565 6065463985970724909,
7566 <super::FindSysconfig as ::fidl_next::Method>::FLEXIBILITY,
7567 request,
7568 ))
7569 }
7570 }
7571
7572 #[repr(transparent)]
7574 pub struct PaverServer<___T: ::fidl_next::Transport> {
7575 server: ::fidl_next::protocol::Server<___T>,
7576 }
7577
7578 impl<___T> PaverServer<___T> where ___T: ::fidl_next::Transport {}
7579 }
7580}
7581
7582#[diagnostic::on_unimplemented(
7583 note = "If {Self} implements the non-local PaverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
7584)]
7585
7586pub trait PaverLocalClientHandler<
7590 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7591 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7592>
7593{
7594}
7595
7596impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Paver
7597where
7598 ___H: PaverLocalClientHandler<___T>,
7599 ___T: ::fidl_next::Transport,
7600{
7601 async fn on_event(
7602 handler: &mut ___H,
7603 mut message: ::fidl_next::Message<___T>,
7604 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7605 match *message.header().ordinal {
7606 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7607 }
7608 }
7609}
7610
7611#[diagnostic::on_unimplemented(
7612 note = "If {Self} implements the non-local PaverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
7613)]
7614
7615pub trait PaverLocalServerHandler<
7619 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7620 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7621>
7622{
7623 #[doc = " Attempts to auto-discover the data sink where assets and volumes will get paved to.\n On devices with GPT, the partition must have a valid FVM partition in order for\n auto-discovery to find it. If multiple devices are found suitable, error is returned.\n\n `data_sink` will be closed on error, with an epitaph provided on failure reason.\n"]
7624 fn find_data_sink(
7625 &mut self,
7626
7627 request: ::fidl_next::Request<paver::FindDataSink, ___T>,
7628 ) -> impl ::core::future::Future<Output = ()>;
7629
7630 #[doc = " Opens a `PartitionIo` session backed by block devices in the caller-provided `block_dir`.\n\n Under the capability-delegated permission model, the paver component does not hold ambient\n access to all system block partitions. Instead, the caller (such as `system-updater` or\n `fastboot`) is responsible for routing the required block device capabilities into its own\n namespace (for example, via a scoped `/block` or `/block/ota` directory exposed by `fshost`)\n and passing `block_dir` to the paver for the duration of the `PartitionIo` session.\n\n `block_dir` is expected to follow the `fshost` `/block` directory layout (see\n https://fuchsia.dev/fuchsia-src/development/storage/storage-partition-routing): each entry\n `<entry>/` is a subdirectory containing a `fuchsia.storage.block.Block` protocol node at\n `<entry>/fuchsia.storage.block.Block`.\n\n `partition_io` will be closed on error, with an epitaph provided on failure reason.\n"]
7631 fn open_partition_io(
7632 &mut self,
7633
7634 request: ::fidl_next::Request<paver::OpenPartitionIo, ___T>,
7635 ) -> impl ::core::future::Future<Output = ()>;
7636
7637 #[doc = " Like `FindDataSink`, but the returned block device will be dynamic, supporting partition\n table manipulation.\n\n `data_sink` will be closed on error, with an epitaph provided on failure reason.\n"]
7638 fn find_partition_table_manager(
7639 &mut self,
7640
7641 request: ::fidl_next::Request<paver::FindPartitionTableManager, ___T>,
7642 ) -> impl ::core::future::Future<Output = ()>;
7643
7644 #[doc = " Attempts to auto-discover the boot manager.\n\n `boot_manager` will be closed on error, with an epitaph provided on failure reason.\n ZX_ERR_NOT_SUPPORTED indicates lack of support and configuration A is always booted from.\n"]
7645 fn find_boot_manager(
7646 &mut self,
7647
7648 request: ::fidl_next::Request<paver::FindBootManager, ___T>,
7649 ) -> impl ::core::future::Future<Output = ()>;
7650
7651 #[doc = " Find Sysconfig service.\n"]
7652 fn find_sysconfig(
7653 &mut self,
7654
7655 request: ::fidl_next::Request<paver::FindSysconfig, ___T>,
7656 ) -> impl ::core::future::Future<Output = ()>;
7657}
7658
7659impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Paver
7660where
7661 ___H: PaverLocalServerHandler<___T>,
7662 ___T: ::fidl_next::Transport,
7663 for<'de> crate::wire::PaverFindDataSinkRequest: ::fidl_next::Decode<
7664 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7665 Constraint = (),
7666 >,
7667 for<'de> crate::wire::PaverOpenPartitionIoRequest: ::fidl_next::Decode<
7668 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7669 Constraint = (),
7670 >,
7671 for<'de> crate::wire::PaverFindPartitionTableManagerRequest: ::fidl_next::Decode<
7672 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7673 Constraint = (),
7674 >,
7675 for<'de> crate::wire::PaverFindBootManagerRequest: ::fidl_next::Decode<
7676 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7677 Constraint = (),
7678 >,
7679 for<'de> crate::wire::PaverFindSysconfigRequest: ::fidl_next::Decode<
7680 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7681 Constraint = (),
7682 >,
7683{
7684 async fn on_one_way(
7685 handler: &mut ___H,
7686 mut message: ::fidl_next::Message<___T>,
7687 ) -> ::core::result::Result<
7688 (),
7689 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7690 > {
7691 match *message.header().ordinal {
7692 8145380905251807465 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7693 Ok(decoded) => {
7694 handler.find_data_sink(::fidl_next::Request::from_decoded(decoded)).await;
7695 Ok(())
7696 }
7697 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7698 ordinal: 8145380905251807465,
7699 error,
7700 }),
7701 },
7702
7703 5030526122350152055 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7704 Ok(decoded) => {
7705 handler.open_partition_io(::fidl_next::Request::from_decoded(decoded)).await;
7706 Ok(())
7707 }
7708 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7709 ordinal: 5030526122350152055,
7710 error,
7711 }),
7712 },
7713
7714 1196021039440196731 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7715 Ok(decoded) => {
7716 handler
7717 .find_partition_table_manager(::fidl_next::Request::from_decoded(decoded))
7718 .await;
7719 Ok(())
7720 }
7721 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7722 ordinal: 1196021039440196731,
7723 error,
7724 }),
7725 },
7726
7727 6723886364918555715 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7728 Ok(decoded) => {
7729 handler.find_boot_manager(::fidl_next::Request::from_decoded(decoded)).await;
7730 Ok(())
7731 }
7732 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7733 ordinal: 6723886364918555715,
7734 error,
7735 }),
7736 },
7737
7738 6065463985970724909 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7739 Ok(decoded) => {
7740 handler.find_sysconfig(::fidl_next::Request::from_decoded(decoded)).await;
7741 Ok(())
7742 }
7743 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7744 ordinal: 6065463985970724909,
7745 error,
7746 }),
7747 },
7748
7749 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7750 }
7751 }
7752
7753 async fn on_two_way(
7754 handler: &mut ___H,
7755 mut message: ::fidl_next::Message<___T>,
7756 responder: ::fidl_next::protocol::Responder<___T>,
7757 ) -> ::core::result::Result<
7758 (),
7759 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7760 > {
7761 match *message.header().ordinal {
7762 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7763 }
7764 }
7765}
7766
7767pub trait PaverClientHandler<
7771 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7772 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7773>
7774{
7775}
7776
7777impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Paver
7778where
7779 ___H: PaverClientHandler<___T> + ::core::marker::Send,
7780 ___T: ::fidl_next::Transport,
7781{
7782 async fn on_event(
7783 handler: &mut ___H,
7784 mut message: ::fidl_next::Message<___T>,
7785 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7786 match *message.header().ordinal {
7787 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7788 }
7789 }
7790}
7791
7792pub trait PaverServerHandler<
7796 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7797 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7798>
7799{
7800 #[doc = " Attempts to auto-discover the data sink where assets and volumes will get paved to.\n On devices with GPT, the partition must have a valid FVM partition in order for\n auto-discovery to find it. If multiple devices are found suitable, error is returned.\n\n `data_sink` will be closed on error, with an epitaph provided on failure reason.\n"]
7801 fn find_data_sink(
7802 &mut self,
7803
7804 request: ::fidl_next::Request<paver::FindDataSink, ___T>,
7805 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7806
7807 #[doc = " Opens a `PartitionIo` session backed by block devices in the caller-provided `block_dir`.\n\n Under the capability-delegated permission model, the paver component does not hold ambient\n access to all system block partitions. Instead, the caller (such as `system-updater` or\n `fastboot`) is responsible for routing the required block device capabilities into its own\n namespace (for example, via a scoped `/block` or `/block/ota` directory exposed by `fshost`)\n and passing `block_dir` to the paver for the duration of the `PartitionIo` session.\n\n `block_dir` is expected to follow the `fshost` `/block` directory layout (see\n https://fuchsia.dev/fuchsia-src/development/storage/storage-partition-routing): each entry\n `<entry>/` is a subdirectory containing a `fuchsia.storage.block.Block` protocol node at\n `<entry>/fuchsia.storage.block.Block`.\n\n `partition_io` will be closed on error, with an epitaph provided on failure reason.\n"]
7808 fn open_partition_io(
7809 &mut self,
7810
7811 request: ::fidl_next::Request<paver::OpenPartitionIo, ___T>,
7812 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7813
7814 #[doc = " Like `FindDataSink`, but the returned block device will be dynamic, supporting partition\n table manipulation.\n\n `data_sink` will be closed on error, with an epitaph provided on failure reason.\n"]
7815 fn find_partition_table_manager(
7816 &mut self,
7817
7818 request: ::fidl_next::Request<paver::FindPartitionTableManager, ___T>,
7819 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7820
7821 #[doc = " Attempts to auto-discover the boot manager.\n\n `boot_manager` will be closed on error, with an epitaph provided on failure reason.\n ZX_ERR_NOT_SUPPORTED indicates lack of support and configuration A is always booted from.\n"]
7822 fn find_boot_manager(
7823 &mut self,
7824
7825 request: ::fidl_next::Request<paver::FindBootManager, ___T>,
7826 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7827
7828 #[doc = " Find Sysconfig service.\n"]
7829 fn find_sysconfig(
7830 &mut self,
7831
7832 request: ::fidl_next::Request<paver::FindSysconfig, ___T>,
7833 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7834}
7835
7836impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Paver
7837where
7838 ___H: PaverServerHandler<___T> + ::core::marker::Send,
7839 ___T: ::fidl_next::Transport,
7840 for<'de> crate::wire::PaverFindDataSinkRequest: ::fidl_next::Decode<
7841 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7842 Constraint = (),
7843 >,
7844 for<'de> crate::wire::PaverOpenPartitionIoRequest: ::fidl_next::Decode<
7845 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7846 Constraint = (),
7847 >,
7848 for<'de> crate::wire::PaverFindPartitionTableManagerRequest: ::fidl_next::Decode<
7849 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7850 Constraint = (),
7851 >,
7852 for<'de> crate::wire::PaverFindBootManagerRequest: ::fidl_next::Decode<
7853 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7854 Constraint = (),
7855 >,
7856 for<'de> crate::wire::PaverFindSysconfigRequest: ::fidl_next::Decode<
7857 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7858 Constraint = (),
7859 >,
7860{
7861 async fn on_one_way(
7862 handler: &mut ___H,
7863 mut message: ::fidl_next::Message<___T>,
7864 ) -> ::core::result::Result<
7865 (),
7866 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7867 > {
7868 match *message.header().ordinal {
7869 8145380905251807465 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7870 Ok(decoded) => {
7871 handler.find_data_sink(::fidl_next::Request::from_decoded(decoded)).await;
7872 Ok(())
7873 }
7874 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7875 ordinal: 8145380905251807465,
7876 error,
7877 }),
7878 },
7879
7880 5030526122350152055 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7881 Ok(decoded) => {
7882 handler.open_partition_io(::fidl_next::Request::from_decoded(decoded)).await;
7883 Ok(())
7884 }
7885 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7886 ordinal: 5030526122350152055,
7887 error,
7888 }),
7889 },
7890
7891 1196021039440196731 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7892 Ok(decoded) => {
7893 handler
7894 .find_partition_table_manager(::fidl_next::Request::from_decoded(decoded))
7895 .await;
7896 Ok(())
7897 }
7898 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7899 ordinal: 1196021039440196731,
7900 error,
7901 }),
7902 },
7903
7904 6723886364918555715 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7905 Ok(decoded) => {
7906 handler.find_boot_manager(::fidl_next::Request::from_decoded(decoded)).await;
7907 Ok(())
7908 }
7909 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7910 ordinal: 6723886364918555715,
7911 error,
7912 }),
7913 },
7914
7915 6065463985970724909 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7916 Ok(decoded) => {
7917 handler.find_sysconfig(::fidl_next::Request::from_decoded(decoded)).await;
7918 Ok(())
7919 }
7920 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7921 ordinal: 6065463985970724909,
7922 error,
7923 }),
7924 },
7925
7926 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7927 }
7928 }
7929
7930 async fn on_two_way(
7931 handler: &mut ___H,
7932 mut message: ::fidl_next::Message<___T>,
7933 responder: ::fidl_next::protocol::Responder<___T>,
7934 ) -> ::core::result::Result<
7935 (),
7936 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7937 > {
7938 match *message.header().ordinal {
7939 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7940 }
7941 }
7942}
7943
7944impl<___T> PaverClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
7945
7946impl<___H, ___T> PaverLocalClientHandler<___T> for ::fidl_next::Local<___H>
7947where
7948 ___H: PaverClientHandler<___T>,
7949 ___T: ::fidl_next::Transport,
7950{
7951}
7952
7953impl<___H, ___T> PaverLocalServerHandler<___T> for ::fidl_next::Local<___H>
7954where
7955 ___H: PaverServerHandler<___T>,
7956 ___T: ::fidl_next::Transport,
7957{
7958 async fn find_data_sink(&mut self, request: ::fidl_next::Request<paver::FindDataSink, ___T>) {
7959 ___H::find_data_sink(&mut self.0, request).await
7960 }
7961
7962 async fn open_partition_io(
7963 &mut self,
7964
7965 request: ::fidl_next::Request<paver::OpenPartitionIo, ___T>,
7966 ) {
7967 ___H::open_partition_io(&mut self.0, request).await
7968 }
7969
7970 async fn find_partition_table_manager(
7971 &mut self,
7972
7973 request: ::fidl_next::Request<paver::FindPartitionTableManager, ___T>,
7974 ) {
7975 ___H::find_partition_table_manager(&mut self.0, request).await
7976 }
7977
7978 async fn find_boot_manager(
7979 &mut self,
7980
7981 request: ::fidl_next::Request<paver::FindBootManager, ___T>,
7982 ) {
7983 ___H::find_boot_manager(&mut self.0, request).await
7984 }
7985
7986 async fn find_sysconfig(&mut self, request: ::fidl_next::Request<paver::FindSysconfig, ___T>) {
7987 ___H::find_sysconfig(&mut self.0, request).await
7988 }
7989}
7990
7991#[doc = " Protocol that provides access to sysconfig-data sub-partition in sysconfig partition.\n The main user of the protocol are pkg-solver and system update-checker, which need to\n read/write sysconfig-data channel.\n"]
7993#[derive(PartialEq, Debug)]
7994pub struct Sysconfig;
7995
7996#[cfg(target_os = "fuchsia")]
7997impl ::fidl_next::HasTransport for Sysconfig {
7998 type Transport = ::fidl_next::fuchsia::zx::Channel;
7999}
8000
8001pub mod sysconfig {
8002 pub mod prelude {
8003 pub use crate::{
8004 Sysconfig, SysconfigClientHandler, SysconfigLocalClientHandler,
8005 SysconfigLocalServerHandler, SysconfigServerHandler, sysconfig,
8006 };
8007
8008 pub use crate::natural::SysconfigFlushResponse;
8009
8010 pub use crate::natural::SysconfigWipeResponse;
8011
8012 pub use crate::natural::SysconfigWriteRequest;
8013
8014 pub use crate::natural::SysconfigWriteResponse;
8015
8016 pub use crate::natural::SysconfigGetPartitionSizeResponse;
8017
8018 pub use crate::natural::SysconfigReadResponse;
8019 }
8020
8021 pub struct Read;
8022
8023 impl ::fidl_next::Method for Read {
8024 const ORDINAL: u64 = 3822484593781647100;
8025 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8026 ::fidl_next::protocol::Flexibility::Strict;
8027
8028 type Protocol = crate::Sysconfig;
8029
8030 type Request = ::fidl_next::wire::EmptyMessageBody;
8031 }
8032
8033 impl ::fidl_next::TwoWayMethod for Read {
8034 type Response = ::fidl_next::wire::Result<
8035 'static,
8036 crate::wire::SysconfigReadResponse,
8037 ::fidl_next::wire::fuchsia::Status,
8038 >;
8039 }
8040
8041 impl<___R> ::fidl_next::Respond<___R> for Read {
8042 type Output = ::core::result::Result<
8043 crate::generic::SysconfigReadResponse<___R>,
8044 ::fidl_next::never::Never,
8045 >;
8046
8047 fn respond(response: ___R) -> Self::Output {
8048 ::core::result::Result::Ok(crate::generic::SysconfigReadResponse { data: response })
8049 }
8050 }
8051
8052 impl<___R> ::fidl_next::RespondErr<___R> for Read {
8053 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8054
8055 fn respond_err(response: ___R) -> Self::Output {
8056 ::core::result::Result::Err(response)
8057 }
8058 }
8059
8060 pub struct Write;
8061
8062 impl ::fidl_next::Method for Write {
8063 const ORDINAL: u64 = 4122912147716632945;
8064 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8065 ::fidl_next::protocol::Flexibility::Strict;
8066
8067 type Protocol = crate::Sysconfig;
8068
8069 type Request = crate::wire::SysconfigWriteRequest;
8070 }
8071
8072 impl ::fidl_next::TwoWayMethod for Write {
8073 type Response = ::fidl_next::wire::Strict<crate::wire::SysconfigWriteResponse>;
8074 }
8075
8076 impl<___R> ::fidl_next::Respond<___R> for Write {
8077 type Output = ::fidl_next::Strict<crate::generic::SysconfigWriteResponse<___R>>;
8078
8079 fn respond(response: ___R) -> Self::Output {
8080 ::fidl_next::Strict(crate::generic::SysconfigWriteResponse { status: response })
8081 }
8082 }
8083
8084 pub struct GetPartitionSize;
8085
8086 impl ::fidl_next::Method for GetPartitionSize {
8087 const ORDINAL: u64 = 2697873379548694871;
8088 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8089 ::fidl_next::protocol::Flexibility::Strict;
8090
8091 type Protocol = crate::Sysconfig;
8092
8093 type Request = ::fidl_next::wire::EmptyMessageBody;
8094 }
8095
8096 impl ::fidl_next::TwoWayMethod for GetPartitionSize {
8097 type Response = ::fidl_next::wire::Result<
8098 'static,
8099 crate::wire::SysconfigGetPartitionSizeResponse,
8100 ::fidl_next::wire::fuchsia::Status,
8101 >;
8102 }
8103
8104 impl<___R> ::fidl_next::Respond<___R> for GetPartitionSize {
8105 type Output = ::core::result::Result<
8106 crate::generic::SysconfigGetPartitionSizeResponse<___R>,
8107 ::fidl_next::never::Never,
8108 >;
8109
8110 fn respond(response: ___R) -> Self::Output {
8111 ::core::result::Result::Ok(crate::generic::SysconfigGetPartitionSizeResponse {
8112 size: response,
8113 })
8114 }
8115 }
8116
8117 impl<___R> ::fidl_next::RespondErr<___R> for GetPartitionSize {
8118 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8119
8120 fn respond_err(response: ___R) -> Self::Output {
8121 ::core::result::Result::Err(response)
8122 }
8123 }
8124
8125 pub struct Flush;
8126
8127 impl ::fidl_next::Method for Flush {
8128 const ORDINAL: u64 = 895120878127285190;
8129 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8130 ::fidl_next::protocol::Flexibility::Strict;
8131
8132 type Protocol = crate::Sysconfig;
8133
8134 type Request = ::fidl_next::wire::EmptyMessageBody;
8135 }
8136
8137 impl ::fidl_next::TwoWayMethod for Flush {
8138 type Response = ::fidl_next::wire::Strict<crate::wire::SysconfigFlushResponse>;
8139 }
8140
8141 impl<___R> ::fidl_next::Respond<___R> for Flush {
8142 type Output = ::fidl_next::Strict<crate::generic::SysconfigFlushResponse<___R>>;
8143
8144 fn respond(response: ___R) -> Self::Output {
8145 ::fidl_next::Strict(crate::generic::SysconfigFlushResponse { status: response })
8146 }
8147 }
8148
8149 pub struct Wipe;
8150
8151 impl ::fidl_next::Method for Wipe {
8152 const ORDINAL: u64 = 3793777556545582850;
8153 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8154 ::fidl_next::protocol::Flexibility::Strict;
8155
8156 type Protocol = crate::Sysconfig;
8157
8158 type Request = ::fidl_next::wire::EmptyMessageBody;
8159 }
8160
8161 impl ::fidl_next::TwoWayMethod for Wipe {
8162 type Response = ::fidl_next::wire::Strict<crate::wire::SysconfigWipeResponse>;
8163 }
8164
8165 impl<___R> ::fidl_next::Respond<___R> for Wipe {
8166 type Output = ::fidl_next::Strict<crate::generic::SysconfigWipeResponse<___R>>;
8167
8168 fn respond(response: ___R) -> Self::Output {
8169 ::fidl_next::Strict(crate::generic::SysconfigWipeResponse { status: response })
8170 }
8171 }
8172
8173 mod ___detail {
8174 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Sysconfig
8175 where
8176 ___T: ::fidl_next::Transport,
8177 {
8178 type Client = SysconfigClient<___T>;
8179 type Server = SysconfigServer<___T>;
8180 }
8181
8182 #[repr(transparent)]
8184 pub struct SysconfigClient<___T: ::fidl_next::Transport> {
8185 #[allow(dead_code)]
8186 client: ::fidl_next::protocol::Client<___T>,
8187 }
8188
8189 impl<___T> SysconfigClient<___T>
8190 where
8191 ___T: ::fidl_next::Transport,
8192 {
8193 #[doc = " Read from the sub-partition\n"]
8194 pub fn read(&self) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T> {
8195 ::fidl_next::TwoWayFuture::from_untyped(
8196 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8197 3822484593781647100,
8198 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
8199 (),
8200 ),
8201 )
8202 }
8203
8204 #[doc = " Writes to the sub-partition\n"]
8205 pub fn write(
8206 &self,
8207
8208 payload: impl ::fidl_next::Encode<
8209 ::fidl_next_fuchsia_mem::wire::Buffer,
8210 <___T as ::fidl_next::Transport>::SendBuffer,
8211 >,
8212 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
8213 where
8214 <___T as ::fidl_next::Transport>::SendBuffer:
8215 ::fidl_next::encoder::InternalHandleEncoder,
8216 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8217 {
8218 self.write_with(crate::generic::SysconfigWriteRequest { payload })
8219 }
8220
8221 #[doc = " Writes to the sub-partition\n"]
8222 pub fn write_with<___R>(
8223 &self,
8224 request: ___R,
8225 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
8226 where
8227 ___R: ::fidl_next::Encode<
8228 crate::wire::SysconfigWriteRequest,
8229 <___T as ::fidl_next::Transport>::SendBuffer,
8230 >,
8231 {
8232 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8233 4122912147716632945,
8234 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
8235 request,
8236 ))
8237 }
8238
8239 #[doc = " Get sub-partition size.\n"]
8240 pub fn get_partition_size(
8241 &self,
8242 ) -> ::fidl_next::TwoWayFuture<'_, super::GetPartitionSize, ___T> {
8243 ::fidl_next::TwoWayFuture::from_untyped(
8244 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8245 2697873379548694871,
8246 <super::GetPartitionSize as ::fidl_next::Method>::FLEXIBILITY,
8247 (),
8248 ),
8249 )
8250 }
8251
8252 #[doc = " Flush all previously buffered data to persistent storage.\n"]
8253 pub fn flush(&self) -> ::fidl_next::TwoWayFuture<'_, super::Flush, ___T> {
8254 ::fidl_next::TwoWayFuture::from_untyped(
8255 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8256 895120878127285190,
8257 <super::Flush as ::fidl_next::Method>::FLEXIBILITY,
8258 (),
8259 ),
8260 )
8261 }
8262
8263 #[doc = " Wipe all data in the sub-partition (write 0 to all bytes).\n"]
8264 pub fn wipe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Wipe, ___T> {
8265 ::fidl_next::TwoWayFuture::from_untyped(
8266 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8267 3793777556545582850,
8268 <super::Wipe as ::fidl_next::Method>::FLEXIBILITY,
8269 (),
8270 ),
8271 )
8272 }
8273 }
8274
8275 #[repr(transparent)]
8277 pub struct SysconfigServer<___T: ::fidl_next::Transport> {
8278 server: ::fidl_next::protocol::Server<___T>,
8279 }
8280
8281 impl<___T> SysconfigServer<___T> where ___T: ::fidl_next::Transport {}
8282 }
8283}
8284
8285#[diagnostic::on_unimplemented(
8286 note = "If {Self} implements the non-local SysconfigClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
8287)]
8288
8289pub trait SysconfigLocalClientHandler<
8293 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8294 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8295>
8296{
8297}
8298
8299impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Sysconfig
8300where
8301 ___H: SysconfigLocalClientHandler<___T>,
8302 ___T: ::fidl_next::Transport,
8303{
8304 async fn on_event(
8305 handler: &mut ___H,
8306 mut message: ::fidl_next::Message<___T>,
8307 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8308 match *message.header().ordinal {
8309 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8310 }
8311 }
8312}
8313
8314#[diagnostic::on_unimplemented(
8315 note = "If {Self} implements the non-local SysconfigServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
8316)]
8317
8318pub trait SysconfigLocalServerHandler<
8322 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8323 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8324>
8325{
8326 #[doc = " Read from the sub-partition\n"]
8327 fn read(
8328 &mut self,
8329
8330 responder: ::fidl_next::Responder<sysconfig::Read, ___T>,
8331 ) -> impl ::core::future::Future<Output = ()>;
8332
8333 #[doc = " Writes to the sub-partition\n"]
8334 fn write(
8335 &mut self,
8336
8337 request: ::fidl_next::Request<sysconfig::Write, ___T>,
8338
8339 responder: ::fidl_next::Responder<sysconfig::Write, ___T>,
8340 ) -> impl ::core::future::Future<Output = ()>;
8341
8342 #[doc = " Get sub-partition size.\n"]
8343 fn get_partition_size(
8344 &mut self,
8345
8346 responder: ::fidl_next::Responder<sysconfig::GetPartitionSize, ___T>,
8347 ) -> impl ::core::future::Future<Output = ()>;
8348
8349 #[doc = " Flush all previously buffered data to persistent storage.\n"]
8350 fn flush(
8351 &mut self,
8352
8353 responder: ::fidl_next::Responder<sysconfig::Flush, ___T>,
8354 ) -> impl ::core::future::Future<Output = ()>;
8355
8356 #[doc = " Wipe all data in the sub-partition (write 0 to all bytes).\n"]
8357 fn wipe(
8358 &mut self,
8359
8360 responder: ::fidl_next::Responder<sysconfig::Wipe, ___T>,
8361 ) -> impl ::core::future::Future<Output = ()>;
8362}
8363
8364impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Sysconfig
8365where
8366 ___H: SysconfigLocalServerHandler<___T>,
8367 ___T: ::fidl_next::Transport,
8368 for<'de> crate::wire::SysconfigWriteRequest: ::fidl_next::Decode<
8369 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8370 Constraint = (),
8371 >,
8372{
8373 async fn on_one_way(
8374 handler: &mut ___H,
8375 mut message: ::fidl_next::Message<___T>,
8376 ) -> ::core::result::Result<
8377 (),
8378 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8379 > {
8380 match *message.header().ordinal {
8381 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8382 }
8383 }
8384
8385 async fn on_two_way(
8386 handler: &mut ___H,
8387 mut message: ::fidl_next::Message<___T>,
8388 responder: ::fidl_next::protocol::Responder<___T>,
8389 ) -> ::core::result::Result<
8390 (),
8391 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8392 > {
8393 match *message.header().ordinal {
8394 3822484593781647100 => {
8395 let responder = ::fidl_next::Responder::from_untyped(responder);
8396
8397 handler.read(responder).await;
8398 Ok(())
8399 }
8400
8401 4122912147716632945 => {
8402 let responder = ::fidl_next::Responder::from_untyped(responder);
8403
8404 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8405 Ok(decoded) => {
8406 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
8407 Ok(())
8408 }
8409 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8410 ordinal: 4122912147716632945,
8411 error,
8412 }),
8413 }
8414 }
8415
8416 2697873379548694871 => {
8417 let responder = ::fidl_next::Responder::from_untyped(responder);
8418
8419 handler.get_partition_size(responder).await;
8420 Ok(())
8421 }
8422
8423 895120878127285190 => {
8424 let responder = ::fidl_next::Responder::from_untyped(responder);
8425
8426 handler.flush(responder).await;
8427 Ok(())
8428 }
8429
8430 3793777556545582850 => {
8431 let responder = ::fidl_next::Responder::from_untyped(responder);
8432
8433 handler.wipe(responder).await;
8434 Ok(())
8435 }
8436
8437 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8438 }
8439 }
8440}
8441
8442pub trait SysconfigClientHandler<
8446 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8447 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8448>
8449{
8450}
8451
8452impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Sysconfig
8453where
8454 ___H: SysconfigClientHandler<___T> + ::core::marker::Send,
8455 ___T: ::fidl_next::Transport,
8456{
8457 async fn on_event(
8458 handler: &mut ___H,
8459 mut message: ::fidl_next::Message<___T>,
8460 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8461 match *message.header().ordinal {
8462 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8463 }
8464 }
8465}
8466
8467pub trait SysconfigServerHandler<
8471 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8472 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8473>
8474{
8475 #[doc = " Read from the sub-partition\n"]
8476 fn read(
8477 &mut self,
8478
8479 responder: ::fidl_next::Responder<sysconfig::Read, ___T>,
8480 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8481
8482 #[doc = " Writes to the sub-partition\n"]
8483 fn write(
8484 &mut self,
8485
8486 request: ::fidl_next::Request<sysconfig::Write, ___T>,
8487
8488 responder: ::fidl_next::Responder<sysconfig::Write, ___T>,
8489 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8490
8491 #[doc = " Get sub-partition size.\n"]
8492 fn get_partition_size(
8493 &mut self,
8494
8495 responder: ::fidl_next::Responder<sysconfig::GetPartitionSize, ___T>,
8496 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8497
8498 #[doc = " Flush all previously buffered data to persistent storage.\n"]
8499 fn flush(
8500 &mut self,
8501
8502 responder: ::fidl_next::Responder<sysconfig::Flush, ___T>,
8503 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8504
8505 #[doc = " Wipe all data in the sub-partition (write 0 to all bytes).\n"]
8506 fn wipe(
8507 &mut self,
8508
8509 responder: ::fidl_next::Responder<sysconfig::Wipe, ___T>,
8510 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8511}
8512
8513impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Sysconfig
8514where
8515 ___H: SysconfigServerHandler<___T> + ::core::marker::Send,
8516 ___T: ::fidl_next::Transport,
8517 for<'de> crate::wire::SysconfigWriteRequest: ::fidl_next::Decode<
8518 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8519 Constraint = (),
8520 >,
8521{
8522 async fn on_one_way(
8523 handler: &mut ___H,
8524 mut message: ::fidl_next::Message<___T>,
8525 ) -> ::core::result::Result<
8526 (),
8527 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8528 > {
8529 match *message.header().ordinal {
8530 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8531 }
8532 }
8533
8534 async fn on_two_way(
8535 handler: &mut ___H,
8536 mut message: ::fidl_next::Message<___T>,
8537 responder: ::fidl_next::protocol::Responder<___T>,
8538 ) -> ::core::result::Result<
8539 (),
8540 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8541 > {
8542 match *message.header().ordinal {
8543 3822484593781647100 => {
8544 let responder = ::fidl_next::Responder::from_untyped(responder);
8545
8546 handler.read(responder).await;
8547 Ok(())
8548 }
8549
8550 4122912147716632945 => {
8551 let responder = ::fidl_next::Responder::from_untyped(responder);
8552
8553 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8554 Ok(decoded) => {
8555 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
8556 Ok(())
8557 }
8558 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8559 ordinal: 4122912147716632945,
8560 error,
8561 }),
8562 }
8563 }
8564
8565 2697873379548694871 => {
8566 let responder = ::fidl_next::Responder::from_untyped(responder);
8567
8568 handler.get_partition_size(responder).await;
8569 Ok(())
8570 }
8571
8572 895120878127285190 => {
8573 let responder = ::fidl_next::Responder::from_untyped(responder);
8574
8575 handler.flush(responder).await;
8576 Ok(())
8577 }
8578
8579 3793777556545582850 => {
8580 let responder = ::fidl_next::Responder::from_untyped(responder);
8581
8582 handler.wipe(responder).await;
8583 Ok(())
8584 }
8585
8586 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8587 }
8588 }
8589}
8590
8591impl<___T> SysconfigClientHandler<___T> for ::fidl_next::IgnoreEvents where
8592 ___T: ::fidl_next::Transport
8593{
8594}
8595
8596impl<___H, ___T> SysconfigLocalClientHandler<___T> for ::fidl_next::Local<___H>
8597where
8598 ___H: SysconfigClientHandler<___T>,
8599 ___T: ::fidl_next::Transport,
8600{
8601}
8602
8603impl<___H, ___T> SysconfigLocalServerHandler<___T> for ::fidl_next::Local<___H>
8604where
8605 ___H: SysconfigServerHandler<___T>,
8606 ___T: ::fidl_next::Transport,
8607{
8608 async fn read(&mut self, responder: ::fidl_next::Responder<sysconfig::Read, ___T>) {
8609 ___H::read(&mut self.0, responder).await
8610 }
8611
8612 async fn write(
8613 &mut self,
8614
8615 request: ::fidl_next::Request<sysconfig::Write, ___T>,
8616
8617 responder: ::fidl_next::Responder<sysconfig::Write, ___T>,
8618 ) {
8619 ___H::write(&mut self.0, request, responder).await
8620 }
8621
8622 async fn get_partition_size(
8623 &mut self,
8624
8625 responder: ::fidl_next::Responder<sysconfig::GetPartitionSize, ___T>,
8626 ) {
8627 ___H::get_partition_size(&mut self.0, responder).await
8628 }
8629
8630 async fn flush(&mut self, responder: ::fidl_next::Responder<sysconfig::Flush, ___T>) {
8631 ___H::flush(&mut self.0, responder).await
8632 }
8633
8634 async fn wipe(&mut self, responder: ::fidl_next::Responder<sysconfig::Wipe, ___T>) {
8635 ___H::wipe(&mut self.0, responder).await
8636 }
8637}
8638
8639pub use fidl_next_common_fuchsia_paver::*;