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_component_sandbox::natural::*;
8
9 #[doc = " A token represents a bedrock object. Tokens are reference counted, dropping\n all counts of the token removes the object.\n"]
10 pub type Token = ::fidl_next::fuchsia::zx::EventPair;
11
12 #[derive(Debug, PartialEq)]
13 #[repr(C)]
14 pub struct DirConnector {
15 pub token: ::fidl_next::fuchsia::zx::EventPair,
16 }
17
18 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirConnector, ___E> for DirConnector
19 where
20 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21 ___E: ::fidl_next::fuchsia::HandleEncoder,
22 {
23 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::DirConnector> = unsafe {
24 ::fidl_next::CopyOptimization::enable_if(
25 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
26 ::fidl_next::wire::fuchsia::EventPair,
27 ___E,
28 >>::COPY_OPTIMIZATION
29 .is_enabled(),
30 )
31 };
32
33 #[inline]
34 fn encode(
35 self,
36 encoder_: &mut ___E,
37 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirConnector>,
38 _: (),
39 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
40 ::fidl_next::munge! {
41 let crate::wire::DirConnector {
42 token,
43
44 } = out_;
45 }
46
47 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
48
49 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
50
51 Ok(())
52 }
53 }
54
55 unsafe impl<___E>
56 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::DirConnector>, ___E>
57 for DirConnector
58 where
59 ___E: ::fidl_next::Encoder + ?Sized,
60 DirConnector: ::fidl_next::Encode<crate::wire::DirConnector, ___E>,
61 {
62 #[inline]
63 fn encode_option(
64 this: ::core::option::Option<Self>,
65 encoder: &mut ___E,
66 out: &mut ::core::mem::MaybeUninit<
67 ::fidl_next::wire::Box<'static, crate::wire::DirConnector>,
68 >,
69 _: (),
70 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
71 if let Some(inner) = this {
72 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
73 ::fidl_next::wire::Box::encode_present(out);
74 } else {
75 ::fidl_next::wire::Box::encode_absent(out);
76 }
77
78 Ok(())
79 }
80 }
81
82 impl ::fidl_next::FromWire<crate::wire::DirConnector> for DirConnector {
83 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::DirConnector, Self> = unsafe {
84 ::fidl_next::CopyOptimization::enable_if(
85 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
86 ::fidl_next::wire::fuchsia::EventPair,
87 >>::COPY_OPTIMIZATION
88 .is_enabled(),
89 )
90 };
91
92 #[inline]
93 fn from_wire(wire: crate::wire::DirConnector) -> Self {
94 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
95 }
96 }
97
98 #[derive(Debug, Default, PartialEq)]
99 pub struct AggregateSource {
100 pub dir_connector: ::core::option::Option<crate::natural::DirConnector>,
101
102 pub source_instance_filter: ::core::option::Option<::std::vec::Vec<::std::string::String>>,
103
104 pub renamed_instances: ::core::option::Option<
105 ::std::vec::Vec<::fidl_next_fuchsia_component_decl::natural::NameMapping>,
106 >,
107 }
108
109 impl AggregateSource {
110 fn __max_ordinal(&self) -> usize {
111 if self.renamed_instances.is_some() {
112 return 3;
113 }
114
115 if self.source_instance_filter.is_some() {
116 return 2;
117 }
118
119 if self.dir_connector.is_some() {
120 return 1;
121 }
122
123 0
124 }
125 }
126
127 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AggregateSource<'static>, ___E>
128 for AggregateSource
129 where
130 ___E: ::fidl_next::Encoder + ?Sized,
131 ___E: ::fidl_next::fuchsia::HandleEncoder,
132 {
133 #[inline]
134 fn encode(
135 mut self,
136 encoder: &mut ___E,
137 out: &mut ::core::mem::MaybeUninit<crate::wire::AggregateSource<'static>>,
138 _: (),
139 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
140 ::fidl_next::munge!(let crate::wire::AggregateSource { table } = out);
141
142 let max_ord = self.__max_ordinal();
143
144 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
145 ::fidl_next::Wire::zero_padding(&mut out);
146
147 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
148 ::fidl_next::wire::Envelope,
149 >(encoder, max_ord);
150
151 for i in 1..=max_ord {
152 match i {
153 3 => {
154 if let Some(value) = self.renamed_instances.take() {
155 ::fidl_next::wire::Envelope::encode_value::<
156 ::fidl_next::wire::Vector<
157 'static,
158 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'static>,
159 >,
160 ___E,
161 >(
162 value, preallocated.encoder, &mut out, (4294967295, ())
163 )?;
164 } else {
165 ::fidl_next::wire::Envelope::encode_zero(&mut out)
166 }
167 }
168
169 2 => {
170 if let Some(value) = self.source_instance_filter.take() {
171 ::fidl_next::wire::Envelope::encode_value::<
172 ::fidl_next::wire::Vector<
173 'static,
174 ::fidl_next::wire::String<'static>,
175 >,
176 ___E,
177 >(
178 value, preallocated.encoder, &mut out, (4294967295, 255)
179 )?;
180 } else {
181 ::fidl_next::wire::Envelope::encode_zero(&mut out)
182 }
183 }
184
185 1 => {
186 if let Some(value) = self.dir_connector.take() {
187 ::fidl_next::wire::Envelope::encode_value::<
188 crate::wire::DirConnector,
189 ___E,
190 >(
191 value, preallocated.encoder, &mut out, ()
192 )?;
193 } else {
194 ::fidl_next::wire::Envelope::encode_zero(&mut out)
195 }
196 }
197
198 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
199 }
200 unsafe {
201 preallocated.write_next(out.assume_init_ref());
202 }
203 }
204
205 ::fidl_next::wire::Table::encode_len(table, max_ord);
206
207 Ok(())
208 }
209 }
210
211 impl<'de> ::fidl_next::FromWire<crate::wire::AggregateSource<'de>> for AggregateSource {
212 #[inline]
213 fn from_wire(wire_: crate::wire::AggregateSource<'de>) -> Self {
214 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
215
216 let dir_connector = wire_.table.get(1);
217
218 let source_instance_filter = wire_.table.get(2);
219
220 let renamed_instances = wire_.table.get(3);
221
222 Self {
223
224
225 dir_connector: dir_connector.map(|envelope| ::fidl_next::FromWire::from_wire(
226 unsafe { envelope.read_unchecked::<crate::wire::DirConnector>() }
227 )),
228
229
230 source_instance_filter: source_instance_filter.map(|envelope| ::fidl_next::FromWire::from_wire(
231 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>() }
232 )),
233
234
235 renamed_instances: renamed_instances.map(|envelope| ::fidl_next::FromWire::from_wire(
236 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>>>() }
237 )),
238
239 }
240 }
241 }
242
243 #[derive(Debug, PartialEq)]
244 #[repr(C)]
245 pub struct DictionaryRef {
246 pub token: ::fidl_next::fuchsia::zx::EventPair,
247 }
248
249 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryRef, ___E> for DictionaryRef
250 where
251 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
252 ___E: ::fidl_next::fuchsia::HandleEncoder,
253 {
254 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::DictionaryRef> = unsafe {
255 ::fidl_next::CopyOptimization::enable_if(
256 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
257 ::fidl_next::wire::fuchsia::EventPair,
258 ___E,
259 >>::COPY_OPTIMIZATION
260 .is_enabled(),
261 )
262 };
263
264 #[inline]
265 fn encode(
266 self,
267 encoder_: &mut ___E,
268 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryRef>,
269 _: (),
270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
271 ::fidl_next::munge! {
272 let crate::wire::DictionaryRef {
273 token,
274
275 } = out_;
276 }
277
278 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
279
280 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
281
282 Ok(())
283 }
284 }
285
286 unsafe impl<___E>
287 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::DictionaryRef>, ___E>
288 for DictionaryRef
289 where
290 ___E: ::fidl_next::Encoder + ?Sized,
291 DictionaryRef: ::fidl_next::Encode<crate::wire::DictionaryRef, ___E>,
292 {
293 #[inline]
294 fn encode_option(
295 this: ::core::option::Option<Self>,
296 encoder: &mut ___E,
297 out: &mut ::core::mem::MaybeUninit<
298 ::fidl_next::wire::Box<'static, crate::wire::DictionaryRef>,
299 >,
300 _: (),
301 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
302 if let Some(inner) = this {
303 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
304 ::fidl_next::wire::Box::encode_present(out);
305 } else {
306 ::fidl_next::wire::Box::encode_absent(out);
307 }
308
309 Ok(())
310 }
311 }
312
313 impl ::fidl_next::FromWire<crate::wire::DictionaryRef> for DictionaryRef {
314 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::DictionaryRef, Self> = unsafe {
315 ::fidl_next::CopyOptimization::enable_if(
316 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
317 ::fidl_next::wire::fuchsia::EventPair,
318 >>::COPY_OPTIMIZATION
319 .is_enabled(),
320 )
321 };
322
323 #[inline]
324 fn from_wire(wire: crate::wire::DictionaryRef) -> Self {
325 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
326 }
327 }
328
329 #[derive(Debug, PartialEq)]
330 #[repr(C)]
331 pub struct Connector {
332 pub token: ::fidl_next::fuchsia::zx::EventPair,
333 }
334
335 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Connector, ___E> for Connector
336 where
337 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
338 ___E: ::fidl_next::fuchsia::HandleEncoder,
339 {
340 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::Connector> = unsafe {
341 ::fidl_next::CopyOptimization::enable_if(
342 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
343 ::fidl_next::wire::fuchsia::EventPair,
344 ___E,
345 >>::COPY_OPTIMIZATION
346 .is_enabled(),
347 )
348 };
349
350 #[inline]
351 fn encode(
352 self,
353 encoder_: &mut ___E,
354 out_: &mut ::core::mem::MaybeUninit<crate::wire::Connector>,
355 _: (),
356 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
357 ::fidl_next::munge! {
358 let crate::wire::Connector {
359 token,
360
361 } = out_;
362 }
363
364 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
365
366 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
367
368 Ok(())
369 }
370 }
371
372 unsafe impl<___E>
373 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::Connector>, ___E>
374 for Connector
375 where
376 ___E: ::fidl_next::Encoder + ?Sized,
377 Connector: ::fidl_next::Encode<crate::wire::Connector, ___E>,
378 {
379 #[inline]
380 fn encode_option(
381 this: ::core::option::Option<Self>,
382 encoder: &mut ___E,
383 out: &mut ::core::mem::MaybeUninit<
384 ::fidl_next::wire::Box<'static, crate::wire::Connector>,
385 >,
386 _: (),
387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
388 if let Some(inner) = this {
389 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
390 ::fidl_next::wire::Box::encode_present(out);
391 } else {
392 ::fidl_next::wire::Box::encode_absent(out);
393 }
394
395 Ok(())
396 }
397 }
398
399 impl ::fidl_next::FromWire<crate::wire::Connector> for Connector {
400 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Connector, Self> = unsafe {
401 ::fidl_next::CopyOptimization::enable_if(
402 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
403 ::fidl_next::wire::fuchsia::EventPair,
404 >>::COPY_OPTIMIZATION
405 .is_enabled(),
406 )
407 };
408
409 #[inline]
410 fn from_wire(wire: crate::wire::Connector) -> Self {
411 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
412 }
413 }
414
415 #[derive(Debug, PartialEq)]
416 #[repr(C)]
417 pub struct DirEntry {
418 pub token: ::fidl_next::fuchsia::zx::EventPair,
419 }
420
421 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirEntry, ___E> for DirEntry
422 where
423 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
424 ___E: ::fidl_next::fuchsia::HandleEncoder,
425 {
426 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::DirEntry> = unsafe {
427 ::fidl_next::CopyOptimization::enable_if(
428 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
429 ::fidl_next::wire::fuchsia::EventPair,
430 ___E,
431 >>::COPY_OPTIMIZATION
432 .is_enabled(),
433 )
434 };
435
436 #[inline]
437 fn encode(
438 self,
439 encoder_: &mut ___E,
440 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirEntry>,
441 _: (),
442 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
443 ::fidl_next::munge! {
444 let crate::wire::DirEntry {
445 token,
446
447 } = out_;
448 }
449
450 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
451
452 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
453
454 Ok(())
455 }
456 }
457
458 unsafe impl<___E>
459 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::DirEntry>, ___E>
460 for DirEntry
461 where
462 ___E: ::fidl_next::Encoder + ?Sized,
463 DirEntry: ::fidl_next::Encode<crate::wire::DirEntry, ___E>,
464 {
465 #[inline]
466 fn encode_option(
467 this: ::core::option::Option<Self>,
468 encoder: &mut ___E,
469 out: &mut ::core::mem::MaybeUninit<
470 ::fidl_next::wire::Box<'static, crate::wire::DirEntry>,
471 >,
472 _: (),
473 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
474 if let Some(inner) = this {
475 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
476 ::fidl_next::wire::Box::encode_present(out);
477 } else {
478 ::fidl_next::wire::Box::encode_absent(out);
479 }
480
481 Ok(())
482 }
483 }
484
485 impl ::fidl_next::FromWire<crate::wire::DirEntry> for DirEntry {
486 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::DirEntry, Self> = unsafe {
487 ::fidl_next::CopyOptimization::enable_if(
488 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
489 ::fidl_next::wire::fuchsia::EventPair,
490 >>::COPY_OPTIMIZATION
491 .is_enabled(),
492 )
493 };
494
495 #[inline]
496 fn from_wire(wire: crate::wire::DirEntry) -> Self {
497 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
498 }
499 }
500
501 #[derive(Debug, PartialEq)]
502 pub enum Capability {
503 Unit(crate::natural::Unit),
504
505 Handle(::fidl_next::fuchsia::zx::NullableHandle),
506
507 Data(crate::natural::Data),
508
509 Dictionary(crate::natural::DictionaryRef),
510
511 Connector(crate::natural::Connector),
512
513 DirConnector(crate::natural::DirConnector),
514
515 Directory(
516 ::fidl_next::ClientEnd<
517 ::fidl_next_fuchsia_io::Directory,
518 ::fidl_next::fuchsia::zx::Channel,
519 >,
520 ),
521
522 DirEntry(crate::natural::DirEntry),
523
524 ConnectorRouter(
525 ::fidl_next::ClientEnd<crate::ConnectorRouter, ::fidl_next::fuchsia::zx::Channel>,
526 ),
527
528 DictionaryRouter(
529 ::fidl_next::ClientEnd<crate::DictionaryRouter, ::fidl_next::fuchsia::zx::Channel>,
530 ),
531
532 DirEntryRouter(
533 ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::zx::Channel>,
534 ),
535
536 DataRouter(::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::zx::Channel>),
537
538 DirConnectorRouter(
539 ::fidl_next::ClientEnd<crate::DirConnectorRouter, ::fidl_next::fuchsia::zx::Channel>,
540 ),
541
542 UnknownOrdinal_(u64),
543 }
544
545 impl Capability {
546 pub fn is_unknown(&self) -> bool {
547 #[allow(unreachable_patterns)]
548 match self {
549 Self::UnknownOrdinal_(_) => true,
550 _ => false,
551 }
552 }
553 }
554
555 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Capability<'static>, ___E> for Capability
556 where
557 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
558 ___E: ::fidl_next::Encoder,
559 ___E: ::fidl_next::fuchsia::HandleEncoder,
560 {
561 #[inline]
562 fn encode(
563 self,
564 encoder: &mut ___E,
565 out: &mut ::core::mem::MaybeUninit<crate::wire::Capability<'static>>,
566 _: (),
567 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
568 ::fidl_next::munge!(let crate::wire::Capability { raw, _phantom: _ } = out);
569
570 match self {
571 Self::Unit(value) => {
572 ::fidl_next::wire::Union::encode_as::<___E, crate::wire::Unit>(
573 value,
574 1,
575 encoder,
576 raw,
577 (),
578 )?
579 }
580
581 Self::Handle(value) => ::fidl_next::wire::Union::encode_as::<
582 ___E,
583 ::fidl_next::wire::fuchsia::NullableHandle,
584 >(value, 2, encoder, raw, ())?,
585
586 Self::Data(value) => ::fidl_next::wire::Union::encode_as::<
587 ___E,
588 crate::wire::Data<'static>,
589 >(value, 3, encoder, raw, ())?,
590
591 Self::Dictionary(value) => ::fidl_next::wire::Union::encode_as::<
592 ___E,
593 crate::wire::DictionaryRef,
594 >(value, 4, encoder, raw, ())?,
595
596 Self::Connector(value) => ::fidl_next::wire::Union::encode_as::<
597 ___E,
598 crate::wire::Connector,
599 >(value, 5, encoder, raw, ())?,
600
601 Self::DirConnector(value) => ::fidl_next::wire::Union::encode_as::<
602 ___E,
603 crate::wire::DirConnector,
604 >(value, 6, encoder, raw, ())?,
605
606 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
607 ___E,
608 ::fidl_next::ClientEnd<
609 ::fidl_next_fuchsia_io::Directory,
610 ::fidl_next::wire::fuchsia::Channel,
611 >,
612 >(value, 7, encoder, raw, ())?,
613
614 Self::DirEntry(value) => ::fidl_next::wire::Union::encode_as::<
615 ___E,
616 crate::wire::DirEntry,
617 >(value, 8, encoder, raw, ())?,
618
619 Self::ConnectorRouter(value) => ::fidl_next::wire::Union::encode_as::<
620 ___E,
621 ::fidl_next::ClientEnd<
622 crate::ConnectorRouter,
623 ::fidl_next::wire::fuchsia::Channel,
624 >,
625 >(value, 9, encoder, raw, ())?,
626
627 Self::DictionaryRouter(value) => ::fidl_next::wire::Union::encode_as::<
628 ___E,
629 ::fidl_next::ClientEnd<
630 crate::DictionaryRouter,
631 ::fidl_next::wire::fuchsia::Channel,
632 >,
633 >(value, 10, encoder, raw, ())?,
634
635 Self::DirEntryRouter(value) => ::fidl_next::wire::Union::encode_as::<
636 ___E,
637 ::fidl_next::ClientEnd<
638 crate::DirEntryRouter,
639 ::fidl_next::wire::fuchsia::Channel,
640 >,
641 >(value, 11, encoder, raw, ())?,
642
643 Self::DataRouter(value) => ::fidl_next::wire::Union::encode_as::<
644 ___E,
645 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
646 >(value, 12, encoder, raw, ())?,
647
648 Self::DirConnectorRouter(value) => ::fidl_next::wire::Union::encode_as::<
649 ___E,
650 ::fidl_next::ClientEnd<
651 crate::DirConnectorRouter,
652 ::fidl_next::wire::fuchsia::Channel,
653 >,
654 >(value, 13, encoder, raw, ())?,
655
656 Self::UnknownOrdinal_(ordinal) => {
657 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
658 }
659 }
660
661 Ok(())
662 }
663 }
664
665 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Capability<'static>, ___E>
666 for Capability
667 where
668 ___E: ?Sized,
669 Capability: ::fidl_next::Encode<crate::wire::Capability<'static>, ___E>,
670 {
671 #[inline]
672 fn encode_option(
673 this: ::core::option::Option<Self>,
674 encoder: &mut ___E,
675 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Capability<'static>>,
676 _: (),
677 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
678 ::fidl_next::munge!(let crate::wire_optional::Capability { raw, _phantom: _ } = &mut *out);
679
680 if let Some(inner) = this {
681 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
682 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
683 } else {
684 ::fidl_next::wire::Union::encode_absent(raw);
685 }
686
687 Ok(())
688 }
689 }
690
691 impl<'de> ::fidl_next::FromWire<crate::wire::Capability<'de>> for Capability {
692 #[inline]
693 fn from_wire(wire: crate::wire::Capability<'de>) -> Self {
694 let wire = ::core::mem::ManuallyDrop::new(wire);
695 match wire.raw.ordinal() {
696 1 => Self::Unit(::fidl_next::FromWire::from_wire(unsafe {
697 wire.raw.get().read_unchecked::<crate::wire::Unit>()
698 })),
699
700 2 => Self::Handle(::fidl_next::FromWire::from_wire(unsafe {
701 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
702 })),
703
704 3 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
705 wire.raw.get().read_unchecked::<crate::wire::Data<'de>>()
706 })),
707
708 4 => Self::Dictionary(::fidl_next::FromWire::from_wire(unsafe {
709 wire.raw.get().read_unchecked::<crate::wire::DictionaryRef>()
710 })),
711
712 5 => Self::Connector(::fidl_next::FromWire::from_wire(unsafe {
713 wire.raw.get().read_unchecked::<crate::wire::Connector>()
714 })),
715
716 6 => Self::DirConnector(::fidl_next::FromWire::from_wire(unsafe {
717 wire.raw.get().read_unchecked::<crate::wire::DirConnector>()
718 })),
719
720 7 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
721 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
722 ::fidl_next_fuchsia_io::Directory,
723 ::fidl_next::wire::fuchsia::Channel,
724 >>()
725 })),
726
727 8 => Self::DirEntry(::fidl_next::FromWire::from_wire(unsafe {
728 wire.raw.get().read_unchecked::<crate::wire::DirEntry>()
729 })),
730
731 9 => Self::ConnectorRouter(::fidl_next::FromWire::from_wire(unsafe {
732 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
733 crate::ConnectorRouter,
734 ::fidl_next::wire::fuchsia::Channel,
735 >>()
736 })),
737
738 10 => Self::DictionaryRouter(::fidl_next::FromWire::from_wire(unsafe {
739 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
740 crate::DictionaryRouter,
741 ::fidl_next::wire::fuchsia::Channel,
742 >>()
743 })),
744
745 11 => Self::DirEntryRouter(::fidl_next::FromWire::from_wire(unsafe {
746 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
747 crate::DirEntryRouter,
748 ::fidl_next::wire::fuchsia::Channel,
749 >>()
750 })),
751
752 12 => Self::DataRouter(::fidl_next::FromWire::from_wire(unsafe {
753 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
754 crate::DataRouter,
755 ::fidl_next::wire::fuchsia::Channel,
756 >>()
757 })),
758
759 13 => Self::DirConnectorRouter(::fidl_next::FromWire::from_wire(unsafe {
760 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
761 crate::DirConnectorRouter,
762 ::fidl_next::wire::fuchsia::Channel,
763 >>()
764 })),
765
766 ord => return Self::UnknownOrdinal_(ord as u64),
767 }
768 }
769 }
770
771 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Capability<'de>> for Capability {
772 #[inline]
773 fn from_wire_option(
774 wire: crate::wire_optional::Capability<'de>,
775 ) -> ::core::option::Option<Self> {
776 if let Some(inner) = wire.into_option() {
777 Some(::fidl_next::FromWire::from_wire(inner))
778 } else {
779 None
780 }
781 }
782 }
783
784 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Capability<'de>> for Box<Capability> {
785 #[inline]
786 fn from_wire_option(
787 wire: crate::wire_optional::Capability<'de>,
788 ) -> ::core::option::Option<Self> {
789 <
790 Capability as ::fidl_next::FromWireOption<crate::wire_optional::Capability<'de>>
791 >::from_wire_option(wire).map(Box::new)
792 }
793 }
794
795 #[derive(Debug, PartialEq)]
796 pub struct CapabilityStoreConnectorCreateRequest {
797 pub id: u64,
798
799 pub receiver: ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::fuchsia::zx::Channel>,
800 }
801
802 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorCreateRequest, ___E>
803 for CapabilityStoreConnectorCreateRequest
804 where
805 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
806 ___E: ::fidl_next::fuchsia::HandleEncoder,
807 {
808 #[inline]
809 fn encode(
810 self,
811 encoder_: &mut ___E,
812 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorCreateRequest>,
813 _: (),
814 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
815 ::fidl_next::munge! {
816 let crate::wire::CapabilityStoreConnectorCreateRequest {
817 id,
818 receiver,
819
820 } = out_;
821 }
822
823 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
824
825 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
826
827 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
828
829 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(receiver.as_mut_ptr()) };
830
831 Ok(())
832 }
833 }
834
835 unsafe impl<___E>
836 ::fidl_next::EncodeOption<
837 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreConnectorCreateRequest>,
838 ___E,
839 > for CapabilityStoreConnectorCreateRequest
840 where
841 ___E: ::fidl_next::Encoder + ?Sized,
842 CapabilityStoreConnectorCreateRequest:
843 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorCreateRequest, ___E>,
844 {
845 #[inline]
846 fn encode_option(
847 this: ::core::option::Option<Self>,
848 encoder: &mut ___E,
849 out: &mut ::core::mem::MaybeUninit<
850 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreConnectorCreateRequest>,
851 >,
852 _: (),
853 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
854 if let Some(inner) = this {
855 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
856 ::fidl_next::wire::Box::encode_present(out);
857 } else {
858 ::fidl_next::wire::Box::encode_absent(out);
859 }
860
861 Ok(())
862 }
863 }
864
865 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreConnectorCreateRequest>
866 for CapabilityStoreConnectorCreateRequest
867 {
868 #[inline]
869 fn from_wire(wire: crate::wire::CapabilityStoreConnectorCreateRequest) -> Self {
870 Self {
871 id: ::fidl_next::FromWire::from_wire(wire.id),
872
873 receiver: ::fidl_next::FromWire::from_wire(wire.receiver),
874 }
875 }
876 }
877
878 #[derive(Debug, PartialEq)]
879 pub struct CapabilityStoreConnectorOpenRequest {
880 pub id: u64,
881
882 pub server_end: ::fidl_next::fuchsia::zx::Channel,
883 }
884
885 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorOpenRequest, ___E>
886 for CapabilityStoreConnectorOpenRequest
887 where
888 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
889 ___E: ::fidl_next::fuchsia::HandleEncoder,
890 {
891 #[inline]
892 fn encode(
893 self,
894 encoder_: &mut ___E,
895 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorOpenRequest>,
896 _: (),
897 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
898 ::fidl_next::munge! {
899 let crate::wire::CapabilityStoreConnectorOpenRequest {
900 id,
901 server_end,
902
903 } = out_;
904 }
905
906 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
907
908 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
909
910 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
911
912 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server_end.as_mut_ptr()) };
913
914 Ok(())
915 }
916 }
917
918 unsafe impl<___E>
919 ::fidl_next::EncodeOption<
920 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreConnectorOpenRequest>,
921 ___E,
922 > for CapabilityStoreConnectorOpenRequest
923 where
924 ___E: ::fidl_next::Encoder + ?Sized,
925 CapabilityStoreConnectorOpenRequest:
926 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorOpenRequest, ___E>,
927 {
928 #[inline]
929 fn encode_option(
930 this: ::core::option::Option<Self>,
931 encoder: &mut ___E,
932 out: &mut ::core::mem::MaybeUninit<
933 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreConnectorOpenRequest>,
934 >,
935 _: (),
936 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
937 if let Some(inner) = this {
938 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
939 ::fidl_next::wire::Box::encode_present(out);
940 } else {
941 ::fidl_next::wire::Box::encode_absent(out);
942 }
943
944 Ok(())
945 }
946 }
947
948 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreConnectorOpenRequest>
949 for CapabilityStoreConnectorOpenRequest
950 {
951 #[inline]
952 fn from_wire(wire: crate::wire::CapabilityStoreConnectorOpenRequest) -> Self {
953 Self {
954 id: ::fidl_next::FromWire::from_wire(wire.id),
955
956 server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
957 }
958 }
959 }
960
961 #[derive(Debug, PartialEq)]
962 pub struct CapabilityStoreDirConnectorCreateRequest {
963 pub id: u64,
964
965 pub receiver: ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::fuchsia::zx::Channel>,
966 }
967
968 unsafe impl<___E>
969 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorCreateRequest, ___E>
970 for CapabilityStoreDirConnectorCreateRequest
971 where
972 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
973 ___E: ::fidl_next::fuchsia::HandleEncoder,
974 {
975 #[inline]
976 fn encode(
977 self,
978 encoder_: &mut ___E,
979 out_: &mut ::core::mem::MaybeUninit<
980 crate::wire::CapabilityStoreDirConnectorCreateRequest,
981 >,
982 _: (),
983 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
984 ::fidl_next::munge! {
985 let crate::wire::CapabilityStoreDirConnectorCreateRequest {
986 id,
987 receiver,
988
989 } = out_;
990 }
991
992 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
993
994 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
995
996 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
997
998 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(receiver.as_mut_ptr()) };
999
1000 Ok(())
1001 }
1002 }
1003
1004 unsafe impl<___E>
1005 ::fidl_next::EncodeOption<
1006 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDirConnectorCreateRequest>,
1007 ___E,
1008 > for CapabilityStoreDirConnectorCreateRequest
1009 where
1010 ___E: ::fidl_next::Encoder + ?Sized,
1011 CapabilityStoreDirConnectorCreateRequest:
1012 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorCreateRequest, ___E>,
1013 {
1014 #[inline]
1015 fn encode_option(
1016 this: ::core::option::Option<Self>,
1017 encoder: &mut ___E,
1018 out: &mut ::core::mem::MaybeUninit<
1019 ::fidl_next::wire::Box<
1020 'static,
1021 crate::wire::CapabilityStoreDirConnectorCreateRequest,
1022 >,
1023 >,
1024 _: (),
1025 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1026 if let Some(inner) = this {
1027 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1028 ::fidl_next::wire::Box::encode_present(out);
1029 } else {
1030 ::fidl_next::wire::Box::encode_absent(out);
1031 }
1032
1033 Ok(())
1034 }
1035 }
1036
1037 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDirConnectorCreateRequest>
1038 for CapabilityStoreDirConnectorCreateRequest
1039 {
1040 #[inline]
1041 fn from_wire(wire: crate::wire::CapabilityStoreDirConnectorCreateRequest) -> Self {
1042 Self {
1043 id: ::fidl_next::FromWire::from_wire(wire.id),
1044
1045 receiver: ::fidl_next::FromWire::from_wire(wire.receiver),
1046 }
1047 }
1048 }
1049
1050 #[derive(Debug, PartialEq)]
1051 pub struct CapabilityStoreDictionaryLegacyImportRequest {
1052 pub id: u64,
1053
1054 pub client_end: ::fidl_next::fuchsia::zx::Channel,
1055 }
1056
1057 unsafe impl<___E>
1058 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyImportRequest, ___E>
1059 for CapabilityStoreDictionaryLegacyImportRequest
1060 where
1061 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1062 ___E: ::fidl_next::fuchsia::HandleEncoder,
1063 {
1064 #[inline]
1065 fn encode(
1066 self,
1067 encoder_: &mut ___E,
1068 out_: &mut ::core::mem::MaybeUninit<
1069 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
1070 >,
1071 _: (),
1072 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1073 ::fidl_next::munge! {
1074 let crate::wire::CapabilityStoreDictionaryLegacyImportRequest {
1075 id,
1076 client_end,
1077
1078 } = out_;
1079 }
1080
1081 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1082
1083 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1084
1085 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
1086
1087 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_end.as_mut_ptr()) };
1088
1089 Ok(())
1090 }
1091 }
1092
1093 unsafe impl<___E>
1094 ::fidl_next::EncodeOption<
1095 ::fidl_next::wire::Box<
1096 'static,
1097 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
1098 >,
1099 ___E,
1100 > for CapabilityStoreDictionaryLegacyImportRequest
1101 where
1102 ___E: ::fidl_next::Encoder + ?Sized,
1103 CapabilityStoreDictionaryLegacyImportRequest:
1104 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyImportRequest, ___E>,
1105 {
1106 #[inline]
1107 fn encode_option(
1108 this: ::core::option::Option<Self>,
1109 encoder: &mut ___E,
1110 out: &mut ::core::mem::MaybeUninit<
1111 ::fidl_next::wire::Box<
1112 'static,
1113 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
1114 >,
1115 >,
1116 _: (),
1117 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1118 if let Some(inner) = this {
1119 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1120 ::fidl_next::wire::Box::encode_present(out);
1121 } else {
1122 ::fidl_next::wire::Box::encode_absent(out);
1123 }
1124
1125 Ok(())
1126 }
1127 }
1128
1129 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryLegacyImportRequest>
1130 for CapabilityStoreDictionaryLegacyImportRequest
1131 {
1132 #[inline]
1133 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryLegacyImportRequest) -> Self {
1134 Self {
1135 id: ::fidl_next::FromWire::from_wire(wire.id),
1136
1137 client_end: ::fidl_next::FromWire::from_wire(wire.client_end),
1138 }
1139 }
1140 }
1141
1142 #[derive(Debug, PartialEq)]
1143 pub struct CapabilityStoreDictionaryLegacyExportRequest {
1144 pub id: u64,
1145
1146 pub server_end: ::fidl_next::fuchsia::zx::Channel,
1147 }
1148
1149 unsafe impl<___E>
1150 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyExportRequest, ___E>
1151 for CapabilityStoreDictionaryLegacyExportRequest
1152 where
1153 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1154 ___E: ::fidl_next::fuchsia::HandleEncoder,
1155 {
1156 #[inline]
1157 fn encode(
1158 self,
1159 encoder_: &mut ___E,
1160 out_: &mut ::core::mem::MaybeUninit<
1161 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
1162 >,
1163 _: (),
1164 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1165 ::fidl_next::munge! {
1166 let crate::wire::CapabilityStoreDictionaryLegacyExportRequest {
1167 id,
1168 server_end,
1169
1170 } = out_;
1171 }
1172
1173 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1174
1175 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1176
1177 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
1178
1179 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server_end.as_mut_ptr()) };
1180
1181 Ok(())
1182 }
1183 }
1184
1185 unsafe impl<___E>
1186 ::fidl_next::EncodeOption<
1187 ::fidl_next::wire::Box<
1188 'static,
1189 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
1190 >,
1191 ___E,
1192 > for CapabilityStoreDictionaryLegacyExportRequest
1193 where
1194 ___E: ::fidl_next::Encoder + ?Sized,
1195 CapabilityStoreDictionaryLegacyExportRequest:
1196 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyExportRequest, ___E>,
1197 {
1198 #[inline]
1199 fn encode_option(
1200 this: ::core::option::Option<Self>,
1201 encoder: &mut ___E,
1202 out: &mut ::core::mem::MaybeUninit<
1203 ::fidl_next::wire::Box<
1204 'static,
1205 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
1206 >,
1207 >,
1208 _: (),
1209 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1210 if let Some(inner) = this {
1211 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1212 ::fidl_next::wire::Box::encode_present(out);
1213 } else {
1214 ::fidl_next::wire::Box::encode_absent(out);
1215 }
1216
1217 Ok(())
1218 }
1219 }
1220
1221 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryLegacyExportRequest>
1222 for CapabilityStoreDictionaryLegacyExportRequest
1223 {
1224 #[inline]
1225 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryLegacyExportRequest) -> Self {
1226 Self {
1227 id: ::fidl_next::FromWire::from_wire(wire.id),
1228
1229 server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
1230 }
1231 }
1232 }
1233
1234 #[derive(Debug, PartialEq)]
1235 pub struct CapabilityStoreDictionaryKeysRequest {
1236 pub id: u64,
1237
1238 pub iterator: ::fidl_next::ServerEnd<
1239 crate::DictionaryKeysIterator,
1240 ::fidl_next::fuchsia::zx::Channel,
1241 >,
1242 }
1243
1244 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryKeysRequest, ___E>
1245 for CapabilityStoreDictionaryKeysRequest
1246 where
1247 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1248 ___E: ::fidl_next::fuchsia::HandleEncoder,
1249 {
1250 #[inline]
1251 fn encode(
1252 self,
1253 encoder_: &mut ___E,
1254 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryKeysRequest>,
1255 _: (),
1256 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1257 ::fidl_next::munge! {
1258 let crate::wire::CapabilityStoreDictionaryKeysRequest {
1259 id,
1260 iterator,
1261
1262 } = out_;
1263 }
1264
1265 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1266
1267 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1268
1269 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
1270
1271 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
1272
1273 Ok(())
1274 }
1275 }
1276
1277 unsafe impl<___E>
1278 ::fidl_next::EncodeOption<
1279 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryKeysRequest>,
1280 ___E,
1281 > for CapabilityStoreDictionaryKeysRequest
1282 where
1283 ___E: ::fidl_next::Encoder + ?Sized,
1284 CapabilityStoreDictionaryKeysRequest:
1285 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryKeysRequest, ___E>,
1286 {
1287 #[inline]
1288 fn encode_option(
1289 this: ::core::option::Option<Self>,
1290 encoder: &mut ___E,
1291 out: &mut ::core::mem::MaybeUninit<
1292 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryKeysRequest>,
1293 >,
1294 _: (),
1295 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1296 if let Some(inner) = this {
1297 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1298 ::fidl_next::wire::Box::encode_present(out);
1299 } else {
1300 ::fidl_next::wire::Box::encode_absent(out);
1301 }
1302
1303 Ok(())
1304 }
1305 }
1306
1307 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryKeysRequest>
1308 for CapabilityStoreDictionaryKeysRequest
1309 {
1310 #[inline]
1311 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryKeysRequest) -> Self {
1312 Self {
1313 id: ::fidl_next::FromWire::from_wire(wire.id),
1314
1315 iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
1316 }
1317 }
1318 }
1319
1320 #[derive(Debug, PartialEq)]
1321 pub struct CapabilityStoreDictionaryEnumerateRequest {
1322 pub id: u64,
1323
1324 pub iterator: ::fidl_next::ServerEnd<
1325 crate::DictionaryEnumerateIterator,
1326 ::fidl_next::fuchsia::zx::Channel,
1327 >,
1328 }
1329
1330 unsafe impl<___E>
1331 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryEnumerateRequest, ___E>
1332 for CapabilityStoreDictionaryEnumerateRequest
1333 where
1334 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1335 ___E: ::fidl_next::fuchsia::HandleEncoder,
1336 {
1337 #[inline]
1338 fn encode(
1339 self,
1340 encoder_: &mut ___E,
1341 out_: &mut ::core::mem::MaybeUninit<
1342 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
1343 >,
1344 _: (),
1345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1346 ::fidl_next::munge! {
1347 let crate::wire::CapabilityStoreDictionaryEnumerateRequest {
1348 id,
1349 iterator,
1350
1351 } = out_;
1352 }
1353
1354 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1355
1356 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1357
1358 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
1359
1360 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.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::CapabilityStoreDictionaryEnumerateRequest>,
1369 ___E,
1370 > for CapabilityStoreDictionaryEnumerateRequest
1371 where
1372 ___E: ::fidl_next::Encoder + ?Sized,
1373 CapabilityStoreDictionaryEnumerateRequest:
1374 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryEnumerateRequest, ___E>,
1375 {
1376 #[inline]
1377 fn encode_option(
1378 this: ::core::option::Option<Self>,
1379 encoder: &mut ___E,
1380 out: &mut ::core::mem::MaybeUninit<
1381 ::fidl_next::wire::Box<
1382 'static,
1383 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
1384 >,
1385 >,
1386 _: (),
1387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1388 if let Some(inner) = this {
1389 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1390 ::fidl_next::wire::Box::encode_present(out);
1391 } else {
1392 ::fidl_next::wire::Box::encode_absent(out);
1393 }
1394
1395 Ok(())
1396 }
1397 }
1398
1399 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryEnumerateRequest>
1400 for CapabilityStoreDictionaryEnumerateRequest
1401 {
1402 #[inline]
1403 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryEnumerateRequest) -> Self {
1404 Self {
1405 id: ::fidl_next::FromWire::from_wire(wire.id),
1406
1407 iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
1408 }
1409 }
1410 }
1411
1412 #[derive(Debug, PartialEq)]
1413 pub struct CapabilityStoreDictionaryDrainRequest {
1414 pub id: u64,
1415
1416 pub iterator: ::core::option::Option<
1417 ::fidl_next::ServerEnd<
1418 crate::DictionaryDrainIterator,
1419 ::fidl_next::fuchsia::zx::Channel,
1420 >,
1421 >,
1422 }
1423
1424 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryDrainRequest, ___E>
1425 for CapabilityStoreDictionaryDrainRequest
1426 where
1427 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1428 ___E: ::fidl_next::fuchsia::HandleEncoder,
1429 {
1430 #[inline]
1431 fn encode(
1432 self,
1433 encoder_: &mut ___E,
1434 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryDrainRequest>,
1435 _: (),
1436 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1437 ::fidl_next::munge! {
1438 let crate::wire::CapabilityStoreDictionaryDrainRequest {
1439 id,
1440 iterator,
1441
1442 } = out_;
1443 }
1444
1445 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1446
1447 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1448
1449 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
1450
1451 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
1452
1453 Ok(())
1454 }
1455 }
1456
1457 unsafe impl<___E>
1458 ::fidl_next::EncodeOption<
1459 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryDrainRequest>,
1460 ___E,
1461 > for CapabilityStoreDictionaryDrainRequest
1462 where
1463 ___E: ::fidl_next::Encoder + ?Sized,
1464 CapabilityStoreDictionaryDrainRequest:
1465 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryDrainRequest, ___E>,
1466 {
1467 #[inline]
1468 fn encode_option(
1469 this: ::core::option::Option<Self>,
1470 encoder: &mut ___E,
1471 out: &mut ::core::mem::MaybeUninit<
1472 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryDrainRequest>,
1473 >,
1474 _: (),
1475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1476 if let Some(inner) = this {
1477 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1478 ::fidl_next::wire::Box::encode_present(out);
1479 } else {
1480 ::fidl_next::wire::Box::encode_absent(out);
1481 }
1482
1483 Ok(())
1484 }
1485 }
1486
1487 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryDrainRequest>
1488 for CapabilityStoreDictionaryDrainRequest
1489 {
1490 #[inline]
1491 fn from_wire(wire: crate::wire::CapabilityStoreDictionaryDrainRequest) -> Self {
1492 Self {
1493 id: ::fidl_next::FromWire::from_wire(wire.id),
1494
1495 iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
1496 }
1497 }
1498 }
1499
1500 #[derive(Debug, PartialEq)]
1501 pub struct CapabilityStoreCreateServiceAggregateRequest {
1502 pub sources: ::std::vec::Vec<crate::natural::AggregateSource>,
1503 }
1504
1505 unsafe impl<___E>
1506 ::fidl_next::Encode<
1507 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1508 ___E,
1509 > for CapabilityStoreCreateServiceAggregateRequest
1510 where
1511 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1512 ___E: ::fidl_next::Encoder,
1513 ___E: ::fidl_next::fuchsia::HandleEncoder,
1514 {
1515 #[inline]
1516 fn encode(
1517 self,
1518 encoder_: &mut ___E,
1519 out_: &mut ::core::mem::MaybeUninit<
1520 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1521 >,
1522 _: (),
1523 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1524 ::fidl_next::munge! {
1525 let crate::wire::CapabilityStoreCreateServiceAggregateRequest {
1526 sources,
1527
1528 } = out_;
1529 }
1530
1531 ::fidl_next::Encode::encode(self.sources, encoder_, sources, (4294967295, ()))?;
1532
1533 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(sources.as_mut_ptr()) };
1534 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1535
1536 Ok(())
1537 }
1538 }
1539
1540 unsafe impl<___E>
1541 ::fidl_next::EncodeOption<
1542 ::fidl_next::wire::Box<
1543 'static,
1544 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1545 >,
1546 ___E,
1547 > for CapabilityStoreCreateServiceAggregateRequest
1548 where
1549 ___E: ::fidl_next::Encoder + ?Sized,
1550 CapabilityStoreCreateServiceAggregateRequest: ::fidl_next::Encode<
1551 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1552 ___E,
1553 >,
1554 {
1555 #[inline]
1556 fn encode_option(
1557 this: ::core::option::Option<Self>,
1558 encoder: &mut ___E,
1559 out: &mut ::core::mem::MaybeUninit<
1560 ::fidl_next::wire::Box<
1561 'static,
1562 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
1563 >,
1564 >,
1565 _: (),
1566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1567 if let Some(inner) = this {
1568 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1569 ::fidl_next::wire::Box::encode_present(out);
1570 } else {
1571 ::fidl_next::wire::Box::encode_absent(out);
1572 }
1573
1574 Ok(())
1575 }
1576 }
1577
1578 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>>
1579 for CapabilityStoreCreateServiceAggregateRequest
1580 {
1581 #[inline]
1582 fn from_wire(wire: crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>) -> Self {
1583 Self { sources: ::fidl_next::FromWire::from_wire(wire.sources) }
1584 }
1585 }
1586
1587 #[derive(Debug, PartialEq)]
1588 #[repr(C)]
1589 pub struct CapabilityStoreCreateServiceAggregateResponse {
1590 pub aggregate_dir_connector: crate::natural::DirConnector,
1591 }
1592
1593 unsafe impl<___E>
1594 ::fidl_next::Encode<crate::wire::CapabilityStoreCreateServiceAggregateResponse, ___E>
1595 for CapabilityStoreCreateServiceAggregateResponse
1596 where
1597 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1598 ___E: ::fidl_next::fuchsia::HandleEncoder,
1599 {
1600 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1601 Self,
1602 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1603 > = unsafe {
1604 ::fidl_next::CopyOptimization::enable_if(
1605 true && <crate::natural::DirConnector as ::fidl_next::Encode<
1606 crate::wire::DirConnector,
1607 ___E,
1608 >>::COPY_OPTIMIZATION
1609 .is_enabled(),
1610 )
1611 };
1612
1613 #[inline]
1614 fn encode(
1615 self,
1616 encoder_: &mut ___E,
1617 out_: &mut ::core::mem::MaybeUninit<
1618 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1619 >,
1620 _: (),
1621 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1622 ::fidl_next::munge! {
1623 let crate::wire::CapabilityStoreCreateServiceAggregateResponse {
1624 aggregate_dir_connector,
1625
1626 } = out_;
1627 }
1628
1629 ::fidl_next::Encode::encode(
1630 self.aggregate_dir_connector,
1631 encoder_,
1632 aggregate_dir_connector,
1633 (),
1634 )?;
1635
1636 let mut _field =
1637 unsafe { ::fidl_next::Slot::new_unchecked(aggregate_dir_connector.as_mut_ptr()) };
1638
1639 Ok(())
1640 }
1641 }
1642
1643 unsafe impl<___E>
1644 ::fidl_next::EncodeOption<
1645 ::fidl_next::wire::Box<
1646 'static,
1647 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1648 >,
1649 ___E,
1650 > for CapabilityStoreCreateServiceAggregateResponse
1651 where
1652 ___E: ::fidl_next::Encoder + ?Sized,
1653 CapabilityStoreCreateServiceAggregateResponse:
1654 ::fidl_next::Encode<crate::wire::CapabilityStoreCreateServiceAggregateResponse, ___E>,
1655 {
1656 #[inline]
1657 fn encode_option(
1658 this: ::core::option::Option<Self>,
1659 encoder: &mut ___E,
1660 out: &mut ::core::mem::MaybeUninit<
1661 ::fidl_next::wire::Box<
1662 'static,
1663 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1664 >,
1665 >,
1666 _: (),
1667 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1668 if let Some(inner) = this {
1669 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1670 ::fidl_next::wire::Box::encode_present(out);
1671 } else {
1672 ::fidl_next::wire::Box::encode_absent(out);
1673 }
1674
1675 Ok(())
1676 }
1677 }
1678
1679 impl ::fidl_next::FromWire<crate::wire::CapabilityStoreCreateServiceAggregateResponse>
1680 for CapabilityStoreCreateServiceAggregateResponse
1681 {
1682 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1683 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
1684 Self,
1685 > = unsafe {
1686 ::fidl_next::CopyOptimization::enable_if(
1687 true && <crate::natural::DirConnector as ::fidl_next::FromWire<
1688 crate::wire::DirConnector,
1689 >>::COPY_OPTIMIZATION
1690 .is_enabled(),
1691 )
1692 };
1693
1694 #[inline]
1695 fn from_wire(wire: crate::wire::CapabilityStoreCreateServiceAggregateResponse) -> Self {
1696 Self {
1697 aggregate_dir_connector: ::fidl_next::FromWire::from_wire(
1698 wire.aggregate_dir_connector,
1699 ),
1700 }
1701 }
1702 }
1703
1704 #[derive(Debug, PartialEq)]
1705 pub struct CapabilityStoreExportResponse {
1706 pub capability: crate::natural::Capability,
1707 }
1708
1709 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreExportResponse<'static>, ___E>
1710 for CapabilityStoreExportResponse
1711 where
1712 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1713 ___E: ::fidl_next::Encoder,
1714 ___E: ::fidl_next::fuchsia::HandleEncoder,
1715 {
1716 #[inline]
1717 fn encode(
1718 self,
1719 encoder_: &mut ___E,
1720 out_: &mut ::core::mem::MaybeUninit<
1721 crate::wire::CapabilityStoreExportResponse<'static>,
1722 >,
1723 _: (),
1724 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1725 ::fidl_next::munge! {
1726 let crate::wire::CapabilityStoreExportResponse {
1727 capability,
1728
1729 } = out_;
1730 }
1731
1732 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
1733
1734 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(capability.as_mut_ptr()) };
1735
1736 Ok(())
1737 }
1738 }
1739
1740 unsafe impl<___E>
1741 ::fidl_next::EncodeOption<
1742 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreExportResponse<'static>>,
1743 ___E,
1744 > for CapabilityStoreExportResponse
1745 where
1746 ___E: ::fidl_next::Encoder + ?Sized,
1747 CapabilityStoreExportResponse:
1748 ::fidl_next::Encode<crate::wire::CapabilityStoreExportResponse<'static>, ___E>,
1749 {
1750 #[inline]
1751 fn encode_option(
1752 this: ::core::option::Option<Self>,
1753 encoder: &mut ___E,
1754 out: &mut ::core::mem::MaybeUninit<
1755 ::fidl_next::wire::Box<
1756 'static,
1757 crate::wire::CapabilityStoreExportResponse<'static>,
1758 >,
1759 >,
1760 _: (),
1761 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1762 if let Some(inner) = this {
1763 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1764 ::fidl_next::wire::Box::encode_present(out);
1765 } else {
1766 ::fidl_next::wire::Box::encode_absent(out);
1767 }
1768
1769 Ok(())
1770 }
1771 }
1772
1773 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreExportResponse<'de>>
1774 for CapabilityStoreExportResponse
1775 {
1776 #[inline]
1777 fn from_wire(wire: crate::wire::CapabilityStoreExportResponse<'de>) -> Self {
1778 Self { capability: ::fidl_next::FromWire::from_wire(wire.capability) }
1779 }
1780 }
1781
1782 #[derive(Debug, PartialEq)]
1783 pub struct CapabilityStoreImportRequest {
1784 pub id: u64,
1785
1786 pub capability: crate::natural::Capability,
1787 }
1788
1789 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreImportRequest<'static>, ___E>
1790 for CapabilityStoreImportRequest
1791 where
1792 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1793 ___E: ::fidl_next::Encoder,
1794 ___E: ::fidl_next::fuchsia::HandleEncoder,
1795 {
1796 #[inline]
1797 fn encode(
1798 self,
1799 encoder_: &mut ___E,
1800 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreImportRequest<'static>>,
1801 _: (),
1802 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1803 ::fidl_next::munge! {
1804 let crate::wire::CapabilityStoreImportRequest {
1805 id,
1806 capability,
1807
1808 } = out_;
1809 }
1810
1811 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1812
1813 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1814
1815 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
1816
1817 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(capability.as_mut_ptr()) };
1818
1819 Ok(())
1820 }
1821 }
1822
1823 unsafe impl<___E>
1824 ::fidl_next::EncodeOption<
1825 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreImportRequest<'static>>,
1826 ___E,
1827 > for CapabilityStoreImportRequest
1828 where
1829 ___E: ::fidl_next::Encoder + ?Sized,
1830 CapabilityStoreImportRequest:
1831 ::fidl_next::Encode<crate::wire::CapabilityStoreImportRequest<'static>, ___E>,
1832 {
1833 #[inline]
1834 fn encode_option(
1835 this: ::core::option::Option<Self>,
1836 encoder: &mut ___E,
1837 out: &mut ::core::mem::MaybeUninit<
1838 ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreImportRequest<'static>>,
1839 >,
1840 _: (),
1841 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1842 if let Some(inner) = this {
1843 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1844 ::fidl_next::wire::Box::encode_present(out);
1845 } else {
1846 ::fidl_next::wire::Box::encode_absent(out);
1847 }
1848
1849 Ok(())
1850 }
1851 }
1852
1853 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreImportRequest<'de>>
1854 for CapabilityStoreImportRequest
1855 {
1856 #[inline]
1857 fn from_wire(wire: crate::wire::CapabilityStoreImportRequest<'de>) -> Self {
1858 Self {
1859 id: ::fidl_next::FromWire::from_wire(wire.id),
1860
1861 capability: ::fidl_next::FromWire::from_wire(wire.capability),
1862 }
1863 }
1864 }
1865
1866 #[derive(Debug, Default, PartialEq)]
1867 pub struct CapabilityStoreDirConnectorOpenRequest {
1868 pub id: ::core::option::Option<u64>,
1869
1870 pub server_end: ::core::option::Option<
1871 ::fidl_next::ServerEnd<
1872 ::fidl_next_fuchsia_io::Directory,
1873 ::fidl_next::fuchsia::zx::Channel,
1874 >,
1875 >,
1876
1877 pub flags: ::core::option::Option<::fidl_next_fuchsia_io::natural::Flags>,
1878
1879 pub path: ::core::option::Option<::std::string::String>,
1880 }
1881
1882 impl CapabilityStoreDirConnectorOpenRequest {
1883 fn __max_ordinal(&self) -> usize {
1884 if self.path.is_some() {
1885 return 4;
1886 }
1887
1888 if self.flags.is_some() {
1889 return 3;
1890 }
1891
1892 if self.server_end.is_some() {
1893 return 2;
1894 }
1895
1896 if self.id.is_some() {
1897 return 1;
1898 }
1899
1900 0
1901 }
1902 }
1903
1904 unsafe impl<___E>
1905 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>, ___E>
1906 for CapabilityStoreDirConnectorOpenRequest
1907 where
1908 ___E: ::fidl_next::Encoder + ?Sized,
1909 ___E: ::fidl_next::fuchsia::HandleEncoder,
1910 {
1911 #[inline]
1912 fn encode(
1913 mut self,
1914 encoder: &mut ___E,
1915 out: &mut ::core::mem::MaybeUninit<
1916 crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>,
1917 >,
1918 _: (),
1919 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1920 ::fidl_next::munge!(let crate::wire::CapabilityStoreDirConnectorOpenRequest { table } = out);
1921
1922 let max_ord = self.__max_ordinal();
1923
1924 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1925 ::fidl_next::Wire::zero_padding(&mut out);
1926
1927 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1928 ::fidl_next::wire::Envelope,
1929 >(encoder, max_ord);
1930
1931 for i in 1..=max_ord {
1932 match i {
1933 4 => {
1934 if let Some(value) = self.path.take() {
1935 ::fidl_next::wire::Envelope::encode_value::<
1936 ::fidl_next::wire::String<'static>,
1937 ___E,
1938 >(
1939 value, preallocated.encoder, &mut out, 4095
1940 )?;
1941 } else {
1942 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1943 }
1944 }
1945
1946 3 => {
1947 if let Some(value) = self.flags.take() {
1948 ::fidl_next::wire::Envelope::encode_value::<
1949 ::fidl_next_fuchsia_io::wire::Flags,
1950 ___E,
1951 >(
1952 value, preallocated.encoder, &mut out, ()
1953 )?;
1954 } else {
1955 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1956 }
1957 }
1958
1959 2 => {
1960 if let Some(value) = self.server_end.take() {
1961 ::fidl_next::wire::Envelope::encode_value::<
1962 ::fidl_next::ServerEnd<
1963 ::fidl_next_fuchsia_io::Directory,
1964 ::fidl_next::wire::fuchsia::Channel,
1965 >,
1966 ___E,
1967 >(
1968 value, preallocated.encoder, &mut out, ()
1969 )?;
1970 } else {
1971 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1972 }
1973 }
1974
1975 1 => {
1976 if let Some(value) = self.id.take() {
1977 ::fidl_next::wire::Envelope::encode_value::<
1978 ::fidl_next::wire::Uint64,
1979 ___E,
1980 >(
1981 value, preallocated.encoder, &mut out, ()
1982 )?;
1983 } else {
1984 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1985 }
1986 }
1987
1988 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1989 }
1990 unsafe {
1991 preallocated.write_next(out.assume_init_ref());
1992 }
1993 }
1994
1995 ::fidl_next::wire::Table::encode_len(table, max_ord);
1996
1997 Ok(())
1998 }
1999 }
2000
2001 impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>>
2002 for CapabilityStoreDirConnectorOpenRequest
2003 {
2004 #[inline]
2005 fn from_wire(wire_: crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>) -> Self {
2006 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2007
2008 let id = wire_.table.get(1);
2009
2010 let server_end = wire_.table.get(2);
2011
2012 let flags = wire_.table.get(3);
2013
2014 let path = wire_.table.get(4);
2015
2016 Self {
2017 id: id.map(|envelope| {
2018 ::fidl_next::FromWire::from_wire(unsafe {
2019 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
2020 })
2021 }),
2022
2023 server_end: server_end.map(|envelope| {
2024 ::fidl_next::FromWire::from_wire(unsafe {
2025 envelope.read_unchecked::<::fidl_next::ServerEnd<
2026 ::fidl_next_fuchsia_io::Directory,
2027 ::fidl_next::wire::fuchsia::Channel,
2028 >>()
2029 })
2030 }),
2031
2032 flags: flags.map(|envelope| {
2033 ::fidl_next::FromWire::from_wire(unsafe {
2034 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
2035 })
2036 }),
2037
2038 path: path.map(|envelope| {
2039 ::fidl_next::FromWire::from_wire(unsafe {
2040 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2041 })
2042 }),
2043 }
2044 }
2045 }
2046
2047 #[doc = " Represents an instance in the component tree, either a component\n instance or component manager\'s instance.\n"]
2048 #[derive(Debug, PartialEq)]
2049 #[repr(C)]
2050 pub struct InstanceToken {
2051 pub token: ::fidl_next::fuchsia::zx::EventPair,
2052 }
2053
2054 unsafe impl<___E> ::fidl_next::Encode<crate::wire::InstanceToken, ___E> for InstanceToken
2055 where
2056 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2057 ___E: ::fidl_next::fuchsia::HandleEncoder,
2058 {
2059 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::InstanceToken> = unsafe {
2060 ::fidl_next::CopyOptimization::enable_if(
2061 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
2062 ::fidl_next::wire::fuchsia::EventPair,
2063 ___E,
2064 >>::COPY_OPTIMIZATION
2065 .is_enabled(),
2066 )
2067 };
2068
2069 #[inline]
2070 fn encode(
2071 self,
2072 encoder_: &mut ___E,
2073 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceToken>,
2074 _: (),
2075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2076 ::fidl_next::munge! {
2077 let crate::wire::InstanceToken {
2078 token,
2079
2080 } = out_;
2081 }
2082
2083 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
2084
2085 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
2086
2087 Ok(())
2088 }
2089 }
2090
2091 unsafe impl<___E>
2092 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::InstanceToken>, ___E>
2093 for InstanceToken
2094 where
2095 ___E: ::fidl_next::Encoder + ?Sized,
2096 InstanceToken: ::fidl_next::Encode<crate::wire::InstanceToken, ___E>,
2097 {
2098 #[inline]
2099 fn encode_option(
2100 this: ::core::option::Option<Self>,
2101 encoder: &mut ___E,
2102 out: &mut ::core::mem::MaybeUninit<
2103 ::fidl_next::wire::Box<'static, crate::wire::InstanceToken>,
2104 >,
2105 _: (),
2106 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2107 if let Some(inner) = this {
2108 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2109 ::fidl_next::wire::Box::encode_present(out);
2110 } else {
2111 ::fidl_next::wire::Box::encode_absent(out);
2112 }
2113
2114 Ok(())
2115 }
2116 }
2117
2118 impl ::fidl_next::FromWire<crate::wire::InstanceToken> for InstanceToken {
2119 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::InstanceToken, Self> = unsafe {
2120 ::fidl_next::CopyOptimization::enable_if(
2121 true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
2122 ::fidl_next::wire::fuchsia::EventPair,
2123 >>::COPY_OPTIMIZATION
2124 .is_enabled(),
2125 )
2126 };
2127
2128 #[inline]
2129 fn from_wire(wire: crate::wire::InstanceToken) -> Self {
2130 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
2131 }
2132 }
2133
2134 #[doc = " A request for a route.\n"]
2135 #[derive(Debug, Default, PartialEq)]
2136 pub struct RouteRequest {
2137 pub requesting: ::core::option::Option<crate::natural::InstanceToken>,
2138
2139 pub metadata: ::core::option::Option<crate::natural::DictionaryRef>,
2140 }
2141
2142 impl RouteRequest {
2143 fn __max_ordinal(&self) -> usize {
2144 if self.metadata.is_some() {
2145 return 2;
2146 }
2147
2148 if self.requesting.is_some() {
2149 return 1;
2150 }
2151
2152 0
2153 }
2154 }
2155
2156 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RouteRequest<'static>, ___E> for RouteRequest
2157 where
2158 ___E: ::fidl_next::Encoder + ?Sized,
2159 ___E: ::fidl_next::fuchsia::HandleEncoder,
2160 {
2161 #[inline]
2162 fn encode(
2163 mut self,
2164 encoder: &mut ___E,
2165 out: &mut ::core::mem::MaybeUninit<crate::wire::RouteRequest<'static>>,
2166 _: (),
2167 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2168 ::fidl_next::munge!(let crate::wire::RouteRequest { table } = out);
2169
2170 let max_ord = self.__max_ordinal();
2171
2172 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2173 ::fidl_next::Wire::zero_padding(&mut out);
2174
2175 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2176 ::fidl_next::wire::Envelope,
2177 >(encoder, max_ord);
2178
2179 for i in 1..=max_ord {
2180 match i {
2181 2 => {
2182 if let Some(value) = self.metadata.take() {
2183 ::fidl_next::wire::Envelope::encode_value::<
2184 crate::wire::DictionaryRef,
2185 ___E,
2186 >(
2187 value, preallocated.encoder, &mut out, ()
2188 )?;
2189 } else {
2190 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2191 }
2192 }
2193
2194 1 => {
2195 if let Some(value) = self.requesting.take() {
2196 ::fidl_next::wire::Envelope::encode_value::<
2197 crate::wire::InstanceToken,
2198 ___E,
2199 >(
2200 value, preallocated.encoder, &mut out, ()
2201 )?;
2202 } else {
2203 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2204 }
2205 }
2206
2207 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2208 }
2209 unsafe {
2210 preallocated.write_next(out.assume_init_ref());
2211 }
2212 }
2213
2214 ::fidl_next::wire::Table::encode_len(table, max_ord);
2215
2216 Ok(())
2217 }
2218 }
2219
2220 impl<'de> ::fidl_next::FromWire<crate::wire::RouteRequest<'de>> for RouteRequest {
2221 #[inline]
2222 fn from_wire(wire_: crate::wire::RouteRequest<'de>) -> Self {
2223 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2224
2225 let requesting = wire_.table.get(1);
2226
2227 let metadata = wire_.table.get(2);
2228
2229 Self {
2230 requesting: requesting.map(|envelope| {
2231 ::fidl_next::FromWire::from_wire(unsafe {
2232 envelope.read_unchecked::<crate::wire::InstanceToken>()
2233 })
2234 }),
2235
2236 metadata: metadata.map(|envelope| {
2237 ::fidl_next::FromWire::from_wire(unsafe {
2238 envelope.read_unchecked::<crate::wire::DictionaryRef>()
2239 })
2240 }),
2241 }
2242 }
2243 }
2244
2245 #[derive(Debug, PartialEq)]
2246 pub enum ConnectorRouterRouteResponse {
2247 Connector(crate::natural::Connector),
2248
2249 Unavailable(crate::natural::Unit),
2250 }
2251
2252 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ConnectorRouterRouteResponse, ___E>
2253 for ConnectorRouterRouteResponse
2254 where
2255 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2256 ___E: ::fidl_next::fuchsia::HandleEncoder,
2257 {
2258 #[inline]
2259 fn encode(
2260 self,
2261 encoder: &mut ___E,
2262 out: &mut ::core::mem::MaybeUninit<crate::wire::ConnectorRouterRouteResponse>,
2263 _: (),
2264 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2265 ::fidl_next::munge!(let crate::wire::ConnectorRouterRouteResponse { raw, _phantom: _ } = out);
2266
2267 match self {
2268 Self::Connector(value) => ::fidl_next::wire::Union::encode_as_static::<
2269 ___E,
2270 crate::wire::Connector,
2271 >(value, 1, encoder, raw, ())?,
2272
2273 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
2274 ___E,
2275 crate::wire::Unit,
2276 >(value, 2, encoder, raw, ())?,
2277 }
2278
2279 Ok(())
2280 }
2281 }
2282
2283 unsafe impl<___E>
2284 ::fidl_next::EncodeOption<crate::wire_optional::ConnectorRouterRouteResponse, ___E>
2285 for ConnectorRouterRouteResponse
2286 where
2287 ___E: ?Sized,
2288 ConnectorRouterRouteResponse:
2289 ::fidl_next::Encode<crate::wire::ConnectorRouterRouteResponse, ___E>,
2290 {
2291 #[inline]
2292 fn encode_option(
2293 this: ::core::option::Option<Self>,
2294 encoder: &mut ___E,
2295 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::ConnectorRouterRouteResponse>,
2296 _: (),
2297 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2298 ::fidl_next::munge!(let crate::wire_optional::ConnectorRouterRouteResponse { raw, _phantom: _ } = &mut *out);
2299
2300 if let Some(inner) = this {
2301 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2302 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2303 } else {
2304 ::fidl_next::wire::Union::encode_absent(raw);
2305 }
2306
2307 Ok(())
2308 }
2309 }
2310
2311 impl ::fidl_next::FromWire<crate::wire::ConnectorRouterRouteResponse>
2312 for ConnectorRouterRouteResponse
2313 {
2314 #[inline]
2315 fn from_wire(wire: crate::wire::ConnectorRouterRouteResponse) -> Self {
2316 let wire = ::core::mem::ManuallyDrop::new(wire);
2317 match wire.raw.ordinal() {
2318 1 => Self::Connector(::fidl_next::FromWire::from_wire(unsafe {
2319 wire.raw.get().read_unchecked::<crate::wire::Connector>()
2320 })),
2321
2322 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
2323 wire.raw.get().read_unchecked::<crate::wire::Unit>()
2324 })),
2325
2326 _ => unsafe { ::core::hint::unreachable_unchecked() },
2327 }
2328 }
2329 }
2330
2331 impl ::fidl_next::FromWireOption<crate::wire_optional::ConnectorRouterRouteResponse>
2332 for ConnectorRouterRouteResponse
2333 {
2334 #[inline]
2335 fn from_wire_option(
2336 wire: crate::wire_optional::ConnectorRouterRouteResponse,
2337 ) -> ::core::option::Option<Self> {
2338 if let Some(inner) = wire.into_option() {
2339 Some(::fidl_next::FromWire::from_wire(inner))
2340 } else {
2341 None
2342 }
2343 }
2344 }
2345
2346 impl ::fidl_next::FromWireOption<crate::wire_optional::ConnectorRouterRouteResponse>
2347 for Box<ConnectorRouterRouteResponse>
2348 {
2349 #[inline]
2350 fn from_wire_option(
2351 wire: crate::wire_optional::ConnectorRouterRouteResponse,
2352 ) -> ::core::option::Option<Self> {
2353 <ConnectorRouterRouteResponse as ::fidl_next::FromWireOption<
2354 crate::wire_optional::ConnectorRouterRouteResponse,
2355 >>::from_wire_option(wire)
2356 .map(Box::new)
2357 }
2358 }
2359
2360 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2361 pub enum DataRouterRouteResponse {
2362 Data(crate::natural::Data),
2363
2364 Unavailable(crate::natural::Unit),
2365 }
2366
2367 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataRouterRouteResponse<'static>, ___E>
2368 for DataRouterRouteResponse
2369 where
2370 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2371 ___E: ::fidl_next::Encoder,
2372 ___E: ::fidl_next::fuchsia::HandleEncoder,
2373 {
2374 #[inline]
2375 fn encode(
2376 self,
2377 encoder: &mut ___E,
2378 out: &mut ::core::mem::MaybeUninit<crate::wire::DataRouterRouteResponse<'static>>,
2379 _: (),
2380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2381 ::fidl_next::munge!(let crate::wire::DataRouterRouteResponse { raw, _phantom: _ } = out);
2382
2383 match self {
2384 Self::Data(value) => ::fidl_next::wire::Union::encode_as::<
2385 ___E,
2386 crate::wire::Data<'static>,
2387 >(value, 1, encoder, raw, ())?,
2388
2389 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as::<
2390 ___E,
2391 crate::wire::Unit,
2392 >(value, 2, encoder, raw, ())?,
2393 }
2394
2395 Ok(())
2396 }
2397 }
2398
2399 unsafe impl<___E>
2400 ::fidl_next::EncodeOption<crate::wire_optional::DataRouterRouteResponse<'static>, ___E>
2401 for DataRouterRouteResponse
2402 where
2403 ___E: ?Sized,
2404 DataRouterRouteResponse:
2405 ::fidl_next::Encode<crate::wire::DataRouterRouteResponse<'static>, ___E>,
2406 {
2407 #[inline]
2408 fn encode_option(
2409 this: ::core::option::Option<Self>,
2410 encoder: &mut ___E,
2411 out: &mut ::core::mem::MaybeUninit<
2412 crate::wire_optional::DataRouterRouteResponse<'static>,
2413 >,
2414 _: (),
2415 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2416 ::fidl_next::munge!(let crate::wire_optional::DataRouterRouteResponse { raw, _phantom: _ } = &mut *out);
2417
2418 if let Some(inner) = this {
2419 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2420 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2421 } else {
2422 ::fidl_next::wire::Union::encode_absent(raw);
2423 }
2424
2425 Ok(())
2426 }
2427 }
2428
2429 impl<'de> ::fidl_next::FromWire<crate::wire::DataRouterRouteResponse<'de>>
2430 for DataRouterRouteResponse
2431 {
2432 #[inline]
2433 fn from_wire(wire: crate::wire::DataRouterRouteResponse<'de>) -> Self {
2434 let wire = ::core::mem::ManuallyDrop::new(wire);
2435 match wire.raw.ordinal() {
2436 1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
2437 wire.raw.get().read_unchecked::<crate::wire::Data<'de>>()
2438 })),
2439
2440 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
2441 wire.raw.get().read_unchecked::<crate::wire::Unit>()
2442 })),
2443
2444 _ => unsafe { ::core::hint::unreachable_unchecked() },
2445 }
2446 }
2447 }
2448
2449 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DataRouterRouteResponse<'de>>
2450 for DataRouterRouteResponse
2451 {
2452 #[inline]
2453 fn from_wire_option(
2454 wire: crate::wire_optional::DataRouterRouteResponse<'de>,
2455 ) -> ::core::option::Option<Self> {
2456 if let Some(inner) = wire.into_option() {
2457 Some(::fidl_next::FromWire::from_wire(inner))
2458 } else {
2459 None
2460 }
2461 }
2462 }
2463
2464 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DataRouterRouteResponse<'de>>
2465 for Box<DataRouterRouteResponse>
2466 {
2467 #[inline]
2468 fn from_wire_option(
2469 wire: crate::wire_optional::DataRouterRouteResponse<'de>,
2470 ) -> ::core::option::Option<Self> {
2471 <DataRouterRouteResponse as ::fidl_next::FromWireOption<
2472 crate::wire_optional::DataRouterRouteResponse<'de>,
2473 >>::from_wire_option(wire)
2474 .map(Box::new)
2475 }
2476 }
2477
2478 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2479 pub struct DictionaryDrainIteratorGetNextResponse {
2480 pub items: ::std::vec::Vec<crate::natural::DictionaryItem>,
2481
2482 pub end_id: u64,
2483 }
2484
2485 unsafe impl<___E>
2486 ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextResponse<'static>, ___E>
2487 for DictionaryDrainIteratorGetNextResponse
2488 where
2489 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2490 ___E: ::fidl_next::Encoder,
2491 ___E: ::fidl_next::fuchsia::HandleEncoder,
2492 {
2493 #[inline]
2494 fn encode(
2495 self,
2496 encoder_: &mut ___E,
2497 out_: &mut ::core::mem::MaybeUninit<
2498 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
2499 >,
2500 _: (),
2501 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2502 ::fidl_next::munge! {
2503 let crate::wire::DictionaryDrainIteratorGetNextResponse {
2504 items,
2505 end_id,
2506
2507 } = out_;
2508 }
2509
2510 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
2511
2512 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(items.as_mut_ptr()) };
2513 ::fidl_next::Constrained::validate(_field, (128, ()))?;
2514
2515 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
2516
2517 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(end_id.as_mut_ptr()) };
2518
2519 Ok(())
2520 }
2521 }
2522
2523 unsafe impl<___E>
2524 ::fidl_next::EncodeOption<
2525 ::fidl_next::wire::Box<
2526 'static,
2527 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
2528 >,
2529 ___E,
2530 > for DictionaryDrainIteratorGetNextResponse
2531 where
2532 ___E: ::fidl_next::Encoder + ?Sized,
2533 DictionaryDrainIteratorGetNextResponse:
2534 ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextResponse<'static>, ___E>,
2535 {
2536 #[inline]
2537 fn encode_option(
2538 this: ::core::option::Option<Self>,
2539 encoder: &mut ___E,
2540 out: &mut ::core::mem::MaybeUninit<
2541 ::fidl_next::wire::Box<
2542 'static,
2543 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
2544 >,
2545 >,
2546 _: (),
2547 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2548 if let Some(inner) = this {
2549 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2550 ::fidl_next::wire::Box::encode_present(out);
2551 } else {
2552 ::fidl_next::wire::Box::encode_absent(out);
2553 }
2554
2555 Ok(())
2556 }
2557 }
2558
2559 impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryDrainIteratorGetNextResponse<'de>>
2560 for DictionaryDrainIteratorGetNextResponse
2561 {
2562 #[inline]
2563 fn from_wire(wire: crate::wire::DictionaryDrainIteratorGetNextResponse<'de>) -> Self {
2564 Self {
2565 items: ::fidl_next::FromWire::from_wire(wire.items),
2566
2567 end_id: ::fidl_next::FromWire::from_wire(wire.end_id),
2568 }
2569 }
2570 }
2571
2572 #[doc = " A key-value pair in a [`DictionaryRef`], where the value may be elided.\n This is useful for APIs that may wish to omit the value, for example if it could not be\n duplicated.\n"]
2573 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2574 pub struct DictionaryOptionalItem {
2575 pub key: ::std::string::String,
2576
2577 pub value: ::core::option::Option<::std::boxed::Box<crate::natural::WrappedCapabilityId>>,
2578 }
2579
2580 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryOptionalItem<'static>, ___E>
2581 for DictionaryOptionalItem
2582 where
2583 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2584 ___E: ::fidl_next::Encoder,
2585 ___E: ::fidl_next::fuchsia::HandleEncoder,
2586 {
2587 #[inline]
2588 fn encode(
2589 self,
2590 encoder_: &mut ___E,
2591 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryOptionalItem<'static>>,
2592 _: (),
2593 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2594 ::fidl_next::munge! {
2595 let crate::wire::DictionaryOptionalItem {
2596 key,
2597 value,
2598
2599 } = out_;
2600 }
2601
2602 ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
2603
2604 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
2605 ::fidl_next::Constrained::validate(_field, 255)?;
2606
2607 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
2608
2609 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
2610
2611 Ok(())
2612 }
2613 }
2614
2615 unsafe impl<___E>
2616 ::fidl_next::EncodeOption<
2617 ::fidl_next::wire::Box<'static, crate::wire::DictionaryOptionalItem<'static>>,
2618 ___E,
2619 > for DictionaryOptionalItem
2620 where
2621 ___E: ::fidl_next::Encoder + ?Sized,
2622 DictionaryOptionalItem:
2623 ::fidl_next::Encode<crate::wire::DictionaryOptionalItem<'static>, ___E>,
2624 {
2625 #[inline]
2626 fn encode_option(
2627 this: ::core::option::Option<Self>,
2628 encoder: &mut ___E,
2629 out: &mut ::core::mem::MaybeUninit<
2630 ::fidl_next::wire::Box<'static, crate::wire::DictionaryOptionalItem<'static>>,
2631 >,
2632 _: (),
2633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2634 if let Some(inner) = this {
2635 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2636 ::fidl_next::wire::Box::encode_present(out);
2637 } else {
2638 ::fidl_next::wire::Box::encode_absent(out);
2639 }
2640
2641 Ok(())
2642 }
2643 }
2644
2645 impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryOptionalItem<'de>>
2646 for DictionaryOptionalItem
2647 {
2648 #[inline]
2649 fn from_wire(wire: crate::wire::DictionaryOptionalItem<'de>) -> Self {
2650 Self {
2651 key: ::fidl_next::FromWire::from_wire(wire.key),
2652
2653 value: ::fidl_next::FromWire::from_wire(wire.value),
2654 }
2655 }
2656 }
2657
2658 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2659 pub struct DictionaryEnumerateIteratorGetNextResponse {
2660 pub items: ::std::vec::Vec<crate::natural::DictionaryOptionalItem>,
2661
2662 pub end_id: u64,
2663 }
2664
2665 unsafe impl<___E>
2666 ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>, ___E>
2667 for DictionaryEnumerateIteratorGetNextResponse
2668 where
2669 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2670 ___E: ::fidl_next::Encoder,
2671 ___E: ::fidl_next::fuchsia::HandleEncoder,
2672 {
2673 #[inline]
2674 fn encode(
2675 self,
2676 encoder_: &mut ___E,
2677 out_: &mut ::core::mem::MaybeUninit<
2678 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
2679 >,
2680 _: (),
2681 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2682 ::fidl_next::munge! {
2683 let crate::wire::DictionaryEnumerateIteratorGetNextResponse {
2684 items,
2685 end_id,
2686
2687 } = out_;
2688 }
2689
2690 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
2691
2692 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(items.as_mut_ptr()) };
2693 ::fidl_next::Constrained::validate(_field, (128, ()))?;
2694
2695 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
2696
2697 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(end_id.as_mut_ptr()) };
2698
2699 Ok(())
2700 }
2701 }
2702
2703 unsafe impl<___E>
2704 ::fidl_next::EncodeOption<
2705 ::fidl_next::wire::Box<
2706 'static,
2707 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
2708 >,
2709 ___E,
2710 > for DictionaryEnumerateIteratorGetNextResponse
2711 where
2712 ___E: ::fidl_next::Encoder + ?Sized,
2713 DictionaryEnumerateIteratorGetNextResponse: ::fidl_next::Encode<
2714 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
2715 ___E,
2716 >,
2717 {
2718 #[inline]
2719 fn encode_option(
2720 this: ::core::option::Option<Self>,
2721 encoder: &mut ___E,
2722 out: &mut ::core::mem::MaybeUninit<
2723 ::fidl_next::wire::Box<
2724 'static,
2725 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
2726 >,
2727 >,
2728 _: (),
2729 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2730 if let Some(inner) = this {
2731 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2732 ::fidl_next::wire::Box::encode_present(out);
2733 } else {
2734 ::fidl_next::wire::Box::encode_absent(out);
2735 }
2736
2737 Ok(())
2738 }
2739 }
2740
2741 impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryEnumerateIteratorGetNextResponse<'de>>
2742 for DictionaryEnumerateIteratorGetNextResponse
2743 {
2744 #[inline]
2745 fn from_wire(wire: crate::wire::DictionaryEnumerateIteratorGetNextResponse<'de>) -> Self {
2746 Self {
2747 items: ::fidl_next::FromWire::from_wire(wire.items),
2748
2749 end_id: ::fidl_next::FromWire::from_wire(wire.end_id),
2750 }
2751 }
2752 }
2753
2754 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2755 pub struct DictionaryKeysIteratorGetNextResponse {
2756 pub keys: ::std::vec::Vec<::std::string::String>,
2757 }
2758
2759 unsafe impl<___E>
2760 ::fidl_next::Encode<crate::wire::DictionaryKeysIteratorGetNextResponse<'static>, ___E>
2761 for DictionaryKeysIteratorGetNextResponse
2762 where
2763 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2764 ___E: ::fidl_next::Encoder,
2765 ___E: ::fidl_next::fuchsia::HandleEncoder,
2766 {
2767 #[inline]
2768 fn encode(
2769 self,
2770 encoder_: &mut ___E,
2771 out_: &mut ::core::mem::MaybeUninit<
2772 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
2773 >,
2774 _: (),
2775 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2776 ::fidl_next::munge! {
2777 let crate::wire::DictionaryKeysIteratorGetNextResponse {
2778 keys,
2779
2780 } = out_;
2781 }
2782
2783 ::fidl_next::Encode::encode(self.keys, encoder_, keys, (128, 255))?;
2784
2785 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(keys.as_mut_ptr()) };
2786 ::fidl_next::Constrained::validate(_field, (128, 255))?;
2787
2788 Ok(())
2789 }
2790 }
2791
2792 unsafe impl<___E>
2793 ::fidl_next::EncodeOption<
2794 ::fidl_next::wire::Box<
2795 'static,
2796 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
2797 >,
2798 ___E,
2799 > for DictionaryKeysIteratorGetNextResponse
2800 where
2801 ___E: ::fidl_next::Encoder + ?Sized,
2802 DictionaryKeysIteratorGetNextResponse:
2803 ::fidl_next::Encode<crate::wire::DictionaryKeysIteratorGetNextResponse<'static>, ___E>,
2804 {
2805 #[inline]
2806 fn encode_option(
2807 this: ::core::option::Option<Self>,
2808 encoder: &mut ___E,
2809 out: &mut ::core::mem::MaybeUninit<
2810 ::fidl_next::wire::Box<
2811 'static,
2812 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
2813 >,
2814 >,
2815 _: (),
2816 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2817 if let Some(inner) = this {
2818 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2819 ::fidl_next::wire::Box::encode_present(out);
2820 } else {
2821 ::fidl_next::wire::Box::encode_absent(out);
2822 }
2823
2824 Ok(())
2825 }
2826 }
2827
2828 impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryKeysIteratorGetNextResponse<'de>>
2829 for DictionaryKeysIteratorGetNextResponse
2830 {
2831 #[inline]
2832 fn from_wire(wire: crate::wire::DictionaryKeysIteratorGetNextResponse<'de>) -> Self {
2833 Self { keys: ::fidl_next::FromWire::from_wire(wire.keys) }
2834 }
2835 }
2836
2837 #[derive(Debug, PartialEq)]
2838 pub enum DictionaryRouterRouteResponse {
2839 Dictionary(crate::natural::DictionaryRef),
2840
2841 Unavailable(crate::natural::Unit),
2842 }
2843
2844 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryRouterRouteResponse, ___E>
2845 for DictionaryRouterRouteResponse
2846 where
2847 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2848 ___E: ::fidl_next::fuchsia::HandleEncoder,
2849 {
2850 #[inline]
2851 fn encode(
2852 self,
2853 encoder: &mut ___E,
2854 out: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryRouterRouteResponse>,
2855 _: (),
2856 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2857 ::fidl_next::munge!(let crate::wire::DictionaryRouterRouteResponse { raw, _phantom: _ } = out);
2858
2859 match self {
2860 Self::Dictionary(value) => ::fidl_next::wire::Union::encode_as_static::<
2861 ___E,
2862 crate::wire::DictionaryRef,
2863 >(value, 1, encoder, raw, ())?,
2864
2865 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
2866 ___E,
2867 crate::wire::Unit,
2868 >(value, 2, encoder, raw, ())?,
2869 }
2870
2871 Ok(())
2872 }
2873 }
2874
2875 unsafe impl<___E>
2876 ::fidl_next::EncodeOption<crate::wire_optional::DictionaryRouterRouteResponse, ___E>
2877 for DictionaryRouterRouteResponse
2878 where
2879 ___E: ?Sized,
2880 DictionaryRouterRouteResponse:
2881 ::fidl_next::Encode<crate::wire::DictionaryRouterRouteResponse, ___E>,
2882 {
2883 #[inline]
2884 fn encode_option(
2885 this: ::core::option::Option<Self>,
2886 encoder: &mut ___E,
2887 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DictionaryRouterRouteResponse>,
2888 _: (),
2889 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2890 ::fidl_next::munge!(let crate::wire_optional::DictionaryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
2891
2892 if let Some(inner) = this {
2893 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2894 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2895 } else {
2896 ::fidl_next::wire::Union::encode_absent(raw);
2897 }
2898
2899 Ok(())
2900 }
2901 }
2902
2903 impl ::fidl_next::FromWire<crate::wire::DictionaryRouterRouteResponse>
2904 for DictionaryRouterRouteResponse
2905 {
2906 #[inline]
2907 fn from_wire(wire: crate::wire::DictionaryRouterRouteResponse) -> Self {
2908 let wire = ::core::mem::ManuallyDrop::new(wire);
2909 match wire.raw.ordinal() {
2910 1 => Self::Dictionary(::fidl_next::FromWire::from_wire(unsafe {
2911 wire.raw.get().read_unchecked::<crate::wire::DictionaryRef>()
2912 })),
2913
2914 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
2915 wire.raw.get().read_unchecked::<crate::wire::Unit>()
2916 })),
2917
2918 _ => unsafe { ::core::hint::unreachable_unchecked() },
2919 }
2920 }
2921 }
2922
2923 impl ::fidl_next::FromWireOption<crate::wire_optional::DictionaryRouterRouteResponse>
2924 for DictionaryRouterRouteResponse
2925 {
2926 #[inline]
2927 fn from_wire_option(
2928 wire: crate::wire_optional::DictionaryRouterRouteResponse,
2929 ) -> ::core::option::Option<Self> {
2930 if let Some(inner) = wire.into_option() {
2931 Some(::fidl_next::FromWire::from_wire(inner))
2932 } else {
2933 None
2934 }
2935 }
2936 }
2937
2938 impl ::fidl_next::FromWireOption<crate::wire_optional::DictionaryRouterRouteResponse>
2939 for Box<DictionaryRouterRouteResponse>
2940 {
2941 #[inline]
2942 fn from_wire_option(
2943 wire: crate::wire_optional::DictionaryRouterRouteResponse,
2944 ) -> ::core::option::Option<Self> {
2945 <DictionaryRouterRouteResponse as ::fidl_next::FromWireOption<
2946 crate::wire_optional::DictionaryRouterRouteResponse,
2947 >>::from_wire_option(wire)
2948 .map(Box::new)
2949 }
2950 }
2951
2952 #[derive(Debug, PartialEq)]
2953 pub enum DirConnectorRouterRouteResponse {
2954 DirConnector(crate::natural::DirConnector),
2955
2956 Unavailable(crate::natural::Unit),
2957 }
2958
2959 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirConnectorRouterRouteResponse, ___E>
2960 for DirConnectorRouterRouteResponse
2961 where
2962 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2963 ___E: ::fidl_next::fuchsia::HandleEncoder,
2964 {
2965 #[inline]
2966 fn encode(
2967 self,
2968 encoder: &mut ___E,
2969 out: &mut ::core::mem::MaybeUninit<crate::wire::DirConnectorRouterRouteResponse>,
2970 _: (),
2971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2972 ::fidl_next::munge!(let crate::wire::DirConnectorRouterRouteResponse { raw, _phantom: _ } = out);
2973
2974 match self {
2975 Self::DirConnector(value) => ::fidl_next::wire::Union::encode_as_static::<
2976 ___E,
2977 crate::wire::DirConnector,
2978 >(value, 1, encoder, raw, ())?,
2979
2980 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
2981 ___E,
2982 crate::wire::Unit,
2983 >(value, 2, encoder, raw, ())?,
2984 }
2985
2986 Ok(())
2987 }
2988 }
2989
2990 unsafe impl<___E>
2991 ::fidl_next::EncodeOption<crate::wire_optional::DirConnectorRouterRouteResponse, ___E>
2992 for DirConnectorRouterRouteResponse
2993 where
2994 ___E: ?Sized,
2995 DirConnectorRouterRouteResponse:
2996 ::fidl_next::Encode<crate::wire::DirConnectorRouterRouteResponse, ___E>,
2997 {
2998 #[inline]
2999 fn encode_option(
3000 this: ::core::option::Option<Self>,
3001 encoder: &mut ___E,
3002 out: &mut ::core::mem::MaybeUninit<
3003 crate::wire_optional::DirConnectorRouterRouteResponse,
3004 >,
3005 _: (),
3006 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3007 ::fidl_next::munge!(let crate::wire_optional::DirConnectorRouterRouteResponse { raw, _phantom: _ } = &mut *out);
3008
3009 if let Some(inner) = this {
3010 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
3011 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
3012 } else {
3013 ::fidl_next::wire::Union::encode_absent(raw);
3014 }
3015
3016 Ok(())
3017 }
3018 }
3019
3020 impl ::fidl_next::FromWire<crate::wire::DirConnectorRouterRouteResponse>
3021 for DirConnectorRouterRouteResponse
3022 {
3023 #[inline]
3024 fn from_wire(wire: crate::wire::DirConnectorRouterRouteResponse) -> Self {
3025 let wire = ::core::mem::ManuallyDrop::new(wire);
3026 match wire.raw.ordinal() {
3027 1 => Self::DirConnector(::fidl_next::FromWire::from_wire(unsafe {
3028 wire.raw.get().read_unchecked::<crate::wire::DirConnector>()
3029 })),
3030
3031 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
3032 wire.raw.get().read_unchecked::<crate::wire::Unit>()
3033 })),
3034
3035 _ => unsafe { ::core::hint::unreachable_unchecked() },
3036 }
3037 }
3038 }
3039
3040 impl ::fidl_next::FromWireOption<crate::wire_optional::DirConnectorRouterRouteResponse>
3041 for DirConnectorRouterRouteResponse
3042 {
3043 #[inline]
3044 fn from_wire_option(
3045 wire: crate::wire_optional::DirConnectorRouterRouteResponse,
3046 ) -> ::core::option::Option<Self> {
3047 if let Some(inner) = wire.into_option() {
3048 Some(::fidl_next::FromWire::from_wire(inner))
3049 } else {
3050 None
3051 }
3052 }
3053 }
3054
3055 impl ::fidl_next::FromWireOption<crate::wire_optional::DirConnectorRouterRouteResponse>
3056 for Box<DirConnectorRouterRouteResponse>
3057 {
3058 #[inline]
3059 fn from_wire_option(
3060 wire: crate::wire_optional::DirConnectorRouterRouteResponse,
3061 ) -> ::core::option::Option<Self> {
3062 <DirConnectorRouterRouteResponse as ::fidl_next::FromWireOption<
3063 crate::wire_optional::DirConnectorRouterRouteResponse,
3064 >>::from_wire_option(wire)
3065 .map(Box::new)
3066 }
3067 }
3068
3069 #[derive(Debug, PartialEq)]
3070 pub enum DirEntryRouterRouteResponse {
3071 DirEntry(crate::natural::DirEntry),
3072
3073 Unavailable(crate::natural::Unit),
3074 }
3075
3076 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirEntryRouterRouteResponse, ___E>
3077 for DirEntryRouterRouteResponse
3078 where
3079 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3080 ___E: ::fidl_next::fuchsia::HandleEncoder,
3081 {
3082 #[inline]
3083 fn encode(
3084 self,
3085 encoder: &mut ___E,
3086 out: &mut ::core::mem::MaybeUninit<crate::wire::DirEntryRouterRouteResponse>,
3087 _: (),
3088 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3089 ::fidl_next::munge!(let crate::wire::DirEntryRouterRouteResponse { raw, _phantom: _ } = out);
3090
3091 match self {
3092 Self::DirEntry(value) => ::fidl_next::wire::Union::encode_as_static::<
3093 ___E,
3094 crate::wire::DirEntry,
3095 >(value, 1, encoder, raw, ())?,
3096
3097 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
3098 ___E,
3099 crate::wire::Unit,
3100 >(value, 2, encoder, raw, ())?,
3101 }
3102
3103 Ok(())
3104 }
3105 }
3106
3107 unsafe impl<___E>
3108 ::fidl_next::EncodeOption<crate::wire_optional::DirEntryRouterRouteResponse, ___E>
3109 for DirEntryRouterRouteResponse
3110 where
3111 ___E: ?Sized,
3112 DirEntryRouterRouteResponse:
3113 ::fidl_next::Encode<crate::wire::DirEntryRouterRouteResponse, ___E>,
3114 {
3115 #[inline]
3116 fn encode_option(
3117 this: ::core::option::Option<Self>,
3118 encoder: &mut ___E,
3119 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DirEntryRouterRouteResponse>,
3120 _: (),
3121 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3122 ::fidl_next::munge!(let crate::wire_optional::DirEntryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
3123
3124 if let Some(inner) = this {
3125 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
3126 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
3127 } else {
3128 ::fidl_next::wire::Union::encode_absent(raw);
3129 }
3130
3131 Ok(())
3132 }
3133 }
3134
3135 impl ::fidl_next::FromWire<crate::wire::DirEntryRouterRouteResponse>
3136 for DirEntryRouterRouteResponse
3137 {
3138 #[inline]
3139 fn from_wire(wire: crate::wire::DirEntryRouterRouteResponse) -> Self {
3140 let wire = ::core::mem::ManuallyDrop::new(wire);
3141 match wire.raw.ordinal() {
3142 1 => Self::DirEntry(::fidl_next::FromWire::from_wire(unsafe {
3143 wire.raw.get().read_unchecked::<crate::wire::DirEntry>()
3144 })),
3145
3146 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
3147 wire.raw.get().read_unchecked::<crate::wire::Unit>()
3148 })),
3149
3150 _ => unsafe { ::core::hint::unreachable_unchecked() },
3151 }
3152 }
3153 }
3154
3155 impl ::fidl_next::FromWireOption<crate::wire_optional::DirEntryRouterRouteResponse>
3156 for DirEntryRouterRouteResponse
3157 {
3158 #[inline]
3159 fn from_wire_option(
3160 wire: crate::wire_optional::DirEntryRouterRouteResponse,
3161 ) -> ::core::option::Option<Self> {
3162 if let Some(inner) = wire.into_option() {
3163 Some(::fidl_next::FromWire::from_wire(inner))
3164 } else {
3165 None
3166 }
3167 }
3168 }
3169
3170 impl ::fidl_next::FromWireOption<crate::wire_optional::DirEntryRouterRouteResponse>
3171 for Box<DirEntryRouterRouteResponse>
3172 {
3173 #[inline]
3174 fn from_wire_option(
3175 wire: crate::wire_optional::DirEntryRouterRouteResponse,
3176 ) -> ::core::option::Option<Self> {
3177 <DirEntryRouterRouteResponse as ::fidl_next::FromWireOption<
3178 crate::wire_optional::DirEntryRouterRouteResponse,
3179 >>::from_wire_option(wire)
3180 .map(Box::new)
3181 }
3182 }
3183
3184 #[derive(Debug, Default, PartialEq)]
3185 pub struct DirReceiverReceiveRequest {
3186 pub channel: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
3187
3188 pub flags: ::core::option::Option<::fidl_next_fuchsia_io::natural::Flags>,
3189
3190 pub subdir: ::core::option::Option<::std::string::String>,
3191 }
3192
3193 impl DirReceiverReceiveRequest {
3194 fn __max_ordinal(&self) -> usize {
3195 if self.subdir.is_some() {
3196 return 3;
3197 }
3198
3199 if self.flags.is_some() {
3200 return 2;
3201 }
3202
3203 if self.channel.is_some() {
3204 return 1;
3205 }
3206
3207 0
3208 }
3209 }
3210
3211 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirReceiverReceiveRequest<'static>, ___E>
3212 for DirReceiverReceiveRequest
3213 where
3214 ___E: ::fidl_next::Encoder + ?Sized,
3215 ___E: ::fidl_next::fuchsia::HandleEncoder,
3216 {
3217 #[inline]
3218 fn encode(
3219 mut self,
3220 encoder: &mut ___E,
3221 out: &mut ::core::mem::MaybeUninit<crate::wire::DirReceiverReceiveRequest<'static>>,
3222 _: (),
3223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3224 ::fidl_next::munge!(let crate::wire::DirReceiverReceiveRequest { table } = out);
3225
3226 let max_ord = self.__max_ordinal();
3227
3228 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3229 ::fidl_next::Wire::zero_padding(&mut out);
3230
3231 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3232 ::fidl_next::wire::Envelope,
3233 >(encoder, max_ord);
3234
3235 for i in 1..=max_ord {
3236 match i {
3237 3 => {
3238 if let Some(value) = self.subdir.take() {
3239 ::fidl_next::wire::Envelope::encode_value::<
3240 ::fidl_next::wire::String<'static>,
3241 ___E,
3242 >(
3243 value, preallocated.encoder, &mut out, 4095
3244 )?;
3245 } else {
3246 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3247 }
3248 }
3249
3250 2 => {
3251 if let Some(value) = self.flags.take() {
3252 ::fidl_next::wire::Envelope::encode_value::<
3253 ::fidl_next_fuchsia_io::wire::Flags,
3254 ___E,
3255 >(
3256 value, preallocated.encoder, &mut out, ()
3257 )?;
3258 } else {
3259 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3260 }
3261 }
3262
3263 1 => {
3264 if let Some(value) = self.channel.take() {
3265 ::fidl_next::wire::Envelope::encode_value::<
3266 ::fidl_next::wire::fuchsia::Channel,
3267 ___E,
3268 >(
3269 value, preallocated.encoder, &mut out, ()
3270 )?;
3271 } else {
3272 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3273 }
3274 }
3275
3276 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3277 }
3278 unsafe {
3279 preallocated.write_next(out.assume_init_ref());
3280 }
3281 }
3282
3283 ::fidl_next::wire::Table::encode_len(table, max_ord);
3284
3285 Ok(())
3286 }
3287 }
3288
3289 impl<'de> ::fidl_next::FromWire<crate::wire::DirReceiverReceiveRequest<'de>>
3290 for DirReceiverReceiveRequest
3291 {
3292 #[inline]
3293 fn from_wire(wire_: crate::wire::DirReceiverReceiveRequest<'de>) -> Self {
3294 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3295
3296 let channel = wire_.table.get(1);
3297
3298 let flags = wire_.table.get(2);
3299
3300 let subdir = wire_.table.get(3);
3301
3302 Self {
3303 channel: channel.map(|envelope| {
3304 ::fidl_next::FromWire::from_wire(unsafe {
3305 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
3306 })
3307 }),
3308
3309 flags: flags.map(|envelope| {
3310 ::fidl_next::FromWire::from_wire(unsafe {
3311 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
3312 })
3313 }),
3314
3315 subdir: subdir.map(|envelope| {
3316 ::fidl_next::FromWire::from_wire(unsafe {
3317 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3318 })
3319 }),
3320 }
3321 }
3322 }
3323
3324 #[derive(Debug, PartialEq)]
3325 pub enum DirectoryRouterRouteResponse {
3326 Directory(
3327 ::fidl_next::ClientEnd<
3328 ::fidl_next_fuchsia_io::Directory,
3329 ::fidl_next::fuchsia::zx::Channel,
3330 >,
3331 ),
3332
3333 Unavailable(crate::natural::Unit),
3334 }
3335
3336 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRouterRouteResponse, ___E>
3337 for DirectoryRouterRouteResponse
3338 where
3339 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3340 ___E: ::fidl_next::fuchsia::HandleEncoder,
3341 {
3342 #[inline]
3343 fn encode(
3344 self,
3345 encoder: &mut ___E,
3346 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRouterRouteResponse>,
3347 _: (),
3348 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3349 ::fidl_next::munge!(let crate::wire::DirectoryRouterRouteResponse { raw, _phantom: _ } = out);
3350
3351 match self {
3352 Self::Directory(value) => ::fidl_next::wire::Union::encode_as_static::<
3353 ___E,
3354 ::fidl_next::ClientEnd<
3355 ::fidl_next_fuchsia_io::Directory,
3356 ::fidl_next::wire::fuchsia::Channel,
3357 >,
3358 >(value, 1, encoder, raw, ())?,
3359
3360 Self::Unavailable(value) => ::fidl_next::wire::Union::encode_as_static::<
3361 ___E,
3362 crate::wire::Unit,
3363 >(value, 2, encoder, raw, ())?,
3364 }
3365
3366 Ok(())
3367 }
3368 }
3369
3370 unsafe impl<___E>
3371 ::fidl_next::EncodeOption<crate::wire_optional::DirectoryRouterRouteResponse, ___E>
3372 for DirectoryRouterRouteResponse
3373 where
3374 ___E: ?Sized,
3375 DirectoryRouterRouteResponse:
3376 ::fidl_next::Encode<crate::wire::DirectoryRouterRouteResponse, ___E>,
3377 {
3378 #[inline]
3379 fn encode_option(
3380 this: ::core::option::Option<Self>,
3381 encoder: &mut ___E,
3382 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DirectoryRouterRouteResponse>,
3383 _: (),
3384 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3385 ::fidl_next::munge!(let crate::wire_optional::DirectoryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
3386
3387 if let Some(inner) = this {
3388 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
3389 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
3390 } else {
3391 ::fidl_next::wire::Union::encode_absent(raw);
3392 }
3393
3394 Ok(())
3395 }
3396 }
3397
3398 impl ::fidl_next::FromWire<crate::wire::DirectoryRouterRouteResponse>
3399 for DirectoryRouterRouteResponse
3400 {
3401 #[inline]
3402 fn from_wire(wire: crate::wire::DirectoryRouterRouteResponse) -> Self {
3403 let wire = ::core::mem::ManuallyDrop::new(wire);
3404 match wire.raw.ordinal() {
3405 1 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
3406 wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
3407 ::fidl_next_fuchsia_io::Directory,
3408 ::fidl_next::wire::fuchsia::Channel,
3409 >>()
3410 })),
3411
3412 2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
3413 wire.raw.get().read_unchecked::<crate::wire::Unit>()
3414 })),
3415
3416 _ => unsafe { ::core::hint::unreachable_unchecked() },
3417 }
3418 }
3419 }
3420
3421 impl ::fidl_next::FromWireOption<crate::wire_optional::DirectoryRouterRouteResponse>
3422 for DirectoryRouterRouteResponse
3423 {
3424 #[inline]
3425 fn from_wire_option(
3426 wire: crate::wire_optional::DirectoryRouterRouteResponse,
3427 ) -> ::core::option::Option<Self> {
3428 if let Some(inner) = wire.into_option() {
3429 Some(::fidl_next::FromWire::from_wire(inner))
3430 } else {
3431 None
3432 }
3433 }
3434 }
3435
3436 impl ::fidl_next::FromWireOption<crate::wire_optional::DirectoryRouterRouteResponse>
3437 for Box<DirectoryRouterRouteResponse>
3438 {
3439 #[inline]
3440 fn from_wire_option(
3441 wire: crate::wire_optional::DirectoryRouterRouteResponse,
3442 ) -> ::core::option::Option<Self> {
3443 <DirectoryRouterRouteResponse as ::fidl_next::FromWireOption<
3444 crate::wire_optional::DirectoryRouterRouteResponse,
3445 >>::from_wire_option(wire)
3446 .map(Box::new)
3447 }
3448 }
3449
3450 #[doc = " Contains a protocol open request.\n"]
3451 #[derive(Debug, PartialEq)]
3452 #[repr(C)]
3453 pub struct ProtocolPayload {
3454 pub channel: ::fidl_next::fuchsia::zx::Channel,
3455 }
3456
3457 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ProtocolPayload, ___E> for ProtocolPayload
3458 where
3459 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3460 ___E: ::fidl_next::fuchsia::HandleEncoder,
3461 {
3462 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::ProtocolPayload> = unsafe {
3463 ::fidl_next::CopyOptimization::enable_if(
3464 true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encode<
3465 ::fidl_next::wire::fuchsia::Channel,
3466 ___E,
3467 >>::COPY_OPTIMIZATION
3468 .is_enabled(),
3469 )
3470 };
3471
3472 #[inline]
3473 fn encode(
3474 self,
3475 encoder_: &mut ___E,
3476 out_: &mut ::core::mem::MaybeUninit<crate::wire::ProtocolPayload>,
3477 _: (),
3478 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3479 ::fidl_next::munge! {
3480 let crate::wire::ProtocolPayload {
3481 channel,
3482
3483 } = out_;
3484 }
3485
3486 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
3487
3488 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(channel.as_mut_ptr()) };
3489
3490 Ok(())
3491 }
3492 }
3493
3494 unsafe impl<___E>
3495 ::fidl_next::EncodeOption<
3496 ::fidl_next::wire::Box<'static, crate::wire::ProtocolPayload>,
3497 ___E,
3498 > for ProtocolPayload
3499 where
3500 ___E: ::fidl_next::Encoder + ?Sized,
3501 ProtocolPayload: ::fidl_next::Encode<crate::wire::ProtocolPayload, ___E>,
3502 {
3503 #[inline]
3504 fn encode_option(
3505 this: ::core::option::Option<Self>,
3506 encoder: &mut ___E,
3507 out: &mut ::core::mem::MaybeUninit<
3508 ::fidl_next::wire::Box<'static, crate::wire::ProtocolPayload>,
3509 >,
3510 _: (),
3511 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3512 if let Some(inner) = this {
3513 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3514 ::fidl_next::wire::Box::encode_present(out);
3515 } else {
3516 ::fidl_next::wire::Box::encode_absent(out);
3517 }
3518
3519 Ok(())
3520 }
3521 }
3522
3523 impl ::fidl_next::FromWire<crate::wire::ProtocolPayload> for ProtocolPayload {
3524 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::ProtocolPayload, Self> = unsafe {
3525 ::fidl_next::CopyOptimization::enable_if(
3526 true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
3527 ::fidl_next::wire::fuchsia::Channel,
3528 >>::COPY_OPTIMIZATION
3529 .is_enabled(),
3530 )
3531 };
3532
3533 #[inline]
3534 fn from_wire(wire: crate::wire::ProtocolPayload) -> Self {
3535 Self { channel: ::fidl_next::FromWire::from_wire(wire.channel) }
3536 }
3537 }
3538}
3539
3540pub mod wire {
3541
3542 pub use fidl_next_common_fuchsia_component_sandbox::wire::*;
3543
3544 pub type Token = ::fidl_next::wire::fuchsia::EventPair;
3546
3547 #[derive(Debug)]
3549 #[repr(C)]
3550 pub struct DirConnector {
3551 pub token: ::fidl_next::wire::fuchsia::EventPair,
3552 }
3553
3554 static_assertions::const_assert_eq!(std::mem::size_of::<DirConnector>(), 4);
3555 static_assertions::const_assert_eq!(std::mem::align_of::<DirConnector>(), 4);
3556
3557 static_assertions::const_assert_eq!(std::mem::offset_of!(DirConnector, token), 0);
3558
3559 impl ::fidl_next::Constrained for DirConnector {
3560 type Constraint = ();
3561
3562 fn validate(
3563 _: ::fidl_next::Slot<'_, Self>,
3564 _: Self::Constraint,
3565 ) -> Result<(), ::fidl_next::ValidationError> {
3566 Ok(())
3567 }
3568 }
3569
3570 unsafe impl ::fidl_next::Wire for DirConnector {
3571 type Narrowed<'de> = DirConnector;
3572
3573 #[inline]
3574 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3575 ::fidl_next::munge! {
3576 let Self {
3577 token,
3578
3579 } = &mut *out_;
3580 }
3581
3582 ::fidl_next::Wire::zero_padding(token);
3583 }
3584 }
3585
3586 unsafe impl<___D> ::fidl_next::Decode<___D> for DirConnector
3587 where
3588 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3589 ___D: ::fidl_next::fuchsia::HandleDecoder,
3590 {
3591 fn decode(
3592 slot_: ::fidl_next::Slot<'_, Self>,
3593 decoder_: &mut ___D,
3594 _: (),
3595 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3596 ::fidl_next::munge! {
3597 let Self {
3598 mut token,
3599
3600 } = slot_;
3601 }
3602
3603 let _field = token.as_mut();
3604
3605 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3606
3607 Ok(())
3608 }
3609 }
3610
3611 impl ::fidl_next::IntoNatural for DirConnector {
3612 type Natural = crate::natural::DirConnector;
3613 }
3614
3615 #[repr(C)]
3617 pub struct AggregateSource<'de> {
3618 pub(crate) table: ::fidl_next::wire::Table<'de>,
3619 }
3620
3621 impl<'de> Drop for AggregateSource<'de> {
3622 fn drop(&mut self) {
3623 let _ = self
3624 .table
3625 .get(1)
3626 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::DirConnector>() });
3627
3628 let _ = self.table.get(2)
3629 .map(|envelope| unsafe {
3630 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>()
3631 });
3632
3633 let _ = self.table.get(3).map(|envelope| unsafe {
3634 envelope.read_unchecked::<::fidl_next::wire::Vector<
3635 'de,
3636 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>,
3637 >>()
3638 });
3639 }
3640 }
3641
3642 impl ::fidl_next::Constrained for AggregateSource<'_> {
3643 type Constraint = ();
3644
3645 fn validate(
3646 _: ::fidl_next::Slot<'_, Self>,
3647 _: Self::Constraint,
3648 ) -> Result<(), ::fidl_next::ValidationError> {
3649 Ok(())
3650 }
3651 }
3652
3653 unsafe impl ::fidl_next::Wire for AggregateSource<'static> {
3654 type Narrowed<'de> = AggregateSource<'de>;
3655
3656 #[inline]
3657 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3658 ::fidl_next::munge!(let Self { table } = out);
3659 ::fidl_next::wire::Table::zero_padding(table);
3660 }
3661 }
3662
3663 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AggregateSource<'de>
3664 where
3665 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3666 ___D: ::fidl_next::fuchsia::HandleDecoder,
3667 {
3668 fn decode(
3669 slot: ::fidl_next::Slot<'_, Self>,
3670 decoder: &mut ___D,
3671 _: (),
3672 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3673 ::fidl_next::munge!(let Self { table } = slot);
3674
3675 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3676 match ordinal {
3677 0 => unsafe { ::core::hint::unreachable_unchecked() },
3678
3679 1 => {
3680 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::DirConnector>(
3681 slot.as_mut(),
3682 decoder,
3683 (),
3684 )?;
3685
3686 Ok(())
3687 }
3688
3689 2 => {
3690 ::fidl_next::wire::Envelope::decode_as::<
3691 ___D,
3692 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
3693 >(slot.as_mut(), decoder, (4294967295, 255))?;
3694
3695 Ok(())
3696 }
3697
3698 3 => {
3699 ::fidl_next::wire::Envelope::decode_as::<
3700 ___D,
3701 ::fidl_next::wire::Vector<
3702 'de,
3703 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>,
3704 >,
3705 >(slot.as_mut(), decoder, (4294967295, ()))?;
3706
3707 Ok(())
3708 }
3709
3710 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3711 }
3712 })
3713 }
3714 }
3715
3716 impl<'de> AggregateSource<'de> {
3717 pub fn dir_connector(&self) -> ::core::option::Option<&crate::wire::DirConnector> {
3718 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3719 }
3720
3721 pub fn source_instance_filter(
3722 &self,
3723 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>
3724 {
3725 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3726 }
3727
3728 pub fn renamed_instances(
3729 &self,
3730 ) -> ::core::option::Option<
3731 &::fidl_next::wire::Vector<
3732 'de,
3733 ::fidl_next_fuchsia_component_decl::wire::NameMapping<'de>,
3734 >,
3735 > {
3736 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3737 }
3738 }
3739
3740 impl<'de> ::core::fmt::Debug for AggregateSource<'de> {
3741 fn fmt(
3742 &self,
3743 f: &mut ::core::fmt::Formatter<'_>,
3744 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3745 f.debug_struct("AggregateSource")
3746 .field("dir_connector", &self.dir_connector())
3747 .field("source_instance_filter", &self.source_instance_filter())
3748 .field("renamed_instances", &self.renamed_instances())
3749 .finish()
3750 }
3751 }
3752
3753 impl<'de> ::fidl_next::IntoNatural for AggregateSource<'de> {
3754 type Natural = crate::natural::AggregateSource;
3755 }
3756
3757 #[derive(Debug)]
3759 #[repr(C)]
3760 pub struct DictionaryRef {
3761 pub token: ::fidl_next::wire::fuchsia::EventPair,
3762 }
3763
3764 static_assertions::const_assert_eq!(std::mem::size_of::<DictionaryRef>(), 4);
3765 static_assertions::const_assert_eq!(std::mem::align_of::<DictionaryRef>(), 4);
3766
3767 static_assertions::const_assert_eq!(std::mem::offset_of!(DictionaryRef, token), 0);
3768
3769 impl ::fidl_next::Constrained for DictionaryRef {
3770 type Constraint = ();
3771
3772 fn validate(
3773 _: ::fidl_next::Slot<'_, Self>,
3774 _: Self::Constraint,
3775 ) -> Result<(), ::fidl_next::ValidationError> {
3776 Ok(())
3777 }
3778 }
3779
3780 unsafe impl ::fidl_next::Wire for DictionaryRef {
3781 type Narrowed<'de> = DictionaryRef;
3782
3783 #[inline]
3784 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3785 ::fidl_next::munge! {
3786 let Self {
3787 token,
3788
3789 } = &mut *out_;
3790 }
3791
3792 ::fidl_next::Wire::zero_padding(token);
3793 }
3794 }
3795
3796 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRef
3797 where
3798 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3799 ___D: ::fidl_next::fuchsia::HandleDecoder,
3800 {
3801 fn decode(
3802 slot_: ::fidl_next::Slot<'_, Self>,
3803 decoder_: &mut ___D,
3804 _: (),
3805 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3806 ::fidl_next::munge! {
3807 let Self {
3808 mut token,
3809
3810 } = slot_;
3811 }
3812
3813 let _field = token.as_mut();
3814
3815 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3816
3817 Ok(())
3818 }
3819 }
3820
3821 impl ::fidl_next::IntoNatural for DictionaryRef {
3822 type Natural = crate::natural::DictionaryRef;
3823 }
3824
3825 #[derive(Debug)]
3827 #[repr(C)]
3828 pub struct Connector {
3829 pub token: ::fidl_next::wire::fuchsia::EventPair,
3830 }
3831
3832 static_assertions::const_assert_eq!(std::mem::size_of::<Connector>(), 4);
3833 static_assertions::const_assert_eq!(std::mem::align_of::<Connector>(), 4);
3834
3835 static_assertions::const_assert_eq!(std::mem::offset_of!(Connector, token), 0);
3836
3837 impl ::fidl_next::Constrained for Connector {
3838 type Constraint = ();
3839
3840 fn validate(
3841 _: ::fidl_next::Slot<'_, Self>,
3842 _: Self::Constraint,
3843 ) -> Result<(), ::fidl_next::ValidationError> {
3844 Ok(())
3845 }
3846 }
3847
3848 unsafe impl ::fidl_next::Wire for Connector {
3849 type Narrowed<'de> = Connector;
3850
3851 #[inline]
3852 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3853 ::fidl_next::munge! {
3854 let Self {
3855 token,
3856
3857 } = &mut *out_;
3858 }
3859
3860 ::fidl_next::Wire::zero_padding(token);
3861 }
3862 }
3863
3864 unsafe impl<___D> ::fidl_next::Decode<___D> for Connector
3865 where
3866 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3867 ___D: ::fidl_next::fuchsia::HandleDecoder,
3868 {
3869 fn decode(
3870 slot_: ::fidl_next::Slot<'_, Self>,
3871 decoder_: &mut ___D,
3872 _: (),
3873 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3874 ::fidl_next::munge! {
3875 let Self {
3876 mut token,
3877
3878 } = slot_;
3879 }
3880
3881 let _field = token.as_mut();
3882
3883 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3884
3885 Ok(())
3886 }
3887 }
3888
3889 impl ::fidl_next::IntoNatural for Connector {
3890 type Natural = crate::natural::Connector;
3891 }
3892
3893 #[derive(Debug)]
3895 #[repr(C)]
3896 pub struct DirEntry {
3897 pub token: ::fidl_next::wire::fuchsia::EventPair,
3898 }
3899
3900 static_assertions::const_assert_eq!(std::mem::size_of::<DirEntry>(), 4);
3901 static_assertions::const_assert_eq!(std::mem::align_of::<DirEntry>(), 4);
3902
3903 static_assertions::const_assert_eq!(std::mem::offset_of!(DirEntry, token), 0);
3904
3905 impl ::fidl_next::Constrained for DirEntry {
3906 type Constraint = ();
3907
3908 fn validate(
3909 _: ::fidl_next::Slot<'_, Self>,
3910 _: Self::Constraint,
3911 ) -> Result<(), ::fidl_next::ValidationError> {
3912 Ok(())
3913 }
3914 }
3915
3916 unsafe impl ::fidl_next::Wire for DirEntry {
3917 type Narrowed<'de> = DirEntry;
3918
3919 #[inline]
3920 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3921 ::fidl_next::munge! {
3922 let Self {
3923 token,
3924
3925 } = &mut *out_;
3926 }
3927
3928 ::fidl_next::Wire::zero_padding(token);
3929 }
3930 }
3931
3932 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntry
3933 where
3934 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3935 ___D: ::fidl_next::fuchsia::HandleDecoder,
3936 {
3937 fn decode(
3938 slot_: ::fidl_next::Slot<'_, Self>,
3939 decoder_: &mut ___D,
3940 _: (),
3941 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3942 ::fidl_next::munge! {
3943 let Self {
3944 mut token,
3945
3946 } = slot_;
3947 }
3948
3949 let _field = token.as_mut();
3950
3951 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3952
3953 Ok(())
3954 }
3955 }
3956
3957 impl ::fidl_next::IntoNatural for DirEntry {
3958 type Natural = crate::natural::DirEntry;
3959 }
3960
3961 #[repr(transparent)]
3963 pub struct Capability<'de> {
3964 pub(crate) raw: ::fidl_next::wire::Union,
3965 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3966 }
3967
3968 impl<'de> Drop for Capability<'de> {
3969 fn drop(&mut self) {
3970 match self.raw.ordinal() {
3971 1 => {
3972 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
3973 }
3974
3975 2 => {
3976 let _ = unsafe {
3977 self.raw
3978 .get()
3979 .read_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
3980 };
3981 }
3982
3983 3 => {
3984 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Data<'de>>() };
3985 }
3986
3987 4 => {
3988 let _ =
3989 unsafe { self.raw.get().read_unchecked::<crate::wire::DictionaryRef>() };
3990 }
3991
3992 5 => {
3993 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Connector>() };
3994 }
3995
3996 6 => {
3997 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirConnector>() };
3998 }
3999
4000 7 => {
4001 let _ = unsafe {
4002 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4003 ::fidl_next_fuchsia_io::Directory,
4004 ::fidl_next::wire::fuchsia::Channel,
4005 >>()
4006 };
4007 }
4008
4009 8 => {
4010 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirEntry>() };
4011 }
4012
4013 9 => {
4014 let _ = unsafe {
4015 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4016 crate::ConnectorRouter,
4017 ::fidl_next::wire::fuchsia::Channel,
4018 >>()
4019 };
4020 }
4021
4022 10 => {
4023 let _ = unsafe {
4024 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4025 crate::DictionaryRouter,
4026 ::fidl_next::wire::fuchsia::Channel,
4027 >>()
4028 };
4029 }
4030
4031 11 => {
4032 let _ = unsafe {
4033 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4034 crate::DirEntryRouter,
4035 ::fidl_next::wire::fuchsia::Channel,
4036 >>()
4037 };
4038 }
4039
4040 12 => {
4041 let _ = unsafe {
4042 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4043 crate::DataRouter,
4044 ::fidl_next::wire::fuchsia::Channel,
4045 >>()
4046 };
4047 }
4048
4049 13 => {
4050 let _ = unsafe {
4051 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
4052 crate::DirConnectorRouter,
4053 ::fidl_next::wire::fuchsia::Channel,
4054 >>()
4055 };
4056 }
4057
4058 _ => (),
4059 }
4060 }
4061 }
4062
4063 impl ::fidl_next::Constrained for Capability<'_> {
4064 type Constraint = ();
4065
4066 fn validate(
4067 _: ::fidl_next::Slot<'_, Self>,
4068 _: Self::Constraint,
4069 ) -> Result<(), ::fidl_next::ValidationError> {
4070 Ok(())
4071 }
4072 }
4073
4074 unsafe impl ::fidl_next::Wire for Capability<'static> {
4075 type Narrowed<'de> = Capability<'de>;
4076
4077 #[inline]
4078 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4079 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4080 ::fidl_next::wire::Union::zero_padding(raw);
4081 }
4082 }
4083
4084 pub mod capability {
4085 pub enum Ref<'de> {
4086 Unit(&'de crate::wire::Unit),
4087
4088 Handle(&'de ::fidl_next::wire::fuchsia::NullableHandle),
4089
4090 Data(&'de crate::wire::Data<'de>),
4091
4092 Dictionary(&'de crate::wire::DictionaryRef),
4093
4094 Connector(&'de crate::wire::Connector),
4095
4096 DirConnector(&'de crate::wire::DirConnector),
4097
4098 Directory(
4099 &'de ::fidl_next::ClientEnd<
4100 ::fidl_next_fuchsia_io::Directory,
4101 ::fidl_next::wire::fuchsia::Channel,
4102 >,
4103 ),
4104
4105 DirEntry(&'de crate::wire::DirEntry),
4106
4107 ConnectorRouter(
4108 &'de ::fidl_next::ClientEnd<
4109 crate::ConnectorRouter,
4110 ::fidl_next::wire::fuchsia::Channel,
4111 >,
4112 ),
4113
4114 DictionaryRouter(
4115 &'de ::fidl_next::ClientEnd<
4116 crate::DictionaryRouter,
4117 ::fidl_next::wire::fuchsia::Channel,
4118 >,
4119 ),
4120
4121 DirEntryRouter(
4122 &'de ::fidl_next::ClientEnd<
4123 crate::DirEntryRouter,
4124 ::fidl_next::wire::fuchsia::Channel,
4125 >,
4126 ),
4127
4128 DataRouter(
4129 &'de ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
4130 ),
4131
4132 DirConnectorRouter(
4133 &'de ::fidl_next::ClientEnd<
4134 crate::DirConnectorRouter,
4135 ::fidl_next::wire::fuchsia::Channel,
4136 >,
4137 ),
4138
4139 UnknownOrdinal_(u64),
4140 }
4141 }
4142
4143 impl<'de> Capability<'de> {
4144 pub fn as_ref(&self) -> crate::wire::capability::Ref<'_> {
4145 match self.raw.ordinal() {
4146 1 => crate::wire::capability::Ref::Unit(unsafe {
4147 self.raw.get().deref_unchecked::<crate::wire::Unit>()
4148 }),
4149
4150 2 => crate::wire::capability::Ref::Handle(unsafe {
4151 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
4152 }),
4153
4154 3 => crate::wire::capability::Ref::Data(unsafe {
4155 self.raw.get().deref_unchecked::<crate::wire::Data<'_>>()
4156 }),
4157
4158 4 => crate::wire::capability::Ref::Dictionary(unsafe {
4159 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>()
4160 }),
4161
4162 5 => crate::wire::capability::Ref::Connector(unsafe {
4163 self.raw.get().deref_unchecked::<crate::wire::Connector>()
4164 }),
4165
4166 6 => crate::wire::capability::Ref::DirConnector(unsafe {
4167 self.raw.get().deref_unchecked::<crate::wire::DirConnector>()
4168 }),
4169
4170 7 => crate::wire::capability::Ref::Directory(unsafe {
4171 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4172 ::fidl_next_fuchsia_io::Directory,
4173 ::fidl_next::wire::fuchsia::Channel,
4174 >>()
4175 }),
4176
4177 8 => crate::wire::capability::Ref::DirEntry(unsafe {
4178 self.raw.get().deref_unchecked::<crate::wire::DirEntry>()
4179 }),
4180
4181 9 => crate::wire::capability::Ref::ConnectorRouter(unsafe {
4182 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4183 crate::ConnectorRouter,
4184 ::fidl_next::wire::fuchsia::Channel,
4185 >>()
4186 }),
4187
4188 10 => crate::wire::capability::Ref::DictionaryRouter(unsafe {
4189 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4190 crate::DictionaryRouter,
4191 ::fidl_next::wire::fuchsia::Channel,
4192 >>()
4193 }),
4194
4195 11 => crate::wire::capability::Ref::DirEntryRouter(unsafe {
4196 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4197 crate::DirEntryRouter,
4198 ::fidl_next::wire::fuchsia::Channel,
4199 >>()
4200 }),
4201
4202 12 => crate::wire::capability::Ref::DataRouter(unsafe {
4203 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4204 crate::DataRouter,
4205 ::fidl_next::wire::fuchsia::Channel,
4206 >>()
4207 }),
4208
4209 13 => crate::wire::capability::Ref::DirConnectorRouter(unsafe {
4210 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
4211 crate::DirConnectorRouter,
4212 ::fidl_next::wire::fuchsia::Channel,
4213 >>()
4214 }),
4215
4216 unknown => crate::wire::capability::Ref::UnknownOrdinal_(unknown),
4217 }
4218 }
4219 }
4220
4221 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Capability<'de>
4222 where
4223 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4224 ___D: ::fidl_next::Decoder<'de>,
4225 ___D: ::fidl_next::fuchsia::HandleDecoder,
4226 {
4227 fn decode(
4228 mut slot: ::fidl_next::Slot<'_, Self>,
4229 decoder: &mut ___D,
4230 _: (),
4231 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4232 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4233 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4234 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
4235 raw,
4236 decoder,
4237 (),
4238 )?,
4239
4240 2 => ::fidl_next::wire::Union::decode_as::<
4241 ___D,
4242 ::fidl_next::wire::fuchsia::NullableHandle,
4243 >(raw, decoder, ())?,
4244
4245 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
4246 raw,
4247 decoder,
4248 (),
4249 )?,
4250
4251 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DictionaryRef>(
4252 raw,
4253 decoder,
4254 (),
4255 )?,
4256
4257 5 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Connector>(
4258 raw,
4259 decoder,
4260 (),
4261 )?,
4262
4263 6 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirConnector>(
4264 raw,
4265 decoder,
4266 (),
4267 )?,
4268
4269 7 => ::fidl_next::wire::Union::decode_as::<
4270 ___D,
4271 ::fidl_next::ClientEnd<
4272 ::fidl_next_fuchsia_io::Directory,
4273 ::fidl_next::wire::fuchsia::Channel,
4274 >,
4275 >(raw, decoder, ())?,
4276
4277 8 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirEntry>(
4278 raw,
4279 decoder,
4280 (),
4281 )?,
4282
4283 9 => ::fidl_next::wire::Union::decode_as::<
4284 ___D,
4285 ::fidl_next::ClientEnd<
4286 crate::ConnectorRouter,
4287 ::fidl_next::wire::fuchsia::Channel,
4288 >,
4289 >(raw, decoder, ())?,
4290
4291 10 => ::fidl_next::wire::Union::decode_as::<
4292 ___D,
4293 ::fidl_next::ClientEnd<
4294 crate::DictionaryRouter,
4295 ::fidl_next::wire::fuchsia::Channel,
4296 >,
4297 >(raw, decoder, ())?,
4298
4299 11 => ::fidl_next::wire::Union::decode_as::<
4300 ___D,
4301 ::fidl_next::ClientEnd<
4302 crate::DirEntryRouter,
4303 ::fidl_next::wire::fuchsia::Channel,
4304 >,
4305 >(raw, decoder, ())?,
4306
4307 12 => ::fidl_next::wire::Union::decode_as::<
4308 ___D,
4309 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
4310 >(raw, decoder, ())?,
4311
4312 13 => ::fidl_next::wire::Union::decode_as::<
4313 ___D,
4314 ::fidl_next::ClientEnd<
4315 crate::DirConnectorRouter,
4316 ::fidl_next::wire::fuchsia::Channel,
4317 >,
4318 >(raw, decoder, ())?,
4319
4320 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4321 }
4322
4323 Ok(())
4324 }
4325 }
4326
4327 impl<'de> ::core::fmt::Debug for Capability<'de> {
4328 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4329 match self.raw.ordinal() {
4330 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
4331 2 => unsafe {
4332 self.raw
4333 .get()
4334 .deref_unchecked::<::fidl_next::wire::fuchsia::NullableHandle>()
4335 .fmt(f)
4336 },
4337 3 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Data<'_>>().fmt(f) },
4338 4 => unsafe {
4339 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>().fmt(f)
4340 },
4341 5 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Connector>().fmt(f) },
4342 6 => unsafe {
4343 self.raw.get().deref_unchecked::<crate::wire::DirConnector>().fmt(f)
4344 },
4345 7 => unsafe {
4346 self.raw
4347 .get()
4348 .deref_unchecked::<::fidl_next::ClientEnd<
4349 ::fidl_next_fuchsia_io::Directory,
4350 ::fidl_next::wire::fuchsia::Channel,
4351 >>()
4352 .fmt(f)
4353 },
4354 8 => unsafe { self.raw.get().deref_unchecked::<crate::wire::DirEntry>().fmt(f) },
4355 9 => unsafe {
4356 self.raw
4357 .get()
4358 .deref_unchecked::<::fidl_next::ClientEnd<
4359 crate::ConnectorRouter,
4360 ::fidl_next::wire::fuchsia::Channel,
4361 >>()
4362 .fmt(f)
4363 },
4364 10 => unsafe {
4365 self.raw
4366 .get()
4367 .deref_unchecked::<::fidl_next::ClientEnd<
4368 crate::DictionaryRouter,
4369 ::fidl_next::wire::fuchsia::Channel,
4370 >>()
4371 .fmt(f)
4372 },
4373 11 => unsafe {
4374 self.raw
4375 .get()
4376 .deref_unchecked::<::fidl_next::ClientEnd<
4377 crate::DirEntryRouter,
4378 ::fidl_next::wire::fuchsia::Channel,
4379 >>()
4380 .fmt(f)
4381 },
4382 12 => unsafe {
4383 self.raw
4384 .get()
4385 .deref_unchecked::<::fidl_next::ClientEnd<
4386 crate::DataRouter,
4387 ::fidl_next::wire::fuchsia::Channel,
4388 >>()
4389 .fmt(f)
4390 },
4391 13 => unsafe {
4392 self.raw
4393 .get()
4394 .deref_unchecked::<::fidl_next::ClientEnd<
4395 crate::DirConnectorRouter,
4396 ::fidl_next::wire::fuchsia::Channel,
4397 >>()
4398 .fmt(f)
4399 },
4400 _ => unsafe { ::core::hint::unreachable_unchecked() },
4401 }
4402 }
4403 }
4404
4405 impl<'de> ::fidl_next::IntoNatural for Capability<'de> {
4406 type Natural = crate::natural::Capability;
4407 }
4408
4409 #[derive(Debug)]
4411 #[repr(C)]
4412 pub struct CapabilityStoreConnectorCreateRequest {
4413 pub id: ::fidl_next::wire::Uint64,
4414
4415 pub receiver: ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
4416 }
4417
4418 static_assertions::const_assert_eq!(
4419 std::mem::size_of::<CapabilityStoreConnectorCreateRequest>(),
4420 16
4421 );
4422 static_assertions::const_assert_eq!(
4423 std::mem::align_of::<CapabilityStoreConnectorCreateRequest>(),
4424 8
4425 );
4426
4427 static_assertions::const_assert_eq!(
4428 std::mem::offset_of!(CapabilityStoreConnectorCreateRequest, id),
4429 0
4430 );
4431
4432 static_assertions::const_assert_eq!(
4433 std::mem::offset_of!(CapabilityStoreConnectorCreateRequest, receiver),
4434 8
4435 );
4436
4437 impl ::fidl_next::Constrained for CapabilityStoreConnectorCreateRequest {
4438 type Constraint = ();
4439
4440 fn validate(
4441 _: ::fidl_next::Slot<'_, Self>,
4442 _: Self::Constraint,
4443 ) -> Result<(), ::fidl_next::ValidationError> {
4444 Ok(())
4445 }
4446 }
4447
4448 unsafe impl ::fidl_next::Wire for CapabilityStoreConnectorCreateRequest {
4449 type Narrowed<'de> = CapabilityStoreConnectorCreateRequest;
4450
4451 #[inline]
4452 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4453 ::fidl_next::munge! {
4454 let Self {
4455 id,
4456 receiver,
4457
4458 } = &mut *out_;
4459 }
4460
4461 ::fidl_next::Wire::zero_padding(id);
4462
4463 ::fidl_next::Wire::zero_padding(receiver);
4464
4465 unsafe {
4466 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4467 }
4468 }
4469 }
4470
4471 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreConnectorCreateRequest
4472 where
4473 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4474 ___D: ::fidl_next::fuchsia::HandleDecoder,
4475 {
4476 fn decode(
4477 slot_: ::fidl_next::Slot<'_, Self>,
4478 decoder_: &mut ___D,
4479 _: (),
4480 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4481 if slot_.as_bytes()[12..16] != [0u8; 4] {
4482 return Err(::fidl_next::DecodeError::InvalidPadding);
4483 }
4484
4485 ::fidl_next::munge! {
4486 let Self {
4487 mut id,
4488 mut receiver,
4489
4490 } = slot_;
4491 }
4492
4493 let _field = id.as_mut();
4494
4495 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4496
4497 let _field = receiver.as_mut();
4498
4499 ::fidl_next::Decode::decode(receiver.as_mut(), decoder_, ())?;
4500
4501 Ok(())
4502 }
4503 }
4504
4505 impl ::fidl_next::IntoNatural for CapabilityStoreConnectorCreateRequest {
4506 type Natural = crate::natural::CapabilityStoreConnectorCreateRequest;
4507 }
4508
4509 #[derive(Debug)]
4511 #[repr(C)]
4512 pub struct CapabilityStoreConnectorOpenRequest {
4513 pub id: ::fidl_next::wire::Uint64,
4514
4515 pub server_end: ::fidl_next::wire::fuchsia::Channel,
4516 }
4517
4518 static_assertions::const_assert_eq!(
4519 std::mem::size_of::<CapabilityStoreConnectorOpenRequest>(),
4520 16
4521 );
4522 static_assertions::const_assert_eq!(
4523 std::mem::align_of::<CapabilityStoreConnectorOpenRequest>(),
4524 8
4525 );
4526
4527 static_assertions::const_assert_eq!(
4528 std::mem::offset_of!(CapabilityStoreConnectorOpenRequest, id),
4529 0
4530 );
4531
4532 static_assertions::const_assert_eq!(
4533 std::mem::offset_of!(CapabilityStoreConnectorOpenRequest, server_end),
4534 8
4535 );
4536
4537 impl ::fidl_next::Constrained for CapabilityStoreConnectorOpenRequest {
4538 type Constraint = ();
4539
4540 fn validate(
4541 _: ::fidl_next::Slot<'_, Self>,
4542 _: Self::Constraint,
4543 ) -> Result<(), ::fidl_next::ValidationError> {
4544 Ok(())
4545 }
4546 }
4547
4548 unsafe impl ::fidl_next::Wire for CapabilityStoreConnectorOpenRequest {
4549 type Narrowed<'de> = CapabilityStoreConnectorOpenRequest;
4550
4551 #[inline]
4552 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4553 ::fidl_next::munge! {
4554 let Self {
4555 id,
4556 server_end,
4557
4558 } = &mut *out_;
4559 }
4560
4561 ::fidl_next::Wire::zero_padding(id);
4562
4563 ::fidl_next::Wire::zero_padding(server_end);
4564
4565 unsafe {
4566 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4567 }
4568 }
4569 }
4570
4571 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreConnectorOpenRequest
4572 where
4573 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4574 ___D: ::fidl_next::fuchsia::HandleDecoder,
4575 {
4576 fn decode(
4577 slot_: ::fidl_next::Slot<'_, Self>,
4578 decoder_: &mut ___D,
4579 _: (),
4580 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4581 if slot_.as_bytes()[12..16] != [0u8; 4] {
4582 return Err(::fidl_next::DecodeError::InvalidPadding);
4583 }
4584
4585 ::fidl_next::munge! {
4586 let Self {
4587 mut id,
4588 mut server_end,
4589
4590 } = slot_;
4591 }
4592
4593 let _field = id.as_mut();
4594
4595 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4596
4597 let _field = server_end.as_mut();
4598
4599 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
4600
4601 Ok(())
4602 }
4603 }
4604
4605 impl ::fidl_next::IntoNatural for CapabilityStoreConnectorOpenRequest {
4606 type Natural = crate::natural::CapabilityStoreConnectorOpenRequest;
4607 }
4608
4609 #[derive(Debug)]
4611 #[repr(C)]
4612 pub struct CapabilityStoreDirConnectorCreateRequest {
4613 pub id: ::fidl_next::wire::Uint64,
4614
4615 pub receiver:
4616 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
4617 }
4618
4619 static_assertions::const_assert_eq!(
4620 std::mem::size_of::<CapabilityStoreDirConnectorCreateRequest>(),
4621 16
4622 );
4623 static_assertions::const_assert_eq!(
4624 std::mem::align_of::<CapabilityStoreDirConnectorCreateRequest>(),
4625 8
4626 );
4627
4628 static_assertions::const_assert_eq!(
4629 std::mem::offset_of!(CapabilityStoreDirConnectorCreateRequest, id),
4630 0
4631 );
4632
4633 static_assertions::const_assert_eq!(
4634 std::mem::offset_of!(CapabilityStoreDirConnectorCreateRequest, receiver),
4635 8
4636 );
4637
4638 impl ::fidl_next::Constrained for CapabilityStoreDirConnectorCreateRequest {
4639 type Constraint = ();
4640
4641 fn validate(
4642 _: ::fidl_next::Slot<'_, Self>,
4643 _: Self::Constraint,
4644 ) -> Result<(), ::fidl_next::ValidationError> {
4645 Ok(())
4646 }
4647 }
4648
4649 unsafe impl ::fidl_next::Wire for CapabilityStoreDirConnectorCreateRequest {
4650 type Narrowed<'de> = CapabilityStoreDirConnectorCreateRequest;
4651
4652 #[inline]
4653 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4654 ::fidl_next::munge! {
4655 let Self {
4656 id,
4657 receiver,
4658
4659 } = &mut *out_;
4660 }
4661
4662 ::fidl_next::Wire::zero_padding(id);
4663
4664 ::fidl_next::Wire::zero_padding(receiver);
4665
4666 unsafe {
4667 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4668 }
4669 }
4670 }
4671
4672 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDirConnectorCreateRequest
4673 where
4674 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4675 ___D: ::fidl_next::fuchsia::HandleDecoder,
4676 {
4677 fn decode(
4678 slot_: ::fidl_next::Slot<'_, Self>,
4679 decoder_: &mut ___D,
4680 _: (),
4681 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4682 if slot_.as_bytes()[12..16] != [0u8; 4] {
4683 return Err(::fidl_next::DecodeError::InvalidPadding);
4684 }
4685
4686 ::fidl_next::munge! {
4687 let Self {
4688 mut id,
4689 mut receiver,
4690
4691 } = slot_;
4692 }
4693
4694 let _field = id.as_mut();
4695
4696 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4697
4698 let _field = receiver.as_mut();
4699
4700 ::fidl_next::Decode::decode(receiver.as_mut(), decoder_, ())?;
4701
4702 Ok(())
4703 }
4704 }
4705
4706 impl ::fidl_next::IntoNatural for CapabilityStoreDirConnectorCreateRequest {
4707 type Natural = crate::natural::CapabilityStoreDirConnectorCreateRequest;
4708 }
4709
4710 #[derive(Debug)]
4712 #[repr(C)]
4713 pub struct CapabilityStoreDictionaryLegacyImportRequest {
4714 pub id: ::fidl_next::wire::Uint64,
4715
4716 pub client_end: ::fidl_next::wire::fuchsia::Channel,
4717 }
4718
4719 static_assertions::const_assert_eq!(
4720 std::mem::size_of::<CapabilityStoreDictionaryLegacyImportRequest>(),
4721 16
4722 );
4723 static_assertions::const_assert_eq!(
4724 std::mem::align_of::<CapabilityStoreDictionaryLegacyImportRequest>(),
4725 8
4726 );
4727
4728 static_assertions::const_assert_eq!(
4729 std::mem::offset_of!(CapabilityStoreDictionaryLegacyImportRequest, id),
4730 0
4731 );
4732
4733 static_assertions::const_assert_eq!(
4734 std::mem::offset_of!(CapabilityStoreDictionaryLegacyImportRequest, client_end),
4735 8
4736 );
4737
4738 impl ::fidl_next::Constrained for CapabilityStoreDictionaryLegacyImportRequest {
4739 type Constraint = ();
4740
4741 fn validate(
4742 _: ::fidl_next::Slot<'_, Self>,
4743 _: Self::Constraint,
4744 ) -> Result<(), ::fidl_next::ValidationError> {
4745 Ok(())
4746 }
4747 }
4748
4749 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryLegacyImportRequest {
4750 type Narrowed<'de> = CapabilityStoreDictionaryLegacyImportRequest;
4751
4752 #[inline]
4753 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4754 ::fidl_next::munge! {
4755 let Self {
4756 id,
4757 client_end,
4758
4759 } = &mut *out_;
4760 }
4761
4762 ::fidl_next::Wire::zero_padding(id);
4763
4764 ::fidl_next::Wire::zero_padding(client_end);
4765
4766 unsafe {
4767 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4768 }
4769 }
4770 }
4771
4772 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryLegacyImportRequest
4773 where
4774 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4775 ___D: ::fidl_next::fuchsia::HandleDecoder,
4776 {
4777 fn decode(
4778 slot_: ::fidl_next::Slot<'_, Self>,
4779 decoder_: &mut ___D,
4780 _: (),
4781 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4782 if slot_.as_bytes()[12..16] != [0u8; 4] {
4783 return Err(::fidl_next::DecodeError::InvalidPadding);
4784 }
4785
4786 ::fidl_next::munge! {
4787 let Self {
4788 mut id,
4789 mut client_end,
4790
4791 } = slot_;
4792 }
4793
4794 let _field = id.as_mut();
4795
4796 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4797
4798 let _field = client_end.as_mut();
4799
4800 ::fidl_next::Decode::decode(client_end.as_mut(), decoder_, ())?;
4801
4802 Ok(())
4803 }
4804 }
4805
4806 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryLegacyImportRequest {
4807 type Natural = crate::natural::CapabilityStoreDictionaryLegacyImportRequest;
4808 }
4809
4810 #[derive(Debug)]
4812 #[repr(C)]
4813 pub struct CapabilityStoreDictionaryLegacyExportRequest {
4814 pub id: ::fidl_next::wire::Uint64,
4815
4816 pub server_end: ::fidl_next::wire::fuchsia::Channel,
4817 }
4818
4819 static_assertions::const_assert_eq!(
4820 std::mem::size_of::<CapabilityStoreDictionaryLegacyExportRequest>(),
4821 16
4822 );
4823 static_assertions::const_assert_eq!(
4824 std::mem::align_of::<CapabilityStoreDictionaryLegacyExportRequest>(),
4825 8
4826 );
4827
4828 static_assertions::const_assert_eq!(
4829 std::mem::offset_of!(CapabilityStoreDictionaryLegacyExportRequest, id),
4830 0
4831 );
4832
4833 static_assertions::const_assert_eq!(
4834 std::mem::offset_of!(CapabilityStoreDictionaryLegacyExportRequest, server_end),
4835 8
4836 );
4837
4838 impl ::fidl_next::Constrained for CapabilityStoreDictionaryLegacyExportRequest {
4839 type Constraint = ();
4840
4841 fn validate(
4842 _: ::fidl_next::Slot<'_, Self>,
4843 _: Self::Constraint,
4844 ) -> Result<(), ::fidl_next::ValidationError> {
4845 Ok(())
4846 }
4847 }
4848
4849 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryLegacyExportRequest {
4850 type Narrowed<'de> = CapabilityStoreDictionaryLegacyExportRequest;
4851
4852 #[inline]
4853 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4854 ::fidl_next::munge! {
4855 let Self {
4856 id,
4857 server_end,
4858
4859 } = &mut *out_;
4860 }
4861
4862 ::fidl_next::Wire::zero_padding(id);
4863
4864 ::fidl_next::Wire::zero_padding(server_end);
4865
4866 unsafe {
4867 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4868 }
4869 }
4870 }
4871
4872 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryLegacyExportRequest
4873 where
4874 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4875 ___D: ::fidl_next::fuchsia::HandleDecoder,
4876 {
4877 fn decode(
4878 slot_: ::fidl_next::Slot<'_, Self>,
4879 decoder_: &mut ___D,
4880 _: (),
4881 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4882 if slot_.as_bytes()[12..16] != [0u8; 4] {
4883 return Err(::fidl_next::DecodeError::InvalidPadding);
4884 }
4885
4886 ::fidl_next::munge! {
4887 let Self {
4888 mut id,
4889 mut server_end,
4890
4891 } = slot_;
4892 }
4893
4894 let _field = id.as_mut();
4895
4896 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4897
4898 let _field = server_end.as_mut();
4899
4900 ::fidl_next::Decode::decode(server_end.as_mut(), decoder_, ())?;
4901
4902 Ok(())
4903 }
4904 }
4905
4906 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryLegacyExportRequest {
4907 type Natural = crate::natural::CapabilityStoreDictionaryLegacyExportRequest;
4908 }
4909
4910 #[derive(Debug)]
4912 #[repr(C)]
4913 pub struct CapabilityStoreDictionaryKeysRequest {
4914 pub id: ::fidl_next::wire::Uint64,
4915
4916 pub iterator: ::fidl_next::ServerEnd<
4917 crate::DictionaryKeysIterator,
4918 ::fidl_next::wire::fuchsia::Channel,
4919 >,
4920 }
4921
4922 static_assertions::const_assert_eq!(
4923 std::mem::size_of::<CapabilityStoreDictionaryKeysRequest>(),
4924 16
4925 );
4926 static_assertions::const_assert_eq!(
4927 std::mem::align_of::<CapabilityStoreDictionaryKeysRequest>(),
4928 8
4929 );
4930
4931 static_assertions::const_assert_eq!(
4932 std::mem::offset_of!(CapabilityStoreDictionaryKeysRequest, id),
4933 0
4934 );
4935
4936 static_assertions::const_assert_eq!(
4937 std::mem::offset_of!(CapabilityStoreDictionaryKeysRequest, iterator),
4938 8
4939 );
4940
4941 impl ::fidl_next::Constrained for CapabilityStoreDictionaryKeysRequest {
4942 type Constraint = ();
4943
4944 fn validate(
4945 _: ::fidl_next::Slot<'_, Self>,
4946 _: Self::Constraint,
4947 ) -> Result<(), ::fidl_next::ValidationError> {
4948 Ok(())
4949 }
4950 }
4951
4952 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryKeysRequest {
4953 type Narrowed<'de> = CapabilityStoreDictionaryKeysRequest;
4954
4955 #[inline]
4956 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4957 ::fidl_next::munge! {
4958 let Self {
4959 id,
4960 iterator,
4961
4962 } = &mut *out_;
4963 }
4964
4965 ::fidl_next::Wire::zero_padding(id);
4966
4967 ::fidl_next::Wire::zero_padding(iterator);
4968
4969 unsafe {
4970 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4971 }
4972 }
4973 }
4974
4975 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryKeysRequest
4976 where
4977 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4978 ___D: ::fidl_next::fuchsia::HandleDecoder,
4979 {
4980 fn decode(
4981 slot_: ::fidl_next::Slot<'_, Self>,
4982 decoder_: &mut ___D,
4983 _: (),
4984 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4985 if slot_.as_bytes()[12..16] != [0u8; 4] {
4986 return Err(::fidl_next::DecodeError::InvalidPadding);
4987 }
4988
4989 ::fidl_next::munge! {
4990 let Self {
4991 mut id,
4992 mut iterator,
4993
4994 } = slot_;
4995 }
4996
4997 let _field = id.as_mut();
4998
4999 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5000
5001 let _field = iterator.as_mut();
5002
5003 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5004
5005 Ok(())
5006 }
5007 }
5008
5009 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryKeysRequest {
5010 type Natural = crate::natural::CapabilityStoreDictionaryKeysRequest;
5011 }
5012
5013 #[derive(Debug)]
5015 #[repr(C)]
5016 pub struct CapabilityStoreDictionaryEnumerateRequest {
5017 pub id: ::fidl_next::wire::Uint64,
5018
5019 pub iterator: ::fidl_next::ServerEnd<
5020 crate::DictionaryEnumerateIterator,
5021 ::fidl_next::wire::fuchsia::Channel,
5022 >,
5023 }
5024
5025 static_assertions::const_assert_eq!(
5026 std::mem::size_of::<CapabilityStoreDictionaryEnumerateRequest>(),
5027 16
5028 );
5029 static_assertions::const_assert_eq!(
5030 std::mem::align_of::<CapabilityStoreDictionaryEnumerateRequest>(),
5031 8
5032 );
5033
5034 static_assertions::const_assert_eq!(
5035 std::mem::offset_of!(CapabilityStoreDictionaryEnumerateRequest, id),
5036 0
5037 );
5038
5039 static_assertions::const_assert_eq!(
5040 std::mem::offset_of!(CapabilityStoreDictionaryEnumerateRequest, iterator),
5041 8
5042 );
5043
5044 impl ::fidl_next::Constrained for CapabilityStoreDictionaryEnumerateRequest {
5045 type Constraint = ();
5046
5047 fn validate(
5048 _: ::fidl_next::Slot<'_, Self>,
5049 _: Self::Constraint,
5050 ) -> Result<(), ::fidl_next::ValidationError> {
5051 Ok(())
5052 }
5053 }
5054
5055 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryEnumerateRequest {
5056 type Narrowed<'de> = CapabilityStoreDictionaryEnumerateRequest;
5057
5058 #[inline]
5059 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5060 ::fidl_next::munge! {
5061 let Self {
5062 id,
5063 iterator,
5064
5065 } = &mut *out_;
5066 }
5067
5068 ::fidl_next::Wire::zero_padding(id);
5069
5070 ::fidl_next::Wire::zero_padding(iterator);
5071
5072 unsafe {
5073 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5074 }
5075 }
5076 }
5077
5078 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryEnumerateRequest
5079 where
5080 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5081 ___D: ::fidl_next::fuchsia::HandleDecoder,
5082 {
5083 fn decode(
5084 slot_: ::fidl_next::Slot<'_, Self>,
5085 decoder_: &mut ___D,
5086 _: (),
5087 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5088 if slot_.as_bytes()[12..16] != [0u8; 4] {
5089 return Err(::fidl_next::DecodeError::InvalidPadding);
5090 }
5091
5092 ::fidl_next::munge! {
5093 let Self {
5094 mut id,
5095 mut iterator,
5096
5097 } = slot_;
5098 }
5099
5100 let _field = id.as_mut();
5101
5102 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5103
5104 let _field = iterator.as_mut();
5105
5106 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5107
5108 Ok(())
5109 }
5110 }
5111
5112 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryEnumerateRequest {
5113 type Natural = crate::natural::CapabilityStoreDictionaryEnumerateRequest;
5114 }
5115
5116 #[derive(Debug)]
5118 #[repr(C)]
5119 pub struct CapabilityStoreDictionaryDrainRequest {
5120 pub id: ::fidl_next::wire::Uint64,
5121
5122 pub iterator: ::fidl_next::ServerEnd<
5123 crate::DictionaryDrainIterator,
5124 ::fidl_next::wire::fuchsia::OptionalChannel,
5125 >,
5126 }
5127
5128 static_assertions::const_assert_eq!(
5129 std::mem::size_of::<CapabilityStoreDictionaryDrainRequest>(),
5130 16
5131 );
5132 static_assertions::const_assert_eq!(
5133 std::mem::align_of::<CapabilityStoreDictionaryDrainRequest>(),
5134 8
5135 );
5136
5137 static_assertions::const_assert_eq!(
5138 std::mem::offset_of!(CapabilityStoreDictionaryDrainRequest, id),
5139 0
5140 );
5141
5142 static_assertions::const_assert_eq!(
5143 std::mem::offset_of!(CapabilityStoreDictionaryDrainRequest, iterator),
5144 8
5145 );
5146
5147 impl ::fidl_next::Constrained for CapabilityStoreDictionaryDrainRequest {
5148 type Constraint = ();
5149
5150 fn validate(
5151 _: ::fidl_next::Slot<'_, Self>,
5152 _: Self::Constraint,
5153 ) -> Result<(), ::fidl_next::ValidationError> {
5154 Ok(())
5155 }
5156 }
5157
5158 unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryDrainRequest {
5159 type Narrowed<'de> = CapabilityStoreDictionaryDrainRequest;
5160
5161 #[inline]
5162 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5163 ::fidl_next::munge! {
5164 let Self {
5165 id,
5166 iterator,
5167
5168 } = &mut *out_;
5169 }
5170
5171 ::fidl_next::Wire::zero_padding(id);
5172
5173 ::fidl_next::Wire::zero_padding(iterator);
5174
5175 unsafe {
5176 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5177 }
5178 }
5179 }
5180
5181 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryDrainRequest
5182 where
5183 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5184 ___D: ::fidl_next::fuchsia::HandleDecoder,
5185 {
5186 fn decode(
5187 slot_: ::fidl_next::Slot<'_, Self>,
5188 decoder_: &mut ___D,
5189 _: (),
5190 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5191 if slot_.as_bytes()[12..16] != [0u8; 4] {
5192 return Err(::fidl_next::DecodeError::InvalidPadding);
5193 }
5194
5195 ::fidl_next::munge! {
5196 let Self {
5197 mut id,
5198 mut iterator,
5199
5200 } = slot_;
5201 }
5202
5203 let _field = id.as_mut();
5204
5205 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5206
5207 let _field = iterator.as_mut();
5208
5209 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
5210
5211 Ok(())
5212 }
5213 }
5214
5215 impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryDrainRequest {
5216 type Natural = crate::natural::CapabilityStoreDictionaryDrainRequest;
5217 }
5218
5219 #[derive(Debug)]
5221 #[repr(C)]
5222 pub struct CapabilityStoreCreateServiceAggregateRequest<'de> {
5223 pub sources: ::fidl_next::wire::Vector<'de, crate::wire::AggregateSource<'de>>,
5224 }
5225
5226 static_assertions::const_assert_eq!(
5227 std::mem::size_of::<CapabilityStoreCreateServiceAggregateRequest<'_>>(),
5228 16
5229 );
5230 static_assertions::const_assert_eq!(
5231 std::mem::align_of::<CapabilityStoreCreateServiceAggregateRequest<'_>>(),
5232 8
5233 );
5234
5235 static_assertions::const_assert_eq!(
5236 std::mem::offset_of!(CapabilityStoreCreateServiceAggregateRequest<'_>, sources),
5237 0
5238 );
5239
5240 impl ::fidl_next::Constrained for CapabilityStoreCreateServiceAggregateRequest<'_> {
5241 type Constraint = ();
5242
5243 fn validate(
5244 _: ::fidl_next::Slot<'_, Self>,
5245 _: Self::Constraint,
5246 ) -> Result<(), ::fidl_next::ValidationError> {
5247 Ok(())
5248 }
5249 }
5250
5251 unsafe impl ::fidl_next::Wire for CapabilityStoreCreateServiceAggregateRequest<'static> {
5252 type Narrowed<'de> = CapabilityStoreCreateServiceAggregateRequest<'de>;
5253
5254 #[inline]
5255 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5256 ::fidl_next::munge! {
5257 let Self {
5258 sources,
5259
5260 } = &mut *out_;
5261 }
5262
5263 ::fidl_next::Wire::zero_padding(sources);
5264 }
5265 }
5266
5267 unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
5268 for CapabilityStoreCreateServiceAggregateRequest<'de>
5269 where
5270 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5271 ___D: ::fidl_next::Decoder<'de>,
5272 ___D: ::fidl_next::fuchsia::HandleDecoder,
5273 {
5274 fn decode(
5275 slot_: ::fidl_next::Slot<'_, Self>,
5276 decoder_: &mut ___D,
5277 _: (),
5278 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5279 ::fidl_next::munge! {
5280 let Self {
5281 mut sources,
5282
5283 } = slot_;
5284 }
5285
5286 let _field = sources.as_mut();
5287 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
5288 ::fidl_next::Decode::decode(sources.as_mut(), decoder_, (4294967295, ()))?;
5289
5290 Ok(())
5291 }
5292 }
5293
5294 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreCreateServiceAggregateRequest<'de> {
5295 type Natural = crate::natural::CapabilityStoreCreateServiceAggregateRequest;
5296 }
5297
5298 #[derive(Debug)]
5300 #[repr(C)]
5301 pub struct CapabilityStoreCreateServiceAggregateResponse {
5302 pub aggregate_dir_connector: crate::wire::DirConnector,
5303 }
5304
5305 static_assertions::const_assert_eq!(
5306 std::mem::size_of::<CapabilityStoreCreateServiceAggregateResponse>(),
5307 4
5308 );
5309 static_assertions::const_assert_eq!(
5310 std::mem::align_of::<CapabilityStoreCreateServiceAggregateResponse>(),
5311 4
5312 );
5313
5314 static_assertions::const_assert_eq!(
5315 std::mem::offset_of!(
5316 CapabilityStoreCreateServiceAggregateResponse,
5317 aggregate_dir_connector
5318 ),
5319 0
5320 );
5321
5322 impl ::fidl_next::Constrained for CapabilityStoreCreateServiceAggregateResponse {
5323 type Constraint = ();
5324
5325 fn validate(
5326 _: ::fidl_next::Slot<'_, Self>,
5327 _: Self::Constraint,
5328 ) -> Result<(), ::fidl_next::ValidationError> {
5329 Ok(())
5330 }
5331 }
5332
5333 unsafe impl ::fidl_next::Wire for CapabilityStoreCreateServiceAggregateResponse {
5334 type Narrowed<'de> = CapabilityStoreCreateServiceAggregateResponse;
5335
5336 #[inline]
5337 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5338 ::fidl_next::munge! {
5339 let Self {
5340 aggregate_dir_connector,
5341
5342 } = &mut *out_;
5343 }
5344
5345 ::fidl_next::Wire::zero_padding(aggregate_dir_connector);
5346 }
5347 }
5348
5349 unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreCreateServiceAggregateResponse
5350 where
5351 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5352 ___D: ::fidl_next::fuchsia::HandleDecoder,
5353 {
5354 fn decode(
5355 slot_: ::fidl_next::Slot<'_, Self>,
5356 decoder_: &mut ___D,
5357 _: (),
5358 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5359 ::fidl_next::munge! {
5360 let Self {
5361 mut aggregate_dir_connector,
5362
5363 } = slot_;
5364 }
5365
5366 let _field = aggregate_dir_connector.as_mut();
5367
5368 ::fidl_next::Decode::decode(aggregate_dir_connector.as_mut(), decoder_, ())?;
5369
5370 Ok(())
5371 }
5372 }
5373
5374 impl ::fidl_next::IntoNatural for CapabilityStoreCreateServiceAggregateResponse {
5375 type Natural = crate::natural::CapabilityStoreCreateServiceAggregateResponse;
5376 }
5377
5378 #[derive(Debug)]
5380 #[repr(C)]
5381 pub struct CapabilityStoreExportResponse<'de> {
5382 pub capability: crate::wire::Capability<'de>,
5383 }
5384
5385 static_assertions::const_assert_eq!(
5386 std::mem::size_of::<CapabilityStoreExportResponse<'_>>(),
5387 16
5388 );
5389 static_assertions::const_assert_eq!(
5390 std::mem::align_of::<CapabilityStoreExportResponse<'_>>(),
5391 8
5392 );
5393
5394 static_assertions::const_assert_eq!(
5395 std::mem::offset_of!(CapabilityStoreExportResponse<'_>, capability),
5396 0
5397 );
5398
5399 impl ::fidl_next::Constrained for CapabilityStoreExportResponse<'_> {
5400 type Constraint = ();
5401
5402 fn validate(
5403 _: ::fidl_next::Slot<'_, Self>,
5404 _: Self::Constraint,
5405 ) -> Result<(), ::fidl_next::ValidationError> {
5406 Ok(())
5407 }
5408 }
5409
5410 unsafe impl ::fidl_next::Wire for CapabilityStoreExportResponse<'static> {
5411 type Narrowed<'de> = CapabilityStoreExportResponse<'de>;
5412
5413 #[inline]
5414 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5415 ::fidl_next::munge! {
5416 let Self {
5417 capability,
5418
5419 } = &mut *out_;
5420 }
5421
5422 ::fidl_next::Wire::zero_padding(capability);
5423 }
5424 }
5425
5426 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreExportResponse<'de>
5427 where
5428 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5429 ___D: ::fidl_next::Decoder<'de>,
5430 ___D: ::fidl_next::fuchsia::HandleDecoder,
5431 {
5432 fn decode(
5433 slot_: ::fidl_next::Slot<'_, Self>,
5434 decoder_: &mut ___D,
5435 _: (),
5436 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5437 ::fidl_next::munge! {
5438 let Self {
5439 mut capability,
5440
5441 } = slot_;
5442 }
5443
5444 let _field = capability.as_mut();
5445
5446 ::fidl_next::Decode::decode(capability.as_mut(), decoder_, ())?;
5447
5448 Ok(())
5449 }
5450 }
5451
5452 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreExportResponse<'de> {
5453 type Natural = crate::natural::CapabilityStoreExportResponse;
5454 }
5455
5456 #[derive(Debug)]
5458 #[repr(C)]
5459 pub struct CapabilityStoreImportRequest<'de> {
5460 pub id: ::fidl_next::wire::Uint64,
5461
5462 pub capability: crate::wire::Capability<'de>,
5463 }
5464
5465 static_assertions::const_assert_eq!(
5466 std::mem::size_of::<CapabilityStoreImportRequest<'_>>(),
5467 24
5468 );
5469 static_assertions::const_assert_eq!(
5470 std::mem::align_of::<CapabilityStoreImportRequest<'_>>(),
5471 8
5472 );
5473
5474 static_assertions::const_assert_eq!(
5475 std::mem::offset_of!(CapabilityStoreImportRequest<'_>, id),
5476 0
5477 );
5478
5479 static_assertions::const_assert_eq!(
5480 std::mem::offset_of!(CapabilityStoreImportRequest<'_>, capability),
5481 8
5482 );
5483
5484 impl ::fidl_next::Constrained for CapabilityStoreImportRequest<'_> {
5485 type Constraint = ();
5486
5487 fn validate(
5488 _: ::fidl_next::Slot<'_, Self>,
5489 _: Self::Constraint,
5490 ) -> Result<(), ::fidl_next::ValidationError> {
5491 Ok(())
5492 }
5493 }
5494
5495 unsafe impl ::fidl_next::Wire for CapabilityStoreImportRequest<'static> {
5496 type Narrowed<'de> = CapabilityStoreImportRequest<'de>;
5497
5498 #[inline]
5499 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5500 ::fidl_next::munge! {
5501 let Self {
5502 id,
5503 capability,
5504
5505 } = &mut *out_;
5506 }
5507
5508 ::fidl_next::Wire::zero_padding(id);
5509
5510 ::fidl_next::Wire::zero_padding(capability);
5511 }
5512 }
5513
5514 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreImportRequest<'de>
5515 where
5516 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5517 ___D: ::fidl_next::Decoder<'de>,
5518 ___D: ::fidl_next::fuchsia::HandleDecoder,
5519 {
5520 fn decode(
5521 slot_: ::fidl_next::Slot<'_, Self>,
5522 decoder_: &mut ___D,
5523 _: (),
5524 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5525 ::fidl_next::munge! {
5526 let Self {
5527 mut id,
5528 mut capability,
5529
5530 } = slot_;
5531 }
5532
5533 let _field = id.as_mut();
5534
5535 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
5536
5537 let _field = capability.as_mut();
5538
5539 ::fidl_next::Decode::decode(capability.as_mut(), decoder_, ())?;
5540
5541 Ok(())
5542 }
5543 }
5544
5545 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreImportRequest<'de> {
5546 type Natural = crate::natural::CapabilityStoreImportRequest;
5547 }
5548
5549 #[repr(C)]
5551 pub struct CapabilityStoreDirConnectorOpenRequest<'de> {
5552 pub(crate) table: ::fidl_next::wire::Table<'de>,
5553 }
5554
5555 impl<'de> Drop for CapabilityStoreDirConnectorOpenRequest<'de> {
5556 fn drop(&mut self) {
5557 let _ = self
5558 .table
5559 .get(1)
5560 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
5561
5562 let _ = self.table.get(2).map(|envelope| unsafe {
5563 envelope.read_unchecked::<::fidl_next::ServerEnd<
5564 ::fidl_next_fuchsia_io::Directory,
5565 ::fidl_next::wire::fuchsia::Channel,
5566 >>()
5567 });
5568
5569 let _ = self.table.get(3).map(|envelope| unsafe {
5570 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
5571 });
5572
5573 let _ = self.table.get(4).map(|envelope| unsafe {
5574 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
5575 });
5576 }
5577 }
5578
5579 impl ::fidl_next::Constrained for CapabilityStoreDirConnectorOpenRequest<'_> {
5580 type Constraint = ();
5581
5582 fn validate(
5583 _: ::fidl_next::Slot<'_, Self>,
5584 _: Self::Constraint,
5585 ) -> Result<(), ::fidl_next::ValidationError> {
5586 Ok(())
5587 }
5588 }
5589
5590 unsafe impl ::fidl_next::Wire for CapabilityStoreDirConnectorOpenRequest<'static> {
5591 type Narrowed<'de> = CapabilityStoreDirConnectorOpenRequest<'de>;
5592
5593 #[inline]
5594 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5595 ::fidl_next::munge!(let Self { table } = out);
5596 ::fidl_next::wire::Table::zero_padding(table);
5597 }
5598 }
5599
5600 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreDirConnectorOpenRequest<'de>
5601 where
5602 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5603 ___D: ::fidl_next::fuchsia::HandleDecoder,
5604 {
5605 fn decode(
5606 slot: ::fidl_next::Slot<'_, Self>,
5607 decoder: &mut ___D,
5608 _: (),
5609 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5610 ::fidl_next::munge!(let Self { table } = slot);
5611
5612 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5613 match ordinal {
5614 0 => unsafe { ::core::hint::unreachable_unchecked() },
5615
5616 1 => {
5617 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
5618 slot.as_mut(),
5619 decoder,
5620 (),
5621 )?;
5622
5623 Ok(())
5624 }
5625
5626 2 => {
5627 ::fidl_next::wire::Envelope::decode_as::<
5628 ___D,
5629 ::fidl_next::ServerEnd<
5630 ::fidl_next_fuchsia_io::Directory,
5631 ::fidl_next::wire::fuchsia::Channel,
5632 >,
5633 >(slot.as_mut(), decoder, ())?;
5634
5635 Ok(())
5636 }
5637
5638 3 => {
5639 ::fidl_next::wire::Envelope::decode_as::<
5640 ___D,
5641 ::fidl_next_fuchsia_io::wire::Flags,
5642 >(slot.as_mut(), decoder, ())?;
5643
5644 Ok(())
5645 }
5646
5647 4 => {
5648 ::fidl_next::wire::Envelope::decode_as::<
5649 ___D,
5650 ::fidl_next::wire::String<'de>,
5651 >(slot.as_mut(), decoder, 4095)?;
5652
5653 let value = unsafe {
5654 slot.deref_unchecked()
5655 .deref_unchecked::<::fidl_next::wire::String<'_>>()
5656 };
5657
5658 if value.len() > 4095 {
5659 return Err(::fidl_next::DecodeError::VectorTooLong {
5660 size: value.len() as u64,
5661 limit: 4095,
5662 });
5663 }
5664
5665 Ok(())
5666 }
5667
5668 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5669 }
5670 })
5671 }
5672 }
5673
5674 impl<'de> CapabilityStoreDirConnectorOpenRequest<'de> {
5675 pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
5676 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5677 }
5678
5679 pub fn server_end(
5680 &self,
5681 ) -> ::core::option::Option<
5682 &::fidl_next::ServerEnd<
5683 ::fidl_next_fuchsia_io::Directory,
5684 ::fidl_next::wire::fuchsia::Channel,
5685 >,
5686 > {
5687 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5688 }
5689
5690 pub fn flags(&self) -> ::core::option::Option<&::fidl_next_fuchsia_io::wire::Flags> {
5691 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
5692 }
5693
5694 pub fn path(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
5695 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
5696 }
5697 }
5698
5699 impl<'de> ::core::fmt::Debug for CapabilityStoreDirConnectorOpenRequest<'de> {
5700 fn fmt(
5701 &self,
5702 f: &mut ::core::fmt::Formatter<'_>,
5703 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5704 f.debug_struct("CapabilityStoreDirConnectorOpenRequest")
5705 .field("id", &self.id())
5706 .field("server_end", &self.server_end())
5707 .field("flags", &self.flags())
5708 .field("path", &self.path())
5709 .finish()
5710 }
5711 }
5712
5713 impl<'de> ::fidl_next::IntoNatural for CapabilityStoreDirConnectorOpenRequest<'de> {
5714 type Natural = crate::natural::CapabilityStoreDirConnectorOpenRequest;
5715 }
5716
5717 #[derive(Debug)]
5719 #[repr(C)]
5720 pub struct InstanceToken {
5721 pub token: ::fidl_next::wire::fuchsia::EventPair,
5722 }
5723
5724 static_assertions::const_assert_eq!(std::mem::size_of::<InstanceToken>(), 4);
5725 static_assertions::const_assert_eq!(std::mem::align_of::<InstanceToken>(), 4);
5726
5727 static_assertions::const_assert_eq!(std::mem::offset_of!(InstanceToken, token), 0);
5728
5729 impl ::fidl_next::Constrained for InstanceToken {
5730 type Constraint = ();
5731
5732 fn validate(
5733 _: ::fidl_next::Slot<'_, Self>,
5734 _: Self::Constraint,
5735 ) -> Result<(), ::fidl_next::ValidationError> {
5736 Ok(())
5737 }
5738 }
5739
5740 unsafe impl ::fidl_next::Wire for InstanceToken {
5741 type Narrowed<'de> = InstanceToken;
5742
5743 #[inline]
5744 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5745 ::fidl_next::munge! {
5746 let Self {
5747 token,
5748
5749 } = &mut *out_;
5750 }
5751
5752 ::fidl_next::Wire::zero_padding(token);
5753 }
5754 }
5755
5756 unsafe impl<___D> ::fidl_next::Decode<___D> for InstanceToken
5757 where
5758 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5759 ___D: ::fidl_next::fuchsia::HandleDecoder,
5760 {
5761 fn decode(
5762 slot_: ::fidl_next::Slot<'_, Self>,
5763 decoder_: &mut ___D,
5764 _: (),
5765 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5766 ::fidl_next::munge! {
5767 let Self {
5768 mut token,
5769
5770 } = slot_;
5771 }
5772
5773 let _field = token.as_mut();
5774
5775 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
5776
5777 Ok(())
5778 }
5779 }
5780
5781 impl ::fidl_next::IntoNatural for InstanceToken {
5782 type Natural = crate::natural::InstanceToken;
5783 }
5784
5785 #[repr(C)]
5787 pub struct RouteRequest<'de> {
5788 pub(crate) table: ::fidl_next::wire::Table<'de>,
5789 }
5790
5791 impl<'de> Drop for RouteRequest<'de> {
5792 fn drop(&mut self) {
5793 let _ = self
5794 .table
5795 .get(1)
5796 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::InstanceToken>() });
5797
5798 let _ = self
5799 .table
5800 .get(2)
5801 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::DictionaryRef>() });
5802 }
5803 }
5804
5805 impl ::fidl_next::Constrained for RouteRequest<'_> {
5806 type Constraint = ();
5807
5808 fn validate(
5809 _: ::fidl_next::Slot<'_, Self>,
5810 _: Self::Constraint,
5811 ) -> Result<(), ::fidl_next::ValidationError> {
5812 Ok(())
5813 }
5814 }
5815
5816 unsafe impl ::fidl_next::Wire for RouteRequest<'static> {
5817 type Narrowed<'de> = RouteRequest<'de>;
5818
5819 #[inline]
5820 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5821 ::fidl_next::munge!(let Self { table } = out);
5822 ::fidl_next::wire::Table::zero_padding(table);
5823 }
5824 }
5825
5826 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RouteRequest<'de>
5827 where
5828 ___D: ::fidl_next::Decoder<'de> + ?Sized,
5829 ___D: ::fidl_next::fuchsia::HandleDecoder,
5830 {
5831 fn decode(
5832 slot: ::fidl_next::Slot<'_, Self>,
5833 decoder: &mut ___D,
5834 _: (),
5835 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5836 ::fidl_next::munge!(let Self { table } = slot);
5837
5838 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5839 match ordinal {
5840 0 => unsafe { ::core::hint::unreachable_unchecked() },
5841
5842 1 => {
5843 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::InstanceToken>(
5844 slot.as_mut(),
5845 decoder,
5846 (),
5847 )?;
5848
5849 Ok(())
5850 }
5851
5852 2 => {
5853 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::DictionaryRef>(
5854 slot.as_mut(),
5855 decoder,
5856 (),
5857 )?;
5858
5859 Ok(())
5860 }
5861
5862 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5863 }
5864 })
5865 }
5866 }
5867
5868 impl<'de> RouteRequest<'de> {
5869 pub fn requesting(&self) -> ::core::option::Option<&crate::wire::InstanceToken> {
5870 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5871 }
5872
5873 pub fn metadata(&self) -> ::core::option::Option<&crate::wire::DictionaryRef> {
5874 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5875 }
5876 }
5877
5878 impl<'de> ::core::fmt::Debug for RouteRequest<'de> {
5879 fn fmt(
5880 &self,
5881 f: &mut ::core::fmt::Formatter<'_>,
5882 ) -> ::core::result::Result<(), ::core::fmt::Error> {
5883 f.debug_struct("RouteRequest")
5884 .field("requesting", &self.requesting())
5885 .field("metadata", &self.metadata())
5886 .finish()
5887 }
5888 }
5889
5890 impl<'de> ::fidl_next::IntoNatural for RouteRequest<'de> {
5891 type Natural = crate::natural::RouteRequest;
5892 }
5893
5894 #[repr(transparent)]
5896 pub struct ConnectorRouterRouteResponse {
5897 pub(crate) raw: ::fidl_next::wire::Union,
5898 pub(crate) _phantom: ::core::marker::PhantomData<()>,
5899 }
5900
5901 impl Drop for ConnectorRouterRouteResponse {
5902 fn drop(&mut self) {
5903 match self.raw.ordinal() {
5904 1 => {
5905 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Connector>() };
5906 }
5907
5908 2 => {
5909 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
5910 }
5911
5912 _ => unsafe { ::core::hint::unreachable_unchecked() },
5913 }
5914 }
5915 }
5916
5917 impl ::fidl_next::Constrained for ConnectorRouterRouteResponse {
5918 type Constraint = ();
5919
5920 fn validate(
5921 _: ::fidl_next::Slot<'_, Self>,
5922 _: Self::Constraint,
5923 ) -> Result<(), ::fidl_next::ValidationError> {
5924 Ok(())
5925 }
5926 }
5927
5928 unsafe impl ::fidl_next::Wire for ConnectorRouterRouteResponse {
5929 type Narrowed<'de> = ConnectorRouterRouteResponse;
5930
5931 #[inline]
5932 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5933 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5934 ::fidl_next::wire::Union::zero_padding(raw);
5935 }
5936 }
5937
5938 pub mod connector_router_route_response {
5939 pub enum Ref<'de> {
5940 Connector(&'de crate::wire::Connector),
5941
5942 Unavailable(&'de crate::wire::Unit),
5943 }
5944 }
5945
5946 impl ConnectorRouterRouteResponse {
5947 pub fn as_ref(&self) -> crate::wire::connector_router_route_response::Ref<'_> {
5948 match self.raw.ordinal() {
5949 1 => crate::wire::connector_router_route_response::Ref::Connector(unsafe {
5950 self.raw.get().deref_unchecked::<crate::wire::Connector>()
5951 }),
5952
5953 2 => crate::wire::connector_router_route_response::Ref::Unavailable(unsafe {
5954 self.raw.get().deref_unchecked::<crate::wire::Unit>()
5955 }),
5956
5957 _ => unsafe { ::core::hint::unreachable_unchecked() },
5958 }
5959 }
5960 }
5961
5962 unsafe impl<___D> ::fidl_next::Decode<___D> for ConnectorRouterRouteResponse
5963 where
5964 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5965 ___D: ::fidl_next::fuchsia::HandleDecoder,
5966 {
5967 fn decode(
5968 mut slot: ::fidl_next::Slot<'_, Self>,
5969 decoder: &mut ___D,
5970 _: (),
5971 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5972 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5973 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
5974 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Connector>(
5975 raw,
5976 decoder,
5977 (),
5978 )?,
5979
5980 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
5981 raw,
5982 decoder,
5983 (),
5984 )?,
5985
5986 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
5987 }
5988
5989 Ok(())
5990 }
5991 }
5992
5993 impl ::core::fmt::Debug for ConnectorRouterRouteResponse {
5994 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5995 match self.raw.ordinal() {
5996 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Connector>().fmt(f) },
5997 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
5998 _ => unsafe { ::core::hint::unreachable_unchecked() },
5999 }
6000 }
6001 }
6002
6003 impl ::fidl_next::IntoNatural for ConnectorRouterRouteResponse {
6004 type Natural = crate::natural::ConnectorRouterRouteResponse;
6005 }
6006
6007 #[repr(transparent)]
6009 pub struct DataRouterRouteResponse<'de> {
6010 pub(crate) raw: ::fidl_next::wire::Union,
6011 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
6012 }
6013
6014 impl<'de> Drop for DataRouterRouteResponse<'de> {
6015 fn drop(&mut self) {
6016 match self.raw.ordinal() {
6017 1 => {
6018 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Data<'de>>() };
6019 }
6020
6021 2 => {
6022 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6023 }
6024
6025 _ => unsafe { ::core::hint::unreachable_unchecked() },
6026 }
6027 }
6028 }
6029
6030 impl ::fidl_next::Constrained for DataRouterRouteResponse<'_> {
6031 type Constraint = ();
6032
6033 fn validate(
6034 _: ::fidl_next::Slot<'_, Self>,
6035 _: Self::Constraint,
6036 ) -> Result<(), ::fidl_next::ValidationError> {
6037 Ok(())
6038 }
6039 }
6040
6041 unsafe impl ::fidl_next::Wire for DataRouterRouteResponse<'static> {
6042 type Narrowed<'de> = DataRouterRouteResponse<'de>;
6043
6044 #[inline]
6045 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6046 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6047 ::fidl_next::wire::Union::zero_padding(raw);
6048 }
6049 }
6050
6051 pub mod data_router_route_response {
6052 pub enum Ref<'de> {
6053 Data(&'de crate::wire::Data<'de>),
6054
6055 Unavailable(&'de crate::wire::Unit),
6056 }
6057 }
6058
6059 impl<'de> DataRouterRouteResponse<'de> {
6060 pub fn as_ref(&self) -> crate::wire::data_router_route_response::Ref<'_> {
6061 match self.raw.ordinal() {
6062 1 => crate::wire::data_router_route_response::Ref::Data(unsafe {
6063 self.raw.get().deref_unchecked::<crate::wire::Data<'_>>()
6064 }),
6065
6066 2 => crate::wire::data_router_route_response::Ref::Unavailable(unsafe {
6067 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6068 }),
6069
6070 _ => unsafe { ::core::hint::unreachable_unchecked() },
6071 }
6072 }
6073 }
6074
6075 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataRouterRouteResponse<'de>
6076 where
6077 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6078 ___D: ::fidl_next::Decoder<'de>,
6079 ___D: ::fidl_next::fuchsia::HandleDecoder,
6080 {
6081 fn decode(
6082 mut slot: ::fidl_next::Slot<'_, Self>,
6083 decoder: &mut ___D,
6084 _: (),
6085 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6086 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6087 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6088 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
6089 raw,
6090 decoder,
6091 (),
6092 )?,
6093
6094 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
6095 raw,
6096 decoder,
6097 (),
6098 )?,
6099
6100 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6101 }
6102
6103 Ok(())
6104 }
6105 }
6106
6107 impl<'de> ::core::fmt::Debug for DataRouterRouteResponse<'de> {
6108 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6109 match self.raw.ordinal() {
6110 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Data<'_>>().fmt(f) },
6111 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6112 _ => unsafe { ::core::hint::unreachable_unchecked() },
6113 }
6114 }
6115 }
6116
6117 impl<'de> ::fidl_next::IntoNatural for DataRouterRouteResponse<'de> {
6118 type Natural = crate::natural::DataRouterRouteResponse;
6119 }
6120
6121 #[derive(Debug)]
6123 #[repr(C)]
6124 pub struct DictionaryDrainIteratorGetNextResponse<'de> {
6125 pub items: ::fidl_next::wire::Vector<'de, crate::wire::DictionaryItem<'de>>,
6126
6127 pub end_id: ::fidl_next::wire::Uint64,
6128 }
6129
6130 static_assertions::const_assert_eq!(
6131 std::mem::size_of::<DictionaryDrainIteratorGetNextResponse<'_>>(),
6132 24
6133 );
6134 static_assertions::const_assert_eq!(
6135 std::mem::align_of::<DictionaryDrainIteratorGetNextResponse<'_>>(),
6136 8
6137 );
6138
6139 static_assertions::const_assert_eq!(
6140 std::mem::offset_of!(DictionaryDrainIteratorGetNextResponse<'_>, items),
6141 0
6142 );
6143
6144 static_assertions::const_assert_eq!(
6145 std::mem::offset_of!(DictionaryDrainIteratorGetNextResponse<'_>, end_id),
6146 16
6147 );
6148
6149 impl ::fidl_next::Constrained for DictionaryDrainIteratorGetNextResponse<'_> {
6150 type Constraint = ();
6151
6152 fn validate(
6153 _: ::fidl_next::Slot<'_, Self>,
6154 _: Self::Constraint,
6155 ) -> Result<(), ::fidl_next::ValidationError> {
6156 Ok(())
6157 }
6158 }
6159
6160 unsafe impl ::fidl_next::Wire for DictionaryDrainIteratorGetNextResponse<'static> {
6161 type Narrowed<'de> = DictionaryDrainIteratorGetNextResponse<'de>;
6162
6163 #[inline]
6164 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6165 ::fidl_next::munge! {
6166 let Self {
6167 items,
6168 end_id,
6169
6170 } = &mut *out_;
6171 }
6172
6173 ::fidl_next::Wire::zero_padding(items);
6174
6175 ::fidl_next::Wire::zero_padding(end_id);
6176 }
6177 }
6178
6179 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryDrainIteratorGetNextResponse<'de>
6180 where
6181 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6182 ___D: ::fidl_next::Decoder<'de>,
6183 ___D: ::fidl_next::fuchsia::HandleDecoder,
6184 {
6185 fn decode(
6186 slot_: ::fidl_next::Slot<'_, Self>,
6187 decoder_: &mut ___D,
6188 _: (),
6189 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6190 ::fidl_next::munge! {
6191 let Self {
6192 mut items,
6193 mut end_id,
6194
6195 } = slot_;
6196 }
6197
6198 let _field = items.as_mut();
6199 ::fidl_next::Constrained::validate(_field, (128, ()))?;
6200 ::fidl_next::Decode::decode(items.as_mut(), decoder_, (128, ()))?;
6201
6202 let items = unsafe { items.deref_unchecked() };
6203
6204 if items.len() > 128 {
6205 return Err(::fidl_next::DecodeError::VectorTooLong {
6206 size: items.len() as u64,
6207 limit: 128,
6208 });
6209 }
6210
6211 let _field = end_id.as_mut();
6212
6213 ::fidl_next::Decode::decode(end_id.as_mut(), decoder_, ())?;
6214
6215 Ok(())
6216 }
6217 }
6218
6219 impl<'de> ::fidl_next::IntoNatural for DictionaryDrainIteratorGetNextResponse<'de> {
6220 type Natural = crate::natural::DictionaryDrainIteratorGetNextResponse;
6221 }
6222
6223 #[derive(Debug)]
6225 #[repr(C)]
6226 pub struct DictionaryOptionalItem<'de> {
6227 pub key: ::fidl_next::wire::String<'de>,
6228
6229 pub value: ::fidl_next::wire::Box<'de, crate::wire::WrappedCapabilityId>,
6230 }
6231
6232 static_assertions::const_assert_eq!(std::mem::size_of::<DictionaryOptionalItem<'_>>(), 24);
6233 static_assertions::const_assert_eq!(std::mem::align_of::<DictionaryOptionalItem<'_>>(), 8);
6234
6235 static_assertions::const_assert_eq!(std::mem::offset_of!(DictionaryOptionalItem<'_>, key), 0);
6236
6237 static_assertions::const_assert_eq!(
6238 std::mem::offset_of!(DictionaryOptionalItem<'_>, value),
6239 16
6240 );
6241
6242 impl ::fidl_next::Constrained for DictionaryOptionalItem<'_> {
6243 type Constraint = ();
6244
6245 fn validate(
6246 _: ::fidl_next::Slot<'_, Self>,
6247 _: Self::Constraint,
6248 ) -> Result<(), ::fidl_next::ValidationError> {
6249 Ok(())
6250 }
6251 }
6252
6253 unsafe impl ::fidl_next::Wire for DictionaryOptionalItem<'static> {
6254 type Narrowed<'de> = DictionaryOptionalItem<'de>;
6255
6256 #[inline]
6257 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6258 ::fidl_next::munge! {
6259 let Self {
6260 key,
6261 value,
6262
6263 } = &mut *out_;
6264 }
6265
6266 ::fidl_next::Wire::zero_padding(key);
6267
6268 ::fidl_next::Wire::zero_padding(value);
6269 }
6270 }
6271
6272 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryOptionalItem<'de>
6273 where
6274 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6275 ___D: ::fidl_next::Decoder<'de>,
6276 ___D: ::fidl_next::fuchsia::HandleDecoder,
6277 {
6278 fn decode(
6279 slot_: ::fidl_next::Slot<'_, Self>,
6280 decoder_: &mut ___D,
6281 _: (),
6282 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6283 ::fidl_next::munge! {
6284 let Self {
6285 mut key,
6286 mut value,
6287
6288 } = slot_;
6289 }
6290
6291 let _field = key.as_mut();
6292 ::fidl_next::Constrained::validate(_field, 255)?;
6293 ::fidl_next::Decode::decode(key.as_mut(), decoder_, 255)?;
6294
6295 let key = unsafe { key.deref_unchecked() };
6296
6297 if key.len() > 255 {
6298 return Err(::fidl_next::DecodeError::VectorTooLong {
6299 size: key.len() as u64,
6300 limit: 255,
6301 });
6302 }
6303
6304 let _field = value.as_mut();
6305
6306 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
6307
6308 Ok(())
6309 }
6310 }
6311
6312 impl<'de> ::fidl_next::IntoNatural for DictionaryOptionalItem<'de> {
6313 type Natural = crate::natural::DictionaryOptionalItem;
6314 }
6315
6316 #[derive(Debug)]
6318 #[repr(C)]
6319 pub struct DictionaryEnumerateIteratorGetNextResponse<'de> {
6320 pub items: ::fidl_next::wire::Vector<'de, crate::wire::DictionaryOptionalItem<'de>>,
6321
6322 pub end_id: ::fidl_next::wire::Uint64,
6323 }
6324
6325 static_assertions::const_assert_eq!(
6326 std::mem::size_of::<DictionaryEnumerateIteratorGetNextResponse<'_>>(),
6327 24
6328 );
6329 static_assertions::const_assert_eq!(
6330 std::mem::align_of::<DictionaryEnumerateIteratorGetNextResponse<'_>>(),
6331 8
6332 );
6333
6334 static_assertions::const_assert_eq!(
6335 std::mem::offset_of!(DictionaryEnumerateIteratorGetNextResponse<'_>, items),
6336 0
6337 );
6338
6339 static_assertions::const_assert_eq!(
6340 std::mem::offset_of!(DictionaryEnumerateIteratorGetNextResponse<'_>, end_id),
6341 16
6342 );
6343
6344 impl ::fidl_next::Constrained for DictionaryEnumerateIteratorGetNextResponse<'_> {
6345 type Constraint = ();
6346
6347 fn validate(
6348 _: ::fidl_next::Slot<'_, Self>,
6349 _: Self::Constraint,
6350 ) -> Result<(), ::fidl_next::ValidationError> {
6351 Ok(())
6352 }
6353 }
6354
6355 unsafe impl ::fidl_next::Wire for DictionaryEnumerateIteratorGetNextResponse<'static> {
6356 type Narrowed<'de> = DictionaryEnumerateIteratorGetNextResponse<'de>;
6357
6358 #[inline]
6359 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6360 ::fidl_next::munge! {
6361 let Self {
6362 items,
6363 end_id,
6364
6365 } = &mut *out_;
6366 }
6367
6368 ::fidl_next::Wire::zero_padding(items);
6369
6370 ::fidl_next::Wire::zero_padding(end_id);
6371 }
6372 }
6373
6374 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryEnumerateIteratorGetNextResponse<'de>
6375 where
6376 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6377 ___D: ::fidl_next::Decoder<'de>,
6378 ___D: ::fidl_next::fuchsia::HandleDecoder,
6379 {
6380 fn decode(
6381 slot_: ::fidl_next::Slot<'_, Self>,
6382 decoder_: &mut ___D,
6383 _: (),
6384 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6385 ::fidl_next::munge! {
6386 let Self {
6387 mut items,
6388 mut end_id,
6389
6390 } = slot_;
6391 }
6392
6393 let _field = items.as_mut();
6394 ::fidl_next::Constrained::validate(_field, (128, ()))?;
6395 ::fidl_next::Decode::decode(items.as_mut(), decoder_, (128, ()))?;
6396
6397 let items = unsafe { items.deref_unchecked() };
6398
6399 if items.len() > 128 {
6400 return Err(::fidl_next::DecodeError::VectorTooLong {
6401 size: items.len() as u64,
6402 limit: 128,
6403 });
6404 }
6405
6406 let _field = end_id.as_mut();
6407
6408 ::fidl_next::Decode::decode(end_id.as_mut(), decoder_, ())?;
6409
6410 Ok(())
6411 }
6412 }
6413
6414 impl<'de> ::fidl_next::IntoNatural for DictionaryEnumerateIteratorGetNextResponse<'de> {
6415 type Natural = crate::natural::DictionaryEnumerateIteratorGetNextResponse;
6416 }
6417
6418 #[derive(Debug)]
6420 #[repr(C)]
6421 pub struct DictionaryKeysIteratorGetNextResponse<'de> {
6422 pub keys: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
6423 }
6424
6425 static_assertions::const_assert_eq!(
6426 std::mem::size_of::<DictionaryKeysIteratorGetNextResponse<'_>>(),
6427 16
6428 );
6429 static_assertions::const_assert_eq!(
6430 std::mem::align_of::<DictionaryKeysIteratorGetNextResponse<'_>>(),
6431 8
6432 );
6433
6434 static_assertions::const_assert_eq!(
6435 std::mem::offset_of!(DictionaryKeysIteratorGetNextResponse<'_>, keys),
6436 0
6437 );
6438
6439 impl ::fidl_next::Constrained for DictionaryKeysIteratorGetNextResponse<'_> {
6440 type Constraint = ();
6441
6442 fn validate(
6443 _: ::fidl_next::Slot<'_, Self>,
6444 _: Self::Constraint,
6445 ) -> Result<(), ::fidl_next::ValidationError> {
6446 Ok(())
6447 }
6448 }
6449
6450 unsafe impl ::fidl_next::Wire for DictionaryKeysIteratorGetNextResponse<'static> {
6451 type Narrowed<'de> = DictionaryKeysIteratorGetNextResponse<'de>;
6452
6453 #[inline]
6454 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6455 ::fidl_next::munge! {
6456 let Self {
6457 keys,
6458
6459 } = &mut *out_;
6460 }
6461
6462 ::fidl_next::Wire::zero_padding(keys);
6463 }
6464 }
6465
6466 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryKeysIteratorGetNextResponse<'de>
6467 where
6468 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6469 ___D: ::fidl_next::Decoder<'de>,
6470 ___D: ::fidl_next::fuchsia::HandleDecoder,
6471 {
6472 fn decode(
6473 slot_: ::fidl_next::Slot<'_, Self>,
6474 decoder_: &mut ___D,
6475 _: (),
6476 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6477 ::fidl_next::munge! {
6478 let Self {
6479 mut keys,
6480
6481 } = slot_;
6482 }
6483
6484 let _field = keys.as_mut();
6485 ::fidl_next::Constrained::validate(_field, (128, 255))?;
6486 ::fidl_next::Decode::decode(keys.as_mut(), decoder_, (128, 255))?;
6487
6488 let keys = unsafe { keys.deref_unchecked() };
6489
6490 if keys.len() > 128 {
6491 return Err(::fidl_next::DecodeError::VectorTooLong {
6492 size: keys.len() as u64,
6493 limit: 128,
6494 });
6495 }
6496
6497 Ok(())
6498 }
6499 }
6500
6501 impl<'de> ::fidl_next::IntoNatural for DictionaryKeysIteratorGetNextResponse<'de> {
6502 type Natural = crate::natural::DictionaryKeysIteratorGetNextResponse;
6503 }
6504
6505 #[repr(transparent)]
6507 pub struct DictionaryRouterRouteResponse {
6508 pub(crate) raw: ::fidl_next::wire::Union,
6509 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6510 }
6511
6512 impl Drop for DictionaryRouterRouteResponse {
6513 fn drop(&mut self) {
6514 match self.raw.ordinal() {
6515 1 => {
6516 let _ =
6517 unsafe { self.raw.get().read_unchecked::<crate::wire::DictionaryRef>() };
6518 }
6519
6520 2 => {
6521 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6522 }
6523
6524 _ => unsafe { ::core::hint::unreachable_unchecked() },
6525 }
6526 }
6527 }
6528
6529 impl ::fidl_next::Constrained for DictionaryRouterRouteResponse {
6530 type Constraint = ();
6531
6532 fn validate(
6533 _: ::fidl_next::Slot<'_, Self>,
6534 _: Self::Constraint,
6535 ) -> Result<(), ::fidl_next::ValidationError> {
6536 Ok(())
6537 }
6538 }
6539
6540 unsafe impl ::fidl_next::Wire for DictionaryRouterRouteResponse {
6541 type Narrowed<'de> = DictionaryRouterRouteResponse;
6542
6543 #[inline]
6544 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6545 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6546 ::fidl_next::wire::Union::zero_padding(raw);
6547 }
6548 }
6549
6550 pub mod dictionary_router_route_response {
6551 pub enum Ref<'de> {
6552 Dictionary(&'de crate::wire::DictionaryRef),
6553
6554 Unavailable(&'de crate::wire::Unit),
6555 }
6556 }
6557
6558 impl DictionaryRouterRouteResponse {
6559 pub fn as_ref(&self) -> crate::wire::dictionary_router_route_response::Ref<'_> {
6560 match self.raw.ordinal() {
6561 1 => crate::wire::dictionary_router_route_response::Ref::Dictionary(unsafe {
6562 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>()
6563 }),
6564
6565 2 => crate::wire::dictionary_router_route_response::Ref::Unavailable(unsafe {
6566 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6567 }),
6568
6569 _ => unsafe { ::core::hint::unreachable_unchecked() },
6570 }
6571 }
6572 }
6573
6574 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRouterRouteResponse
6575 where
6576 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6577 ___D: ::fidl_next::fuchsia::HandleDecoder,
6578 {
6579 fn decode(
6580 mut slot: ::fidl_next::Slot<'_, Self>,
6581 decoder: &mut ___D,
6582 _: (),
6583 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6584 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6585 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6586 1 => {
6587 ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DictionaryRef>(
6588 raw,
6589 decoder,
6590 (),
6591 )?
6592 }
6593
6594 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6595 raw,
6596 decoder,
6597 (),
6598 )?,
6599
6600 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6601 }
6602
6603 Ok(())
6604 }
6605 }
6606
6607 impl ::core::fmt::Debug for DictionaryRouterRouteResponse {
6608 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6609 match self.raw.ordinal() {
6610 1 => unsafe {
6611 self.raw.get().deref_unchecked::<crate::wire::DictionaryRef>().fmt(f)
6612 },
6613 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6614 _ => unsafe { ::core::hint::unreachable_unchecked() },
6615 }
6616 }
6617 }
6618
6619 impl ::fidl_next::IntoNatural for DictionaryRouterRouteResponse {
6620 type Natural = crate::natural::DictionaryRouterRouteResponse;
6621 }
6622
6623 #[repr(transparent)]
6625 pub struct DirConnectorRouterRouteResponse {
6626 pub(crate) raw: ::fidl_next::wire::Union,
6627 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6628 }
6629
6630 impl Drop for DirConnectorRouterRouteResponse {
6631 fn drop(&mut self) {
6632 match self.raw.ordinal() {
6633 1 => {
6634 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirConnector>() };
6635 }
6636
6637 2 => {
6638 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6639 }
6640
6641 _ => unsafe { ::core::hint::unreachable_unchecked() },
6642 }
6643 }
6644 }
6645
6646 impl ::fidl_next::Constrained for DirConnectorRouterRouteResponse {
6647 type Constraint = ();
6648
6649 fn validate(
6650 _: ::fidl_next::Slot<'_, Self>,
6651 _: Self::Constraint,
6652 ) -> Result<(), ::fidl_next::ValidationError> {
6653 Ok(())
6654 }
6655 }
6656
6657 unsafe impl ::fidl_next::Wire for DirConnectorRouterRouteResponse {
6658 type Narrowed<'de> = DirConnectorRouterRouteResponse;
6659
6660 #[inline]
6661 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6662 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6663 ::fidl_next::wire::Union::zero_padding(raw);
6664 }
6665 }
6666
6667 pub mod dir_connector_router_route_response {
6668 pub enum Ref<'de> {
6669 DirConnector(&'de crate::wire::DirConnector),
6670
6671 Unavailable(&'de crate::wire::Unit),
6672 }
6673 }
6674
6675 impl DirConnectorRouterRouteResponse {
6676 pub fn as_ref(&self) -> crate::wire::dir_connector_router_route_response::Ref<'_> {
6677 match self.raw.ordinal() {
6678 1 => crate::wire::dir_connector_router_route_response::Ref::DirConnector(unsafe {
6679 self.raw.get().deref_unchecked::<crate::wire::DirConnector>()
6680 }),
6681
6682 2 => crate::wire::dir_connector_router_route_response::Ref::Unavailable(unsafe {
6683 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6684 }),
6685
6686 _ => unsafe { ::core::hint::unreachable_unchecked() },
6687 }
6688 }
6689 }
6690
6691 unsafe impl<___D> ::fidl_next::Decode<___D> for DirConnectorRouterRouteResponse
6692 where
6693 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6694 ___D: ::fidl_next::fuchsia::HandleDecoder,
6695 {
6696 fn decode(
6697 mut slot: ::fidl_next::Slot<'_, Self>,
6698 decoder: &mut ___D,
6699 _: (),
6700 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6701 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6702 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6703 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirConnector>(
6704 raw,
6705 decoder,
6706 (),
6707 )?,
6708
6709 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6710 raw,
6711 decoder,
6712 (),
6713 )?,
6714
6715 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6716 }
6717
6718 Ok(())
6719 }
6720 }
6721
6722 impl ::core::fmt::Debug for DirConnectorRouterRouteResponse {
6723 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6724 match self.raw.ordinal() {
6725 1 => unsafe {
6726 self.raw.get().deref_unchecked::<crate::wire::DirConnector>().fmt(f)
6727 },
6728 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6729 _ => unsafe { ::core::hint::unreachable_unchecked() },
6730 }
6731 }
6732 }
6733
6734 impl ::fidl_next::IntoNatural for DirConnectorRouterRouteResponse {
6735 type Natural = crate::natural::DirConnectorRouterRouteResponse;
6736 }
6737
6738 #[repr(transparent)]
6740 pub struct DirEntryRouterRouteResponse {
6741 pub(crate) raw: ::fidl_next::wire::Union,
6742 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6743 }
6744
6745 impl Drop for DirEntryRouterRouteResponse {
6746 fn drop(&mut self) {
6747 match self.raw.ordinal() {
6748 1 => {
6749 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::DirEntry>() };
6750 }
6751
6752 2 => {
6753 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
6754 }
6755
6756 _ => unsafe { ::core::hint::unreachable_unchecked() },
6757 }
6758 }
6759 }
6760
6761 impl ::fidl_next::Constrained for DirEntryRouterRouteResponse {
6762 type Constraint = ();
6763
6764 fn validate(
6765 _: ::fidl_next::Slot<'_, Self>,
6766 _: Self::Constraint,
6767 ) -> Result<(), ::fidl_next::ValidationError> {
6768 Ok(())
6769 }
6770 }
6771
6772 unsafe impl ::fidl_next::Wire for DirEntryRouterRouteResponse {
6773 type Narrowed<'de> = DirEntryRouterRouteResponse;
6774
6775 #[inline]
6776 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6777 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6778 ::fidl_next::wire::Union::zero_padding(raw);
6779 }
6780 }
6781
6782 pub mod dir_entry_router_route_response {
6783 pub enum Ref<'de> {
6784 DirEntry(&'de crate::wire::DirEntry),
6785
6786 Unavailable(&'de crate::wire::Unit),
6787 }
6788 }
6789
6790 impl DirEntryRouterRouteResponse {
6791 pub fn as_ref(&self) -> crate::wire::dir_entry_router_route_response::Ref<'_> {
6792 match self.raw.ordinal() {
6793 1 => crate::wire::dir_entry_router_route_response::Ref::DirEntry(unsafe {
6794 self.raw.get().deref_unchecked::<crate::wire::DirEntry>()
6795 }),
6796
6797 2 => crate::wire::dir_entry_router_route_response::Ref::Unavailable(unsafe {
6798 self.raw.get().deref_unchecked::<crate::wire::Unit>()
6799 }),
6800
6801 _ => unsafe { ::core::hint::unreachable_unchecked() },
6802 }
6803 }
6804 }
6805
6806 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntryRouterRouteResponse
6807 where
6808 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6809 ___D: ::fidl_next::fuchsia::HandleDecoder,
6810 {
6811 fn decode(
6812 mut slot: ::fidl_next::Slot<'_, Self>,
6813 decoder: &mut ___D,
6814 _: (),
6815 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6816 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6817 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6818 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirEntry>(
6819 raw,
6820 decoder,
6821 (),
6822 )?,
6823
6824 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
6825 raw,
6826 decoder,
6827 (),
6828 )?,
6829
6830 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6831 }
6832
6833 Ok(())
6834 }
6835 }
6836
6837 impl ::core::fmt::Debug for DirEntryRouterRouteResponse {
6838 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6839 match self.raw.ordinal() {
6840 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::DirEntry>().fmt(f) },
6841 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
6842 _ => unsafe { ::core::hint::unreachable_unchecked() },
6843 }
6844 }
6845 }
6846
6847 impl ::fidl_next::IntoNatural for DirEntryRouterRouteResponse {
6848 type Natural = crate::natural::DirEntryRouterRouteResponse;
6849 }
6850
6851 #[repr(C)]
6853 pub struct DirReceiverReceiveRequest<'de> {
6854 pub(crate) table: ::fidl_next::wire::Table<'de>,
6855 }
6856
6857 impl<'de> Drop for DirReceiverReceiveRequest<'de> {
6858 fn drop(&mut self) {
6859 let _ = self.table.get(1).map(|envelope| unsafe {
6860 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
6861 });
6862
6863 let _ = self.table.get(2).map(|envelope| unsafe {
6864 envelope.read_unchecked::<::fidl_next_fuchsia_io::wire::Flags>()
6865 });
6866
6867 let _ = self.table.get(3).map(|envelope| unsafe {
6868 envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
6869 });
6870 }
6871 }
6872
6873 impl ::fidl_next::Constrained for DirReceiverReceiveRequest<'_> {
6874 type Constraint = ();
6875
6876 fn validate(
6877 _: ::fidl_next::Slot<'_, Self>,
6878 _: Self::Constraint,
6879 ) -> Result<(), ::fidl_next::ValidationError> {
6880 Ok(())
6881 }
6882 }
6883
6884 unsafe impl ::fidl_next::Wire for DirReceiverReceiveRequest<'static> {
6885 type Narrowed<'de> = DirReceiverReceiveRequest<'de>;
6886
6887 #[inline]
6888 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6889 ::fidl_next::munge!(let Self { table } = out);
6890 ::fidl_next::wire::Table::zero_padding(table);
6891 }
6892 }
6893
6894 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirReceiverReceiveRequest<'de>
6895 where
6896 ___D: ::fidl_next::Decoder<'de> + ?Sized,
6897 ___D: ::fidl_next::fuchsia::HandleDecoder,
6898 {
6899 fn decode(
6900 slot: ::fidl_next::Slot<'_, Self>,
6901 decoder: &mut ___D,
6902 _: (),
6903 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6904 ::fidl_next::munge!(let Self { table } = slot);
6905
6906 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6907 match ordinal {
6908 0 => unsafe { ::core::hint::unreachable_unchecked() },
6909
6910 1 => {
6911 ::fidl_next::wire::Envelope::decode_as::<
6912 ___D,
6913 ::fidl_next::wire::fuchsia::Channel,
6914 >(slot.as_mut(), decoder, ())?;
6915
6916 Ok(())
6917 }
6918
6919 2 => {
6920 ::fidl_next::wire::Envelope::decode_as::<
6921 ___D,
6922 ::fidl_next_fuchsia_io::wire::Flags,
6923 >(slot.as_mut(), decoder, ())?;
6924
6925 Ok(())
6926 }
6927
6928 3 => {
6929 ::fidl_next::wire::Envelope::decode_as::<
6930 ___D,
6931 ::fidl_next::wire::String<'de>,
6932 >(slot.as_mut(), decoder, 4095)?;
6933
6934 let value = unsafe {
6935 slot.deref_unchecked()
6936 .deref_unchecked::<::fidl_next::wire::String<'_>>()
6937 };
6938
6939 if value.len() > 4095 {
6940 return Err(::fidl_next::DecodeError::VectorTooLong {
6941 size: value.len() as u64,
6942 limit: 4095,
6943 });
6944 }
6945
6946 Ok(())
6947 }
6948
6949 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6950 }
6951 })
6952 }
6953 }
6954
6955 impl<'de> DirReceiverReceiveRequest<'de> {
6956 pub fn channel(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
6957 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6958 }
6959
6960 pub fn flags(&self) -> ::core::option::Option<&::fidl_next_fuchsia_io::wire::Flags> {
6961 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6962 }
6963
6964 pub fn subdir(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
6965 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
6966 }
6967 }
6968
6969 impl<'de> ::core::fmt::Debug for DirReceiverReceiveRequest<'de> {
6970 fn fmt(
6971 &self,
6972 f: &mut ::core::fmt::Formatter<'_>,
6973 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6974 f.debug_struct("DirReceiverReceiveRequest")
6975 .field("channel", &self.channel())
6976 .field("flags", &self.flags())
6977 .field("subdir", &self.subdir())
6978 .finish()
6979 }
6980 }
6981
6982 impl<'de> ::fidl_next::IntoNatural for DirReceiverReceiveRequest<'de> {
6983 type Natural = crate::natural::DirReceiverReceiveRequest;
6984 }
6985
6986 #[repr(transparent)]
6988 pub struct DirectoryRouterRouteResponse {
6989 pub(crate) raw: ::fidl_next::wire::Union,
6990 pub(crate) _phantom: ::core::marker::PhantomData<()>,
6991 }
6992
6993 impl Drop for DirectoryRouterRouteResponse {
6994 fn drop(&mut self) {
6995 match self.raw.ordinal() {
6996 1 => {
6997 let _ = unsafe {
6998 self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
6999 ::fidl_next_fuchsia_io::Directory,
7000 ::fidl_next::wire::fuchsia::Channel,
7001 >>()
7002 };
7003 }
7004
7005 2 => {
7006 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Unit>() };
7007 }
7008
7009 _ => unsafe { ::core::hint::unreachable_unchecked() },
7010 }
7011 }
7012 }
7013
7014 impl ::fidl_next::Constrained for DirectoryRouterRouteResponse {
7015 type Constraint = ();
7016
7017 fn validate(
7018 _: ::fidl_next::Slot<'_, Self>,
7019 _: Self::Constraint,
7020 ) -> Result<(), ::fidl_next::ValidationError> {
7021 Ok(())
7022 }
7023 }
7024
7025 unsafe impl ::fidl_next::Wire for DirectoryRouterRouteResponse {
7026 type Narrowed<'de> = DirectoryRouterRouteResponse;
7027
7028 #[inline]
7029 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7030 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7031 ::fidl_next::wire::Union::zero_padding(raw);
7032 }
7033 }
7034
7035 pub mod directory_router_route_response {
7036 pub enum Ref<'de> {
7037 Directory(
7038 &'de ::fidl_next::ClientEnd<
7039 ::fidl_next_fuchsia_io::Directory,
7040 ::fidl_next::wire::fuchsia::Channel,
7041 >,
7042 ),
7043
7044 Unavailable(&'de crate::wire::Unit),
7045 }
7046 }
7047
7048 impl DirectoryRouterRouteResponse {
7049 pub fn as_ref(&self) -> crate::wire::directory_router_route_response::Ref<'_> {
7050 match self.raw.ordinal() {
7051 1 => crate::wire::directory_router_route_response::Ref::Directory(unsafe {
7052 self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
7053 ::fidl_next_fuchsia_io::Directory,
7054 ::fidl_next::wire::fuchsia::Channel,
7055 >>()
7056 }),
7057
7058 2 => crate::wire::directory_router_route_response::Ref::Unavailable(unsafe {
7059 self.raw.get().deref_unchecked::<crate::wire::Unit>()
7060 }),
7061
7062 _ => unsafe { ::core::hint::unreachable_unchecked() },
7063 }
7064 }
7065 }
7066
7067 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRouterRouteResponse
7068 where
7069 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7070 ___D: ::fidl_next::fuchsia::HandleDecoder,
7071 {
7072 fn decode(
7073 mut slot: ::fidl_next::Slot<'_, Self>,
7074 decoder: &mut ___D,
7075 _: (),
7076 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7077 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7078 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7079 1 => ::fidl_next::wire::Union::decode_as_static::<
7080 ___D,
7081 ::fidl_next::ClientEnd<
7082 ::fidl_next_fuchsia_io::Directory,
7083 ::fidl_next::wire::fuchsia::Channel,
7084 >,
7085 >(raw, decoder, ())?,
7086
7087 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7088 raw,
7089 decoder,
7090 (),
7091 )?,
7092
7093 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
7094 }
7095
7096 Ok(())
7097 }
7098 }
7099
7100 impl ::core::fmt::Debug for DirectoryRouterRouteResponse {
7101 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7102 match self.raw.ordinal() {
7103 1 => unsafe {
7104 self.raw
7105 .get()
7106 .deref_unchecked::<::fidl_next::ClientEnd<
7107 ::fidl_next_fuchsia_io::Directory,
7108 ::fidl_next::wire::fuchsia::Channel,
7109 >>()
7110 .fmt(f)
7111 },
7112 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Unit>().fmt(f) },
7113 _ => unsafe { ::core::hint::unreachable_unchecked() },
7114 }
7115 }
7116 }
7117
7118 impl ::fidl_next::IntoNatural for DirectoryRouterRouteResponse {
7119 type Natural = crate::natural::DirectoryRouterRouteResponse;
7120 }
7121
7122 #[derive(Debug)]
7124 #[repr(C)]
7125 pub struct ProtocolPayload {
7126 pub channel: ::fidl_next::wire::fuchsia::Channel,
7127 }
7128
7129 static_assertions::const_assert_eq!(std::mem::size_of::<ProtocolPayload>(), 4);
7130 static_assertions::const_assert_eq!(std::mem::align_of::<ProtocolPayload>(), 4);
7131
7132 static_assertions::const_assert_eq!(std::mem::offset_of!(ProtocolPayload, channel), 0);
7133
7134 impl ::fidl_next::Constrained for ProtocolPayload {
7135 type Constraint = ();
7136
7137 fn validate(
7138 _: ::fidl_next::Slot<'_, Self>,
7139 _: Self::Constraint,
7140 ) -> Result<(), ::fidl_next::ValidationError> {
7141 Ok(())
7142 }
7143 }
7144
7145 unsafe impl ::fidl_next::Wire for ProtocolPayload {
7146 type Narrowed<'de> = ProtocolPayload;
7147
7148 #[inline]
7149 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7150 ::fidl_next::munge! {
7151 let Self {
7152 channel,
7153
7154 } = &mut *out_;
7155 }
7156
7157 ::fidl_next::Wire::zero_padding(channel);
7158 }
7159 }
7160
7161 unsafe impl<___D> ::fidl_next::Decode<___D> for ProtocolPayload
7162 where
7163 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7164 ___D: ::fidl_next::fuchsia::HandleDecoder,
7165 {
7166 fn decode(
7167 slot_: ::fidl_next::Slot<'_, Self>,
7168 decoder_: &mut ___D,
7169 _: (),
7170 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7171 ::fidl_next::munge! {
7172 let Self {
7173 mut channel,
7174
7175 } = slot_;
7176 }
7177
7178 let _field = channel.as_mut();
7179
7180 ::fidl_next::Decode::decode(channel.as_mut(), decoder_, ())?;
7181
7182 Ok(())
7183 }
7184 }
7185
7186 impl ::fidl_next::IntoNatural for ProtocolPayload {
7187 type Natural = crate::natural::ProtocolPayload;
7188 }
7189}
7190
7191pub mod wire_optional {
7192
7193 pub use fidl_next_common_fuchsia_component_sandbox::wire_optional::*;
7194
7195 #[repr(transparent)]
7196 pub struct Capability<'de> {
7197 pub(crate) raw: ::fidl_next::wire::Union,
7198 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7199 }
7200
7201 impl ::fidl_next::Constrained for Capability<'_> {
7202 type Constraint = ();
7203
7204 fn validate(
7205 _: ::fidl_next::Slot<'_, Self>,
7206 _: Self::Constraint,
7207 ) -> Result<(), ::fidl_next::ValidationError> {
7208 Ok(())
7209 }
7210 }
7211
7212 unsafe impl ::fidl_next::Wire for Capability<'static> {
7213 type Narrowed<'de> = Capability<'de>;
7214
7215 #[inline]
7216 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7217 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7218 ::fidl_next::wire::Union::zero_padding(raw);
7219 }
7220 }
7221
7222 impl<'de> Capability<'de> {
7223 pub fn is_some(&self) -> bool {
7224 self.raw.is_some()
7225 }
7226
7227 pub fn is_none(&self) -> bool {
7228 self.raw.is_none()
7229 }
7230
7231 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Capability<'de>> {
7232 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7233 }
7234
7235 pub fn into_option(self) -> ::core::option::Option<crate::wire::Capability<'de>> {
7236 if self.is_some() {
7237 Some(crate::wire::Capability {
7238 raw: self.raw,
7239 _phantom: ::core::marker::PhantomData,
7240 })
7241 } else {
7242 None
7243 }
7244 }
7245 }
7246
7247 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Capability<'de>
7248 where
7249 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7250 ___D: ::fidl_next::Decoder<'de>,
7251 ___D: ::fidl_next::fuchsia::HandleDecoder,
7252 {
7253 fn decode(
7254 mut slot: ::fidl_next::Slot<'_, Self>,
7255 decoder: &mut ___D,
7256 _: (),
7257 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7258 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7259 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7260 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
7261 raw,
7262 decoder,
7263 (),
7264 )?,
7265
7266 2 => ::fidl_next::wire::Union::decode_as::<
7267 ___D,
7268 ::fidl_next::wire::fuchsia::NullableHandle,
7269 >(raw, decoder, ())?,
7270
7271 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
7272 raw,
7273 decoder,
7274 (),
7275 )?,
7276
7277 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DictionaryRef>(
7278 raw,
7279 decoder,
7280 (),
7281 )?,
7282
7283 5 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Connector>(
7284 raw,
7285 decoder,
7286 (),
7287 )?,
7288
7289 6 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirConnector>(
7290 raw,
7291 decoder,
7292 (),
7293 )?,
7294
7295 7 => ::fidl_next::wire::Union::decode_as::<
7296 ___D,
7297 ::fidl_next::ClientEnd<
7298 ::fidl_next_fuchsia_io::Directory,
7299 ::fidl_next::wire::fuchsia::Channel,
7300 >,
7301 >(raw, decoder, ())?,
7302
7303 8 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirEntry>(
7304 raw,
7305 decoder,
7306 (),
7307 )?,
7308
7309 9 => ::fidl_next::wire::Union::decode_as::<
7310 ___D,
7311 ::fidl_next::ClientEnd<
7312 crate::ConnectorRouter,
7313 ::fidl_next::wire::fuchsia::Channel,
7314 >,
7315 >(raw, decoder, ())?,
7316
7317 10 => ::fidl_next::wire::Union::decode_as::<
7318 ___D,
7319 ::fidl_next::ClientEnd<
7320 crate::DictionaryRouter,
7321 ::fidl_next::wire::fuchsia::Channel,
7322 >,
7323 >(raw, decoder, ())?,
7324
7325 11 => ::fidl_next::wire::Union::decode_as::<
7326 ___D,
7327 ::fidl_next::ClientEnd<
7328 crate::DirEntryRouter,
7329 ::fidl_next::wire::fuchsia::Channel,
7330 >,
7331 >(raw, decoder, ())?,
7332
7333 12 => ::fidl_next::wire::Union::decode_as::<
7334 ___D,
7335 ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::wire::fuchsia::Channel>,
7336 >(raw, decoder, ())?,
7337
7338 13 => ::fidl_next::wire::Union::decode_as::<
7339 ___D,
7340 ::fidl_next::ClientEnd<
7341 crate::DirConnectorRouter,
7342 ::fidl_next::wire::fuchsia::Channel,
7343 >,
7344 >(raw, decoder, ())?,
7345
7346 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7347 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7348 }
7349
7350 Ok(())
7351 }
7352 }
7353
7354 impl<'de> ::core::fmt::Debug for Capability<'de> {
7355 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7356 self.as_ref().fmt(f)
7357 }
7358 }
7359
7360 impl<'de> ::fidl_next::IntoNatural for Capability<'de> {
7361 type Natural = ::core::option::Option<crate::natural::Capability>;
7362 }
7363
7364 #[repr(transparent)]
7365 pub struct ConnectorRouterRouteResponse {
7366 pub(crate) raw: ::fidl_next::wire::Union,
7367 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7368 }
7369
7370 impl ::fidl_next::Constrained for ConnectorRouterRouteResponse {
7371 type Constraint = ();
7372
7373 fn validate(
7374 _: ::fidl_next::Slot<'_, Self>,
7375 _: Self::Constraint,
7376 ) -> Result<(), ::fidl_next::ValidationError> {
7377 Ok(())
7378 }
7379 }
7380
7381 unsafe impl ::fidl_next::Wire for ConnectorRouterRouteResponse {
7382 type Narrowed<'de> = ConnectorRouterRouteResponse;
7383
7384 #[inline]
7385 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7386 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7387 ::fidl_next::wire::Union::zero_padding(raw);
7388 }
7389 }
7390
7391 impl ConnectorRouterRouteResponse {
7392 pub fn is_some(&self) -> bool {
7393 self.raw.is_some()
7394 }
7395
7396 pub fn is_none(&self) -> bool {
7397 self.raw.is_none()
7398 }
7399
7400 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ConnectorRouterRouteResponse> {
7401 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7402 }
7403
7404 pub fn into_option(
7405 self,
7406 ) -> ::core::option::Option<crate::wire::ConnectorRouterRouteResponse> {
7407 if self.is_some() {
7408 Some(crate::wire::ConnectorRouterRouteResponse {
7409 raw: self.raw,
7410 _phantom: ::core::marker::PhantomData,
7411 })
7412 } else {
7413 None
7414 }
7415 }
7416 }
7417
7418 unsafe impl<___D> ::fidl_next::Decode<___D> for ConnectorRouterRouteResponse
7419 where
7420 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7421 ___D: ::fidl_next::fuchsia::HandleDecoder,
7422 {
7423 fn decode(
7424 mut slot: ::fidl_next::Slot<'_, Self>,
7425 decoder: &mut ___D,
7426 _: (),
7427 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7428 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7429 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7430 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Connector>(
7431 raw,
7432 decoder,
7433 (),
7434 )?,
7435
7436 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7437 raw,
7438 decoder,
7439 (),
7440 )?,
7441
7442 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7443 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7444 }
7445
7446 Ok(())
7447 }
7448 }
7449
7450 impl ::core::fmt::Debug for ConnectorRouterRouteResponse {
7451 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7452 self.as_ref().fmt(f)
7453 }
7454 }
7455
7456 impl ::fidl_next::IntoNatural for ConnectorRouterRouteResponse {
7457 type Natural = ::core::option::Option<crate::natural::ConnectorRouterRouteResponse>;
7458 }
7459
7460 #[repr(transparent)]
7461 pub struct DataRouterRouteResponse<'de> {
7462 pub(crate) raw: ::fidl_next::wire::Union,
7463 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7464 }
7465
7466 impl ::fidl_next::Constrained for DataRouterRouteResponse<'_> {
7467 type Constraint = ();
7468
7469 fn validate(
7470 _: ::fidl_next::Slot<'_, Self>,
7471 _: Self::Constraint,
7472 ) -> Result<(), ::fidl_next::ValidationError> {
7473 Ok(())
7474 }
7475 }
7476
7477 unsafe impl ::fidl_next::Wire for DataRouterRouteResponse<'static> {
7478 type Narrowed<'de> = DataRouterRouteResponse<'de>;
7479
7480 #[inline]
7481 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7482 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7483 ::fidl_next::wire::Union::zero_padding(raw);
7484 }
7485 }
7486
7487 impl<'de> DataRouterRouteResponse<'de> {
7488 pub fn is_some(&self) -> bool {
7489 self.raw.is_some()
7490 }
7491
7492 pub fn is_none(&self) -> bool {
7493 self.raw.is_none()
7494 }
7495
7496 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DataRouterRouteResponse<'de>> {
7497 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7498 }
7499
7500 pub fn into_option(
7501 self,
7502 ) -> ::core::option::Option<crate::wire::DataRouterRouteResponse<'de>> {
7503 if self.is_some() {
7504 Some(crate::wire::DataRouterRouteResponse {
7505 raw: self.raw,
7506 _phantom: ::core::marker::PhantomData,
7507 })
7508 } else {
7509 None
7510 }
7511 }
7512 }
7513
7514 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataRouterRouteResponse<'de>
7515 where
7516 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7517 ___D: ::fidl_next::Decoder<'de>,
7518 ___D: ::fidl_next::fuchsia::HandleDecoder,
7519 {
7520 fn decode(
7521 mut slot: ::fidl_next::Slot<'_, Self>,
7522 decoder: &mut ___D,
7523 _: (),
7524 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7525 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7526 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7527 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Data<'de>>(
7528 raw,
7529 decoder,
7530 (),
7531 )?,
7532
7533 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Unit>(
7534 raw,
7535 decoder,
7536 (),
7537 )?,
7538
7539 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7540 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7541 }
7542
7543 Ok(())
7544 }
7545 }
7546
7547 impl<'de> ::core::fmt::Debug for DataRouterRouteResponse<'de> {
7548 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7549 self.as_ref().fmt(f)
7550 }
7551 }
7552
7553 impl<'de> ::fidl_next::IntoNatural for DataRouterRouteResponse<'de> {
7554 type Natural = ::core::option::Option<crate::natural::DataRouterRouteResponse>;
7555 }
7556
7557 #[repr(transparent)]
7558 pub struct DictionaryRouterRouteResponse {
7559 pub(crate) raw: ::fidl_next::wire::Union,
7560 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7561 }
7562
7563 impl ::fidl_next::Constrained for DictionaryRouterRouteResponse {
7564 type Constraint = ();
7565
7566 fn validate(
7567 _: ::fidl_next::Slot<'_, Self>,
7568 _: Self::Constraint,
7569 ) -> Result<(), ::fidl_next::ValidationError> {
7570 Ok(())
7571 }
7572 }
7573
7574 unsafe impl ::fidl_next::Wire for DictionaryRouterRouteResponse {
7575 type Narrowed<'de> = DictionaryRouterRouteResponse;
7576
7577 #[inline]
7578 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7579 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7580 ::fidl_next::wire::Union::zero_padding(raw);
7581 }
7582 }
7583
7584 impl DictionaryRouterRouteResponse {
7585 pub fn is_some(&self) -> bool {
7586 self.raw.is_some()
7587 }
7588
7589 pub fn is_none(&self) -> bool {
7590 self.raw.is_none()
7591 }
7592
7593 pub fn as_ref(
7594 &self,
7595 ) -> ::core::option::Option<&crate::wire::DictionaryRouterRouteResponse> {
7596 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7597 }
7598
7599 pub fn into_option(
7600 self,
7601 ) -> ::core::option::Option<crate::wire::DictionaryRouterRouteResponse> {
7602 if self.is_some() {
7603 Some(crate::wire::DictionaryRouterRouteResponse {
7604 raw: self.raw,
7605 _phantom: ::core::marker::PhantomData,
7606 })
7607 } else {
7608 None
7609 }
7610 }
7611 }
7612
7613 unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryRouterRouteResponse
7614 where
7615 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7616 ___D: ::fidl_next::fuchsia::HandleDecoder,
7617 {
7618 fn decode(
7619 mut slot: ::fidl_next::Slot<'_, Self>,
7620 decoder: &mut ___D,
7621 _: (),
7622 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7623 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7624 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7625 1 => {
7626 ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DictionaryRef>(
7627 raw,
7628 decoder,
7629 (),
7630 )?
7631 }
7632
7633 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7634 raw,
7635 decoder,
7636 (),
7637 )?,
7638
7639 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7640 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7641 }
7642
7643 Ok(())
7644 }
7645 }
7646
7647 impl ::core::fmt::Debug for DictionaryRouterRouteResponse {
7648 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7649 self.as_ref().fmt(f)
7650 }
7651 }
7652
7653 impl ::fidl_next::IntoNatural for DictionaryRouterRouteResponse {
7654 type Natural = ::core::option::Option<crate::natural::DictionaryRouterRouteResponse>;
7655 }
7656
7657 #[repr(transparent)]
7658 pub struct DirConnectorRouterRouteResponse {
7659 pub(crate) raw: ::fidl_next::wire::Union,
7660 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7661 }
7662
7663 impl ::fidl_next::Constrained for DirConnectorRouterRouteResponse {
7664 type Constraint = ();
7665
7666 fn validate(
7667 _: ::fidl_next::Slot<'_, Self>,
7668 _: Self::Constraint,
7669 ) -> Result<(), ::fidl_next::ValidationError> {
7670 Ok(())
7671 }
7672 }
7673
7674 unsafe impl ::fidl_next::Wire for DirConnectorRouterRouteResponse {
7675 type Narrowed<'de> = DirConnectorRouterRouteResponse;
7676
7677 #[inline]
7678 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7679 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7680 ::fidl_next::wire::Union::zero_padding(raw);
7681 }
7682 }
7683
7684 impl DirConnectorRouterRouteResponse {
7685 pub fn is_some(&self) -> bool {
7686 self.raw.is_some()
7687 }
7688
7689 pub fn is_none(&self) -> bool {
7690 self.raw.is_none()
7691 }
7692
7693 pub fn as_ref(
7694 &self,
7695 ) -> ::core::option::Option<&crate::wire::DirConnectorRouterRouteResponse> {
7696 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7697 }
7698
7699 pub fn into_option(
7700 self,
7701 ) -> ::core::option::Option<crate::wire::DirConnectorRouterRouteResponse> {
7702 if self.is_some() {
7703 Some(crate::wire::DirConnectorRouterRouteResponse {
7704 raw: self.raw,
7705 _phantom: ::core::marker::PhantomData,
7706 })
7707 } else {
7708 None
7709 }
7710 }
7711 }
7712
7713 unsafe impl<___D> ::fidl_next::Decode<___D> for DirConnectorRouterRouteResponse
7714 where
7715 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7716 ___D: ::fidl_next::fuchsia::HandleDecoder,
7717 {
7718 fn decode(
7719 mut slot: ::fidl_next::Slot<'_, Self>,
7720 decoder: &mut ___D,
7721 _: (),
7722 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7723 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7724 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7725 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirConnector>(
7726 raw,
7727 decoder,
7728 (),
7729 )?,
7730
7731 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7732 raw,
7733 decoder,
7734 (),
7735 )?,
7736
7737 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7738 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7739 }
7740
7741 Ok(())
7742 }
7743 }
7744
7745 impl ::core::fmt::Debug for DirConnectorRouterRouteResponse {
7746 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7747 self.as_ref().fmt(f)
7748 }
7749 }
7750
7751 impl ::fidl_next::IntoNatural for DirConnectorRouterRouteResponse {
7752 type Natural = ::core::option::Option<crate::natural::DirConnectorRouterRouteResponse>;
7753 }
7754
7755 #[repr(transparent)]
7756 pub struct DirEntryRouterRouteResponse {
7757 pub(crate) raw: ::fidl_next::wire::Union,
7758 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7759 }
7760
7761 impl ::fidl_next::Constrained for DirEntryRouterRouteResponse {
7762 type Constraint = ();
7763
7764 fn validate(
7765 _: ::fidl_next::Slot<'_, Self>,
7766 _: Self::Constraint,
7767 ) -> Result<(), ::fidl_next::ValidationError> {
7768 Ok(())
7769 }
7770 }
7771
7772 unsafe impl ::fidl_next::Wire for DirEntryRouterRouteResponse {
7773 type Narrowed<'de> = DirEntryRouterRouteResponse;
7774
7775 #[inline]
7776 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7777 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7778 ::fidl_next::wire::Union::zero_padding(raw);
7779 }
7780 }
7781
7782 impl DirEntryRouterRouteResponse {
7783 pub fn is_some(&self) -> bool {
7784 self.raw.is_some()
7785 }
7786
7787 pub fn is_none(&self) -> bool {
7788 self.raw.is_none()
7789 }
7790
7791 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DirEntryRouterRouteResponse> {
7792 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7793 }
7794
7795 pub fn into_option(
7796 self,
7797 ) -> ::core::option::Option<crate::wire::DirEntryRouterRouteResponse> {
7798 if self.is_some() {
7799 Some(crate::wire::DirEntryRouterRouteResponse {
7800 raw: self.raw,
7801 _phantom: ::core::marker::PhantomData,
7802 })
7803 } else {
7804 None
7805 }
7806 }
7807 }
7808
7809 unsafe impl<___D> ::fidl_next::Decode<___D> for DirEntryRouterRouteResponse
7810 where
7811 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7812 ___D: ::fidl_next::fuchsia::HandleDecoder,
7813 {
7814 fn decode(
7815 mut slot: ::fidl_next::Slot<'_, Self>,
7816 decoder: &mut ___D,
7817 _: (),
7818 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7819 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7820 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7821 1 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::DirEntry>(
7822 raw,
7823 decoder,
7824 (),
7825 )?,
7826
7827 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7828 raw,
7829 decoder,
7830 (),
7831 )?,
7832
7833 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7834 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7835 }
7836
7837 Ok(())
7838 }
7839 }
7840
7841 impl ::core::fmt::Debug for DirEntryRouterRouteResponse {
7842 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7843 self.as_ref().fmt(f)
7844 }
7845 }
7846
7847 impl ::fidl_next::IntoNatural for DirEntryRouterRouteResponse {
7848 type Natural = ::core::option::Option<crate::natural::DirEntryRouterRouteResponse>;
7849 }
7850
7851 #[repr(transparent)]
7852 pub struct DirectoryRouterRouteResponse {
7853 pub(crate) raw: ::fidl_next::wire::Union,
7854 pub(crate) _phantom: ::core::marker::PhantomData<()>,
7855 }
7856
7857 impl ::fidl_next::Constrained for DirectoryRouterRouteResponse {
7858 type Constraint = ();
7859
7860 fn validate(
7861 _: ::fidl_next::Slot<'_, Self>,
7862 _: Self::Constraint,
7863 ) -> Result<(), ::fidl_next::ValidationError> {
7864 Ok(())
7865 }
7866 }
7867
7868 unsafe impl ::fidl_next::Wire for DirectoryRouterRouteResponse {
7869 type Narrowed<'de> = DirectoryRouterRouteResponse;
7870
7871 #[inline]
7872 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7873 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7874 ::fidl_next::wire::Union::zero_padding(raw);
7875 }
7876 }
7877
7878 impl DirectoryRouterRouteResponse {
7879 pub fn is_some(&self) -> bool {
7880 self.raw.is_some()
7881 }
7882
7883 pub fn is_none(&self) -> bool {
7884 self.raw.is_none()
7885 }
7886
7887 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DirectoryRouterRouteResponse> {
7888 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7889 }
7890
7891 pub fn into_option(
7892 self,
7893 ) -> ::core::option::Option<crate::wire::DirectoryRouterRouteResponse> {
7894 if self.is_some() {
7895 Some(crate::wire::DirectoryRouterRouteResponse {
7896 raw: self.raw,
7897 _phantom: ::core::marker::PhantomData,
7898 })
7899 } else {
7900 None
7901 }
7902 }
7903 }
7904
7905 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRouterRouteResponse
7906 where
7907 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7908 ___D: ::fidl_next::fuchsia::HandleDecoder,
7909 {
7910 fn decode(
7911 mut slot: ::fidl_next::Slot<'_, Self>,
7912 decoder: &mut ___D,
7913 _: (),
7914 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7915 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7916 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7917 1 => ::fidl_next::wire::Union::decode_as_static::<
7918 ___D,
7919 ::fidl_next::ClientEnd<
7920 ::fidl_next_fuchsia_io::Directory,
7921 ::fidl_next::wire::fuchsia::Channel,
7922 >,
7923 >(raw, decoder, ())?,
7924
7925 2 => ::fidl_next::wire::Union::decode_as_static::<___D, crate::wire::Unit>(
7926 raw,
7927 decoder,
7928 (),
7929 )?,
7930
7931 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7932 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
7933 }
7934
7935 Ok(())
7936 }
7937 }
7938
7939 impl ::core::fmt::Debug for DirectoryRouterRouteResponse {
7940 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7941 self.as_ref().fmt(f)
7942 }
7943 }
7944
7945 impl ::fidl_next::IntoNatural for DirectoryRouterRouteResponse {
7946 type Natural = ::core::option::Option<crate::natural::DirectoryRouterRouteResponse>;
7947 }
7948}
7949
7950pub mod generic {
7951
7952 pub use fidl_next_common_fuchsia_component_sandbox::generic::*;
7953
7954 pub struct DirConnector<T0> {
7956 pub token: T0,
7957 }
7958
7959 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirConnector, ___E> for DirConnector<T0>
7960 where
7961 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7962 ___E: ::fidl_next::fuchsia::HandleEncoder,
7963 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
7964 {
7965 #[inline]
7966 fn encode(
7967 self,
7968 encoder_: &mut ___E,
7969 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirConnector>,
7970 _: (),
7971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7972 ::fidl_next::munge! {
7973 let crate::wire::DirConnector {
7974 token,
7975
7976 } = out_;
7977 }
7978
7979 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
7980
7981 Ok(())
7982 }
7983 }
7984
7985 pub struct DictionaryRef<T0> {
7987 pub token: T0,
7988 }
7989
7990 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DictionaryRef, ___E> for DictionaryRef<T0>
7991 where
7992 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7993 ___E: ::fidl_next::fuchsia::HandleEncoder,
7994 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
7995 {
7996 #[inline]
7997 fn encode(
7998 self,
7999 encoder_: &mut ___E,
8000 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryRef>,
8001 _: (),
8002 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8003 ::fidl_next::munge! {
8004 let crate::wire::DictionaryRef {
8005 token,
8006
8007 } = out_;
8008 }
8009
8010 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8011
8012 Ok(())
8013 }
8014 }
8015
8016 pub struct Connector<T0> {
8018 pub token: T0,
8019 }
8020
8021 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::Connector, ___E> for Connector<T0>
8022 where
8023 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8024 ___E: ::fidl_next::fuchsia::HandleEncoder,
8025 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8026 {
8027 #[inline]
8028 fn encode(
8029 self,
8030 encoder_: &mut ___E,
8031 out_: &mut ::core::mem::MaybeUninit<crate::wire::Connector>,
8032 _: (),
8033 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8034 ::fidl_next::munge! {
8035 let crate::wire::Connector {
8036 token,
8037
8038 } = out_;
8039 }
8040
8041 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8042
8043 Ok(())
8044 }
8045 }
8046
8047 pub struct DirEntry<T0> {
8049 pub token: T0,
8050 }
8051
8052 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirEntry, ___E> for DirEntry<T0>
8053 where
8054 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8055 ___E: ::fidl_next::fuchsia::HandleEncoder,
8056 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8057 {
8058 #[inline]
8059 fn encode(
8060 self,
8061 encoder_: &mut ___E,
8062 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirEntry>,
8063 _: (),
8064 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8065 ::fidl_next::munge! {
8066 let crate::wire::DirEntry {
8067 token,
8068
8069 } = out_;
8070 }
8071
8072 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8073
8074 Ok(())
8075 }
8076 }
8077
8078 pub struct CapabilityStoreConnectorCreateRequest<T0, T1> {
8080 pub id: T0,
8081
8082 pub receiver: T1,
8083 }
8084
8085 unsafe impl<___E, T0, T1>
8086 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorCreateRequest, ___E>
8087 for CapabilityStoreConnectorCreateRequest<T0, T1>
8088 where
8089 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8090 ___E: ::fidl_next::fuchsia::HandleEncoder,
8091 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8092 T1: ::fidl_next::Encode<
8093 ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
8094 ___E,
8095 >,
8096 {
8097 #[inline]
8098 fn encode(
8099 self,
8100 encoder_: &mut ___E,
8101 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorCreateRequest>,
8102 _: (),
8103 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8104 ::fidl_next::munge! {
8105 let crate::wire::CapabilityStoreConnectorCreateRequest {
8106 id,
8107 receiver,
8108
8109 } = out_;
8110 }
8111
8112 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8113
8114 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
8115
8116 Ok(())
8117 }
8118 }
8119
8120 pub struct CapabilityStoreConnectorOpenRequest<T0, T1> {
8122 pub id: T0,
8123
8124 pub server_end: T1,
8125 }
8126
8127 unsafe impl<___E, T0, T1>
8128 ::fidl_next::Encode<crate::wire::CapabilityStoreConnectorOpenRequest, ___E>
8129 for CapabilityStoreConnectorOpenRequest<T0, T1>
8130 where
8131 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8132 ___E: ::fidl_next::fuchsia::HandleEncoder,
8133 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8134 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8135 {
8136 #[inline]
8137 fn encode(
8138 self,
8139 encoder_: &mut ___E,
8140 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreConnectorOpenRequest>,
8141 _: (),
8142 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8143 ::fidl_next::munge! {
8144 let crate::wire::CapabilityStoreConnectorOpenRequest {
8145 id,
8146 server_end,
8147
8148 } = out_;
8149 }
8150
8151 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8152
8153 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
8154
8155 Ok(())
8156 }
8157 }
8158
8159 pub struct CapabilityStoreDirConnectorCreateRequest<T0, T1> {
8161 pub id: T0,
8162
8163 pub receiver: T1,
8164 }
8165
8166 unsafe impl<___E, T0, T1>
8167 ::fidl_next::Encode<crate::wire::CapabilityStoreDirConnectorCreateRequest, ___E>
8168 for CapabilityStoreDirConnectorCreateRequest<T0, T1>
8169 where
8170 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8171 ___E: ::fidl_next::fuchsia::HandleEncoder,
8172 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8173 T1: ::fidl_next::Encode<
8174 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
8175 ___E,
8176 >,
8177 {
8178 #[inline]
8179 fn encode(
8180 self,
8181 encoder_: &mut ___E,
8182 out_: &mut ::core::mem::MaybeUninit<
8183 crate::wire::CapabilityStoreDirConnectorCreateRequest,
8184 >,
8185 _: (),
8186 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8187 ::fidl_next::munge! {
8188 let crate::wire::CapabilityStoreDirConnectorCreateRequest {
8189 id,
8190 receiver,
8191
8192 } = out_;
8193 }
8194
8195 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8196
8197 ::fidl_next::Encode::encode(self.receiver, encoder_, receiver, ())?;
8198
8199 Ok(())
8200 }
8201 }
8202
8203 pub struct CapabilityStoreDictionaryLegacyImportRequest<T0, T1> {
8205 pub id: T0,
8206
8207 pub client_end: T1,
8208 }
8209
8210 unsafe impl<___E, T0, T1>
8211 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyImportRequest, ___E>
8212 for CapabilityStoreDictionaryLegacyImportRequest<T0, T1>
8213 where
8214 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8215 ___E: ::fidl_next::fuchsia::HandleEncoder,
8216 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8217 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8218 {
8219 #[inline]
8220 fn encode(
8221 self,
8222 encoder_: &mut ___E,
8223 out_: &mut ::core::mem::MaybeUninit<
8224 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
8225 >,
8226 _: (),
8227 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8228 ::fidl_next::munge! {
8229 let crate::wire::CapabilityStoreDictionaryLegacyImportRequest {
8230 id,
8231 client_end,
8232
8233 } = out_;
8234 }
8235
8236 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8237
8238 ::fidl_next::Encode::encode(self.client_end, encoder_, client_end, ())?;
8239
8240 Ok(())
8241 }
8242 }
8243
8244 pub struct CapabilityStoreDictionaryLegacyExportRequest<T0, T1> {
8246 pub id: T0,
8247
8248 pub server_end: T1,
8249 }
8250
8251 unsafe impl<___E, T0, T1>
8252 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryLegacyExportRequest, ___E>
8253 for CapabilityStoreDictionaryLegacyExportRequest<T0, T1>
8254 where
8255 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8256 ___E: ::fidl_next::fuchsia::HandleEncoder,
8257 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8258 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8259 {
8260 #[inline]
8261 fn encode(
8262 self,
8263 encoder_: &mut ___E,
8264 out_: &mut ::core::mem::MaybeUninit<
8265 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
8266 >,
8267 _: (),
8268 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8269 ::fidl_next::munge! {
8270 let crate::wire::CapabilityStoreDictionaryLegacyExportRequest {
8271 id,
8272 server_end,
8273
8274 } = out_;
8275 }
8276
8277 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8278
8279 ::fidl_next::Encode::encode(self.server_end, encoder_, server_end, ())?;
8280
8281 Ok(())
8282 }
8283 }
8284
8285 pub struct CapabilityStoreDictionaryKeysRequest<T0, T1> {
8287 pub id: T0,
8288
8289 pub iterator: T1,
8290 }
8291
8292 unsafe impl<___E, T0, T1>
8293 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryKeysRequest, ___E>
8294 for CapabilityStoreDictionaryKeysRequest<T0, T1>
8295 where
8296 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8297 ___E: ::fidl_next::fuchsia::HandleEncoder,
8298 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8299 T1: ::fidl_next::Encode<
8300 ::fidl_next::ServerEnd<
8301 crate::DictionaryKeysIterator,
8302 ::fidl_next::wire::fuchsia::Channel,
8303 >,
8304 ___E,
8305 >,
8306 {
8307 #[inline]
8308 fn encode(
8309 self,
8310 encoder_: &mut ___E,
8311 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryKeysRequest>,
8312 _: (),
8313 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8314 ::fidl_next::munge! {
8315 let crate::wire::CapabilityStoreDictionaryKeysRequest {
8316 id,
8317 iterator,
8318
8319 } = out_;
8320 }
8321
8322 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8323
8324 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8325
8326 Ok(())
8327 }
8328 }
8329
8330 pub struct CapabilityStoreDictionaryEnumerateRequest<T0, T1> {
8332 pub id: T0,
8333
8334 pub iterator: T1,
8335 }
8336
8337 unsafe impl<___E, T0, T1>
8338 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryEnumerateRequest, ___E>
8339 for CapabilityStoreDictionaryEnumerateRequest<T0, T1>
8340 where
8341 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8342 ___E: ::fidl_next::fuchsia::HandleEncoder,
8343 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8344 T1: ::fidl_next::Encode<
8345 ::fidl_next::ServerEnd<
8346 crate::DictionaryEnumerateIterator,
8347 ::fidl_next::wire::fuchsia::Channel,
8348 >,
8349 ___E,
8350 >,
8351 {
8352 #[inline]
8353 fn encode(
8354 self,
8355 encoder_: &mut ___E,
8356 out_: &mut ::core::mem::MaybeUninit<
8357 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
8358 >,
8359 _: (),
8360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8361 ::fidl_next::munge! {
8362 let crate::wire::CapabilityStoreDictionaryEnumerateRequest {
8363 id,
8364 iterator,
8365
8366 } = out_;
8367 }
8368
8369 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8370
8371 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8372
8373 Ok(())
8374 }
8375 }
8376
8377 pub struct CapabilityStoreDictionaryDrainRequest<T0, T1> {
8379 pub id: T0,
8380
8381 pub iterator: T1,
8382 }
8383
8384 unsafe impl<___E, T0, T1>
8385 ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryDrainRequest, ___E>
8386 for CapabilityStoreDictionaryDrainRequest<T0, T1>
8387 where
8388 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8389 ___E: ::fidl_next::fuchsia::HandleEncoder,
8390 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8391 T1: ::fidl_next::Encode<
8392 ::fidl_next::ServerEnd<
8393 crate::DictionaryDrainIterator,
8394 ::fidl_next::wire::fuchsia::OptionalChannel,
8395 >,
8396 ___E,
8397 >,
8398 {
8399 #[inline]
8400 fn encode(
8401 self,
8402 encoder_: &mut ___E,
8403 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryDrainRequest>,
8404 _: (),
8405 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8406 ::fidl_next::munge! {
8407 let crate::wire::CapabilityStoreDictionaryDrainRequest {
8408 id,
8409 iterator,
8410
8411 } = out_;
8412 }
8413
8414 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8415
8416 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
8417
8418 Ok(())
8419 }
8420 }
8421
8422 pub struct CapabilityStoreCreateServiceAggregateRequest<T0> {
8424 pub sources: T0,
8425 }
8426
8427 unsafe impl<___E, T0>
8428 ::fidl_next::Encode<
8429 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
8430 ___E,
8431 > for CapabilityStoreCreateServiceAggregateRequest<T0>
8432 where
8433 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8434 ___E: ::fidl_next::Encoder,
8435 ___E: ::fidl_next::fuchsia::HandleEncoder,
8436 T0: ::fidl_next::Encode<
8437 ::fidl_next::wire::Vector<'static, crate::wire::AggregateSource<'static>>,
8438 ___E,
8439 >,
8440 {
8441 #[inline]
8442 fn encode(
8443 self,
8444 encoder_: &mut ___E,
8445 out_: &mut ::core::mem::MaybeUninit<
8446 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
8447 >,
8448 _: (),
8449 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8450 ::fidl_next::munge! {
8451 let crate::wire::CapabilityStoreCreateServiceAggregateRequest {
8452 sources,
8453
8454 } = out_;
8455 }
8456
8457 ::fidl_next::Encode::encode(self.sources, encoder_, sources, (4294967295, ()))?;
8458
8459 Ok(())
8460 }
8461 }
8462
8463 pub struct CapabilityStoreCreateServiceAggregateResponse<T0> {
8465 pub aggregate_dir_connector: T0,
8466 }
8467
8468 unsafe impl<___E, T0>
8469 ::fidl_next::Encode<crate::wire::CapabilityStoreCreateServiceAggregateResponse, ___E>
8470 for CapabilityStoreCreateServiceAggregateResponse<T0>
8471 where
8472 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8473 ___E: ::fidl_next::fuchsia::HandleEncoder,
8474 T0: ::fidl_next::Encode<crate::wire::DirConnector, ___E>,
8475 {
8476 #[inline]
8477 fn encode(
8478 self,
8479 encoder_: &mut ___E,
8480 out_: &mut ::core::mem::MaybeUninit<
8481 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
8482 >,
8483 _: (),
8484 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8485 ::fidl_next::munge! {
8486 let crate::wire::CapabilityStoreCreateServiceAggregateResponse {
8487 aggregate_dir_connector,
8488
8489 } = out_;
8490 }
8491
8492 ::fidl_next::Encode::encode(
8493 self.aggregate_dir_connector,
8494 encoder_,
8495 aggregate_dir_connector,
8496 (),
8497 )?;
8498
8499 Ok(())
8500 }
8501 }
8502
8503 pub struct CapabilityStoreExportResponse<T0> {
8505 pub capability: T0,
8506 }
8507
8508 unsafe impl<___E, T0>
8509 ::fidl_next::Encode<crate::wire::CapabilityStoreExportResponse<'static>, ___E>
8510 for CapabilityStoreExportResponse<T0>
8511 where
8512 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8513 ___E: ::fidl_next::Encoder,
8514 ___E: ::fidl_next::fuchsia::HandleEncoder,
8515 T0: ::fidl_next::Encode<crate::wire::Capability<'static>, ___E>,
8516 {
8517 #[inline]
8518 fn encode(
8519 self,
8520 encoder_: &mut ___E,
8521 out_: &mut ::core::mem::MaybeUninit<
8522 crate::wire::CapabilityStoreExportResponse<'static>,
8523 >,
8524 _: (),
8525 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8526 ::fidl_next::munge! {
8527 let crate::wire::CapabilityStoreExportResponse {
8528 capability,
8529
8530 } = out_;
8531 }
8532
8533 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
8534
8535 Ok(())
8536 }
8537 }
8538
8539 pub struct CapabilityStoreImportRequest<T0, T1> {
8541 pub id: T0,
8542
8543 pub capability: T1,
8544 }
8545
8546 unsafe impl<___E, T0, T1>
8547 ::fidl_next::Encode<crate::wire::CapabilityStoreImportRequest<'static>, ___E>
8548 for CapabilityStoreImportRequest<T0, T1>
8549 where
8550 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8551 ___E: ::fidl_next::Encoder,
8552 ___E: ::fidl_next::fuchsia::HandleEncoder,
8553 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8554 T1: ::fidl_next::Encode<crate::wire::Capability<'static>, ___E>,
8555 {
8556 #[inline]
8557 fn encode(
8558 self,
8559 encoder_: &mut ___E,
8560 out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreImportRequest<'static>>,
8561 _: (),
8562 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8563 ::fidl_next::munge! {
8564 let crate::wire::CapabilityStoreImportRequest {
8565 id,
8566 capability,
8567
8568 } = out_;
8569 }
8570
8571 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
8572
8573 ::fidl_next::Encode::encode(self.capability, encoder_, capability, ())?;
8574
8575 Ok(())
8576 }
8577 }
8578
8579 pub struct InstanceToken<T0> {
8581 pub token: T0,
8582 }
8583
8584 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::InstanceToken, ___E> for InstanceToken<T0>
8585 where
8586 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8587 ___E: ::fidl_next::fuchsia::HandleEncoder,
8588 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
8589 {
8590 #[inline]
8591 fn encode(
8592 self,
8593 encoder_: &mut ___E,
8594 out_: &mut ::core::mem::MaybeUninit<crate::wire::InstanceToken>,
8595 _: (),
8596 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8597 ::fidl_next::munge! {
8598 let crate::wire::InstanceToken {
8599 token,
8600
8601 } = out_;
8602 }
8603
8604 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
8605
8606 Ok(())
8607 }
8608 }
8609
8610 pub struct DictionaryDrainIteratorGetNextResponse<T0, T1> {
8612 pub items: T0,
8613
8614 pub end_id: T1,
8615 }
8616
8617 unsafe impl<___E, T0, T1>
8618 ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextResponse<'static>, ___E>
8619 for DictionaryDrainIteratorGetNextResponse<T0, T1>
8620 where
8621 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8622 ___E: ::fidl_next::Encoder,
8623 ___E: ::fidl_next::fuchsia::HandleEncoder,
8624 T0: ::fidl_next::Encode<
8625 ::fidl_next::wire::Vector<'static, crate::wire::DictionaryItem<'static>>,
8626 ___E,
8627 >,
8628 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8629 {
8630 #[inline]
8631 fn encode(
8632 self,
8633 encoder_: &mut ___E,
8634 out_: &mut ::core::mem::MaybeUninit<
8635 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
8636 >,
8637 _: (),
8638 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8639 ::fidl_next::munge! {
8640 let crate::wire::DictionaryDrainIteratorGetNextResponse {
8641 items,
8642 end_id,
8643
8644 } = out_;
8645 }
8646
8647 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
8648
8649 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
8650
8651 Ok(())
8652 }
8653 }
8654
8655 pub struct DictionaryOptionalItem<T0, T1> {
8657 pub key: T0,
8658
8659 pub value: T1,
8660 }
8661
8662 unsafe impl<___E, T0, T1>
8663 ::fidl_next::Encode<crate::wire::DictionaryOptionalItem<'static>, ___E>
8664 for DictionaryOptionalItem<T0, T1>
8665 where
8666 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8667 ___E: ::fidl_next::Encoder,
8668 ___E: ::fidl_next::fuchsia::HandleEncoder,
8669 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
8670 T1: ::fidl_next::Encode<
8671 ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
8672 ___E,
8673 >,
8674 {
8675 #[inline]
8676 fn encode(
8677 self,
8678 encoder_: &mut ___E,
8679 out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryOptionalItem<'static>>,
8680 _: (),
8681 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8682 ::fidl_next::munge! {
8683 let crate::wire::DictionaryOptionalItem {
8684 key,
8685 value,
8686
8687 } = out_;
8688 }
8689
8690 ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
8691
8692 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
8693
8694 Ok(())
8695 }
8696 }
8697
8698 pub struct DictionaryEnumerateIteratorGetNextResponse<T0, T1> {
8700 pub items: T0,
8701
8702 pub end_id: T1,
8703 }
8704
8705 unsafe impl<___E, T0, T1>
8706 ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>, ___E>
8707 for DictionaryEnumerateIteratorGetNextResponse<T0, T1>
8708 where
8709 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8710 ___E: ::fidl_next::Encoder,
8711 ___E: ::fidl_next::fuchsia::HandleEncoder,
8712 T0: ::fidl_next::Encode<
8713 ::fidl_next::wire::Vector<'static, crate::wire::DictionaryOptionalItem<'static>>,
8714 ___E,
8715 >,
8716 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
8717 {
8718 #[inline]
8719 fn encode(
8720 self,
8721 encoder_: &mut ___E,
8722 out_: &mut ::core::mem::MaybeUninit<
8723 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
8724 >,
8725 _: (),
8726 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8727 ::fidl_next::munge! {
8728 let crate::wire::DictionaryEnumerateIteratorGetNextResponse {
8729 items,
8730 end_id,
8731
8732 } = out_;
8733 }
8734
8735 ::fidl_next::Encode::encode(self.items, encoder_, items, (128, ()))?;
8736
8737 ::fidl_next::Encode::encode(self.end_id, encoder_, end_id, ())?;
8738
8739 Ok(())
8740 }
8741 }
8742
8743 pub struct DictionaryKeysIteratorGetNextResponse<T0> {
8745 pub keys: T0,
8746 }
8747
8748 unsafe impl<___E, T0>
8749 ::fidl_next::Encode<crate::wire::DictionaryKeysIteratorGetNextResponse<'static>, ___E>
8750 for DictionaryKeysIteratorGetNextResponse<T0>
8751 where
8752 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8753 ___E: ::fidl_next::Encoder,
8754 ___E: ::fidl_next::fuchsia::HandleEncoder,
8755 T0: ::fidl_next::Encode<
8756 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
8757 ___E,
8758 >,
8759 {
8760 #[inline]
8761 fn encode(
8762 self,
8763 encoder_: &mut ___E,
8764 out_: &mut ::core::mem::MaybeUninit<
8765 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
8766 >,
8767 _: (),
8768 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8769 ::fidl_next::munge! {
8770 let crate::wire::DictionaryKeysIteratorGetNextResponse {
8771 keys,
8772
8773 } = out_;
8774 }
8775
8776 ::fidl_next::Encode::encode(self.keys, encoder_, keys, (128, 255))?;
8777
8778 Ok(())
8779 }
8780 }
8781
8782 pub struct ProtocolPayload<T0> {
8784 pub channel: T0,
8785 }
8786
8787 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ProtocolPayload, ___E>
8788 for ProtocolPayload<T0>
8789 where
8790 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8791 ___E: ::fidl_next::fuchsia::HandleEncoder,
8792 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
8793 {
8794 #[inline]
8795 fn encode(
8796 self,
8797 encoder_: &mut ___E,
8798 out_: &mut ::core::mem::MaybeUninit<crate::wire::ProtocolPayload>,
8799 _: (),
8800 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8801 ::fidl_next::munge! {
8802 let crate::wire::ProtocolPayload {
8803 channel,
8804
8805 } = out_;
8806 }
8807
8808 ::fidl_next::Encode::encode(self.channel, encoder_, channel, ())?;
8809
8810 Ok(())
8811 }
8812 }
8813}
8814
8815pub use self::natural::*;
8816
8817#[doc = " Protocol that represents the concept of a \"capability store\", a repository\n for [Capability]s that are held by the component framework runtime.\n\n [CapabilityStore] serves as the main bridge between the component runtime and clients\n that enables them to operate on and exchange [Capability]s. A [CapabilityStore] instance\n contains a set of [Capability]s, each of which has a [CapabilityId] assigned by the client.\n\n Normally, a program would not exchange a [CapabilityStore] or [CapabilityId] with other\n programs -- a [CapabilityStore] connection and its enclosed capabilities are intended to\n be \"local\" to a program. Instead, if a program wishes to exchange a [Capability] with other\n programs, it should [Export] the [Capability] out of the store, send the [Capability] to the\n target program, which can then [Import] the capability into its own store.\n\n [CapabilityStore] is also used to manage capability lifetimes. The lifetime of a capability is\n scoped to the [CapabilityStore] in which it resides; i.e. to drop the [CapabilityStore]\n connections to release the capabilities instead it. In addition, [CapabilityStore] supports a\n [Drop] API to drop an individual [Capability] reference. (Note that it is possible for a\n some capabilities, like [DictionaryRef], to have multiple references, in which case all of\n the references must be dropped for the underlying resource to be released.)\n\n A note about semantics: the [CapabilityStore] APIs do not return [CapabilityId]s, because\n [CapabilityId]s are assigned by the client. Instead, when a method would semantically return\n a capability, this is expressed by taking the destination [CapabilityId] as an output parameter.\n"]
8819#[derive(PartialEq, Debug)]
8820pub struct CapabilityStore;
8821
8822impl ::fidl_next::Discoverable for CapabilityStore {
8823 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.CapabilityStore";
8824}
8825
8826#[cfg(target_os = "fuchsia")]
8827impl ::fidl_next::HasTransport for CapabilityStore {
8828 type Transport = ::fidl_next::fuchsia::zx::Channel;
8829}
8830
8831pub mod capability_store {
8832 pub mod prelude {
8833 pub use crate::{
8834 CapabilityStore, CapabilityStoreClientHandler, CapabilityStoreServerHandler,
8835 capability_store,
8836 };
8837
8838 pub use crate::natural::CapabilityStoreConnectorCreateRequest;
8839
8840 pub use crate::natural::CapabilityStoreConnectorOpenRequest;
8841
8842 pub use crate::natural::CapabilityStoreCreateServiceAggregateRequest;
8843
8844 pub use crate::natural::CapabilityStoreDictionaryCopyRequest;
8845
8846 pub use crate::natural::CapabilityStoreDictionaryCreateRequest;
8847
8848 pub use crate::natural::CapabilityStoreDictionaryDrainRequest;
8849
8850 pub use crate::natural::CapabilityStoreDictionaryEnumerateRequest;
8851
8852 pub use crate::natural::CapabilityStoreDictionaryGetRequest;
8853
8854 pub use crate::natural::CapabilityStoreDictionaryInsertRequest;
8855
8856 pub use crate::natural::CapabilityStoreDictionaryKeysRequest;
8857
8858 pub use crate::natural::CapabilityStoreDictionaryLegacyExportRequest;
8859
8860 pub use crate::natural::CapabilityStoreDictionaryLegacyImportRequest;
8861
8862 pub use crate::natural::CapabilityStoreDictionaryRemoveRequest;
8863
8864 pub use crate::natural::CapabilityStoreDirConnectorCreateRequest;
8865
8866 pub use crate::natural::CapabilityStoreDirConnectorOpenRequest;
8867
8868 pub use crate::natural::CapabilityStoreDropRequest;
8869
8870 pub use crate::natural::CapabilityStoreDuplicateRequest;
8871
8872 pub use crate::natural::CapabilityStoreError;
8873
8874 pub use crate::natural::CapabilityStoreExportRequest;
8875
8876 pub use crate::natural::CapabilityStoreImportRequest;
8877
8878 pub use crate::natural::CapabilityStoreConnectorCreateResponse;
8879
8880 pub use crate::natural::CapabilityStoreConnectorOpenResponse;
8881
8882 pub use crate::natural::CapabilityStoreCreateServiceAggregateResponse;
8883
8884 pub use crate::natural::CapabilityStoreDictionaryCopyResponse;
8885
8886 pub use crate::natural::CapabilityStoreDictionaryCreateResponse;
8887
8888 pub use crate::natural::CapabilityStoreDictionaryDrainResponse;
8889
8890 pub use crate::natural::CapabilityStoreDictionaryEnumerateResponse;
8891
8892 pub use crate::natural::CapabilityStoreDictionaryGetResponse;
8893
8894 pub use crate::natural::CapabilityStoreDictionaryInsertResponse;
8895
8896 pub use crate::natural::CapabilityStoreDictionaryKeysResponse;
8897
8898 pub use crate::natural::CapabilityStoreDictionaryLegacyExportResponse;
8899
8900 pub use crate::natural::CapabilityStoreDictionaryLegacyImportResponse;
8901
8902 pub use crate::natural::CapabilityStoreDictionaryRemoveResponse;
8903
8904 pub use crate::natural::CapabilityStoreDirConnectorCreateResponse;
8905
8906 pub use crate::natural::CapabilityStoreDirConnectorOpenResponse;
8907
8908 pub use crate::natural::CapabilityStoreDropResponse;
8909
8910 pub use crate::natural::CapabilityStoreDuplicateResponse;
8911
8912 pub use crate::natural::CapabilityStoreExportResponse;
8913
8914 pub use crate::natural::CapabilityStoreImportResponse;
8915 }
8916
8917 pub struct Duplicate;
8918
8919 impl ::fidl_next::Method for Duplicate {
8920 const ORDINAL: u64 = 6727592627741008260;
8921 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8922 ::fidl_next::protocol::Flexibility::Flexible;
8923
8924 type Protocol = crate::CapabilityStore;
8925
8926 type Request = crate::wire::CapabilityStoreDuplicateRequest;
8927 }
8928
8929 impl ::fidl_next::TwoWayMethod for Duplicate {
8930 type Response = ::fidl_next::wire::FlexibleResult<
8931 'static,
8932 crate::wire::CapabilityStoreDuplicateResponse,
8933 crate::wire::CapabilityStoreError,
8934 >;
8935 }
8936
8937 impl<___R> ::fidl_next::Respond<___R> for Duplicate {
8938 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
8939
8940 fn respond(response: ___R) -> Self::Output {
8941 ::fidl_next::FlexibleResult::Ok(response)
8942 }
8943 }
8944
8945 impl<___R> ::fidl_next::RespondErr<___R> for Duplicate {
8946 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8947
8948 fn respond_err(response: ___R) -> Self::Output {
8949 ::fidl_next::FlexibleResult::Err(response)
8950 }
8951 }
8952
8953 pub struct Drop;
8954
8955 impl ::fidl_next::Method for Drop {
8956 const ORDINAL: u64 = 753328233834620249;
8957 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8958 ::fidl_next::protocol::Flexibility::Flexible;
8959
8960 type Protocol = crate::CapabilityStore;
8961
8962 type Request = crate::wire::CapabilityStoreDropRequest;
8963 }
8964
8965 impl ::fidl_next::TwoWayMethod for Drop {
8966 type Response = ::fidl_next::wire::FlexibleResult<
8967 'static,
8968 crate::wire::CapabilityStoreDropResponse,
8969 crate::wire::CapabilityStoreError,
8970 >;
8971 }
8972
8973 impl<___R> ::fidl_next::Respond<___R> for Drop {
8974 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
8975
8976 fn respond(response: ___R) -> Self::Output {
8977 ::fidl_next::FlexibleResult::Ok(response)
8978 }
8979 }
8980
8981 impl<___R> ::fidl_next::RespondErr<___R> for Drop {
8982 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8983
8984 fn respond_err(response: ___R) -> Self::Output {
8985 ::fidl_next::FlexibleResult::Err(response)
8986 }
8987 }
8988
8989 pub struct Export;
8990
8991 impl ::fidl_next::Method for Export {
8992 const ORDINAL: u64 = 226159162093533951;
8993 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8994 ::fidl_next::protocol::Flexibility::Flexible;
8995
8996 type Protocol = crate::CapabilityStore;
8997
8998 type Request = crate::wire::CapabilityStoreExportRequest;
8999 }
9000
9001 impl ::fidl_next::TwoWayMethod for Export {
9002 type Response = ::fidl_next::wire::FlexibleResult<
9003 'static,
9004 crate::wire::CapabilityStoreExportResponse<'static>,
9005 crate::wire::CapabilityStoreError,
9006 >;
9007 }
9008
9009 impl<___R> ::fidl_next::Respond<___R> for Export {
9010 type Output = ::fidl_next::FlexibleResult<
9011 crate::generic::CapabilityStoreExportResponse<___R>,
9012 ::fidl_next::util::Never,
9013 >;
9014
9015 fn respond(response: ___R) -> Self::Output {
9016 ::fidl_next::FlexibleResult::Ok(crate::generic::CapabilityStoreExportResponse {
9017 capability: response,
9018 })
9019 }
9020 }
9021
9022 impl<___R> ::fidl_next::RespondErr<___R> for Export {
9023 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9024
9025 fn respond_err(response: ___R) -> Self::Output {
9026 ::fidl_next::FlexibleResult::Err(response)
9027 }
9028 }
9029
9030 pub struct Import;
9031
9032 impl ::fidl_next::Method for Import {
9033 const ORDINAL: u64 = 2276030276116435867;
9034 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9035 ::fidl_next::protocol::Flexibility::Flexible;
9036
9037 type Protocol = crate::CapabilityStore;
9038
9039 type Request = crate::wire::CapabilityStoreImportRequest<'static>;
9040 }
9041
9042 impl ::fidl_next::TwoWayMethod for Import {
9043 type Response = ::fidl_next::wire::FlexibleResult<
9044 'static,
9045 crate::wire::CapabilityStoreImportResponse,
9046 crate::wire::CapabilityStoreError,
9047 >;
9048 }
9049
9050 impl<___R> ::fidl_next::Respond<___R> for Import {
9051 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9052
9053 fn respond(response: ___R) -> Self::Output {
9054 ::fidl_next::FlexibleResult::Ok(response)
9055 }
9056 }
9057
9058 impl<___R> ::fidl_next::RespondErr<___R> for Import {
9059 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9060
9061 fn respond_err(response: ___R) -> Self::Output {
9062 ::fidl_next::FlexibleResult::Err(response)
9063 }
9064 }
9065
9066 pub struct ConnectorCreate;
9067
9068 impl ::fidl_next::Method for ConnectorCreate {
9069 const ORDINAL: u64 = 2979461408102095909;
9070 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9071 ::fidl_next::protocol::Flexibility::Flexible;
9072
9073 type Protocol = crate::CapabilityStore;
9074
9075 type Request = crate::wire::CapabilityStoreConnectorCreateRequest;
9076 }
9077
9078 impl ::fidl_next::TwoWayMethod for ConnectorCreate {
9079 type Response = ::fidl_next::wire::FlexibleResult<
9080 'static,
9081 crate::wire::CapabilityStoreConnectorCreateResponse,
9082 crate::wire::CapabilityStoreError,
9083 >;
9084 }
9085
9086 impl<___R> ::fidl_next::Respond<___R> for ConnectorCreate {
9087 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9088
9089 fn respond(response: ___R) -> Self::Output {
9090 ::fidl_next::FlexibleResult::Ok(response)
9091 }
9092 }
9093
9094 impl<___R> ::fidl_next::RespondErr<___R> for ConnectorCreate {
9095 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9096
9097 fn respond_err(response: ___R) -> Self::Output {
9098 ::fidl_next::FlexibleResult::Err(response)
9099 }
9100 }
9101
9102 pub struct ConnectorOpen;
9103
9104 impl ::fidl_next::Method for ConnectorOpen {
9105 const ORDINAL: u64 = 6016362336453278623;
9106 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9107 ::fidl_next::protocol::Flexibility::Flexible;
9108
9109 type Protocol = crate::CapabilityStore;
9110
9111 type Request = crate::wire::CapabilityStoreConnectorOpenRequest;
9112 }
9113
9114 impl ::fidl_next::TwoWayMethod for ConnectorOpen {
9115 type Response = ::fidl_next::wire::FlexibleResult<
9116 'static,
9117 crate::wire::CapabilityStoreConnectorOpenResponse,
9118 crate::wire::CapabilityStoreError,
9119 >;
9120 }
9121
9122 impl<___R> ::fidl_next::Respond<___R> for ConnectorOpen {
9123 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9124
9125 fn respond(response: ___R) -> Self::Output {
9126 ::fidl_next::FlexibleResult::Ok(response)
9127 }
9128 }
9129
9130 impl<___R> ::fidl_next::RespondErr<___R> for ConnectorOpen {
9131 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9132
9133 fn respond_err(response: ___R) -> Self::Output {
9134 ::fidl_next::FlexibleResult::Err(response)
9135 }
9136 }
9137
9138 pub struct DirConnectorCreate;
9139
9140 impl ::fidl_next::Method for DirConnectorCreate {
9141 const ORDINAL: u64 = 1756747594275428795;
9142 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9143 ::fidl_next::protocol::Flexibility::Flexible;
9144
9145 type Protocol = crate::CapabilityStore;
9146
9147 type Request = crate::wire::CapabilityStoreDirConnectorCreateRequest;
9148 }
9149
9150 impl ::fidl_next::TwoWayMethod for DirConnectorCreate {
9151 type Response = ::fidl_next::wire::FlexibleResult<
9152 'static,
9153 crate::wire::CapabilityStoreDirConnectorCreateResponse,
9154 crate::wire::CapabilityStoreError,
9155 >;
9156 }
9157
9158 impl<___R> ::fidl_next::Respond<___R> for DirConnectorCreate {
9159 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9160
9161 fn respond(response: ___R) -> Self::Output {
9162 ::fidl_next::FlexibleResult::Ok(response)
9163 }
9164 }
9165
9166 impl<___R> ::fidl_next::RespondErr<___R> for DirConnectorCreate {
9167 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9168
9169 fn respond_err(response: ___R) -> Self::Output {
9170 ::fidl_next::FlexibleResult::Err(response)
9171 }
9172 }
9173
9174 pub struct DirConnectorOpen;
9175
9176 impl ::fidl_next::Method for DirConnectorOpen {
9177 const ORDINAL: u64 = 6219704004220369153;
9178 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9179 ::fidl_next::protocol::Flexibility::Flexible;
9180
9181 type Protocol = crate::CapabilityStore;
9182
9183 type Request = crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>;
9184 }
9185
9186 impl ::fidl_next::TwoWayMethod for DirConnectorOpen {
9187 type Response = ::fidl_next::wire::FlexibleResult<
9188 'static,
9189 crate::wire::CapabilityStoreDirConnectorOpenResponse,
9190 crate::wire::CapabilityStoreError,
9191 >;
9192 }
9193
9194 impl<___R> ::fidl_next::Respond<___R> for DirConnectorOpen {
9195 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9196
9197 fn respond(response: ___R) -> Self::Output {
9198 ::fidl_next::FlexibleResult::Ok(response)
9199 }
9200 }
9201
9202 impl<___R> ::fidl_next::RespondErr<___R> for DirConnectorOpen {
9203 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9204
9205 fn respond_err(response: ___R) -> Self::Output {
9206 ::fidl_next::FlexibleResult::Err(response)
9207 }
9208 }
9209
9210 pub struct DictionaryCreate;
9211
9212 impl ::fidl_next::Method for DictionaryCreate {
9213 const ORDINAL: u64 = 7608770958894948499;
9214 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9215 ::fidl_next::protocol::Flexibility::Flexible;
9216
9217 type Protocol = crate::CapabilityStore;
9218
9219 type Request = crate::wire::CapabilityStoreDictionaryCreateRequest;
9220 }
9221
9222 impl ::fidl_next::TwoWayMethod for DictionaryCreate {
9223 type Response = ::fidl_next::wire::FlexibleResult<
9224 'static,
9225 crate::wire::CapabilityStoreDictionaryCreateResponse,
9226 crate::wire::CapabilityStoreError,
9227 >;
9228 }
9229
9230 impl<___R> ::fidl_next::Respond<___R> for DictionaryCreate {
9231 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9232
9233 fn respond(response: ___R) -> Self::Output {
9234 ::fidl_next::FlexibleResult::Ok(response)
9235 }
9236 }
9237
9238 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryCreate {
9239 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9240
9241 fn respond_err(response: ___R) -> Self::Output {
9242 ::fidl_next::FlexibleResult::Err(response)
9243 }
9244 }
9245
9246 pub struct DictionaryLegacyImport;
9247
9248 impl ::fidl_next::Method for DictionaryLegacyImport {
9249 const ORDINAL: u64 = 8285893703432012383;
9250 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9251 ::fidl_next::protocol::Flexibility::Flexible;
9252
9253 type Protocol = crate::CapabilityStore;
9254
9255 type Request = crate::wire::CapabilityStoreDictionaryLegacyImportRequest;
9256 }
9257
9258 impl ::fidl_next::TwoWayMethod for DictionaryLegacyImport {
9259 type Response = ::fidl_next::wire::FlexibleResult<
9260 'static,
9261 crate::wire::CapabilityStoreDictionaryLegacyImportResponse,
9262 crate::wire::CapabilityStoreError,
9263 >;
9264 }
9265
9266 impl<___R> ::fidl_next::Respond<___R> for DictionaryLegacyImport {
9267 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9268
9269 fn respond(response: ___R) -> Self::Output {
9270 ::fidl_next::FlexibleResult::Ok(response)
9271 }
9272 }
9273
9274 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryLegacyImport {
9275 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9276
9277 fn respond_err(response: ___R) -> Self::Output {
9278 ::fidl_next::FlexibleResult::Err(response)
9279 }
9280 }
9281
9282 pub struct DictionaryLegacyExport;
9283
9284 impl ::fidl_next::Method for DictionaryLegacyExport {
9285 const ORDINAL: u64 = 4647175832683306445;
9286 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9287 ::fidl_next::protocol::Flexibility::Flexible;
9288
9289 type Protocol = crate::CapabilityStore;
9290
9291 type Request = crate::wire::CapabilityStoreDictionaryLegacyExportRequest;
9292 }
9293
9294 impl ::fidl_next::TwoWayMethod for DictionaryLegacyExport {
9295 type Response = ::fidl_next::wire::FlexibleResult<
9296 'static,
9297 crate::wire::CapabilityStoreDictionaryLegacyExportResponse,
9298 crate::wire::CapabilityStoreError,
9299 >;
9300 }
9301
9302 impl<___R> ::fidl_next::Respond<___R> for DictionaryLegacyExport {
9303 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9304
9305 fn respond(response: ___R) -> Self::Output {
9306 ::fidl_next::FlexibleResult::Ok(response)
9307 }
9308 }
9309
9310 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryLegacyExport {
9311 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9312
9313 fn respond_err(response: ___R) -> Self::Output {
9314 ::fidl_next::FlexibleResult::Err(response)
9315 }
9316 }
9317
9318 pub struct DictionaryInsert;
9319
9320 impl ::fidl_next::Method for DictionaryInsert {
9321 const ORDINAL: u64 = 8575443262986538023;
9322 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9323 ::fidl_next::protocol::Flexibility::Flexible;
9324
9325 type Protocol = crate::CapabilityStore;
9326
9327 type Request = crate::wire::CapabilityStoreDictionaryInsertRequest<'static>;
9328 }
9329
9330 impl ::fidl_next::TwoWayMethod for DictionaryInsert {
9331 type Response = ::fidl_next::wire::FlexibleResult<
9332 'static,
9333 crate::wire::CapabilityStoreDictionaryInsertResponse,
9334 crate::wire::CapabilityStoreError,
9335 >;
9336 }
9337
9338 impl<___R> ::fidl_next::Respond<___R> for DictionaryInsert {
9339 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9340
9341 fn respond(response: ___R) -> Self::Output {
9342 ::fidl_next::FlexibleResult::Ok(response)
9343 }
9344 }
9345
9346 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryInsert {
9347 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9348
9349 fn respond_err(response: ___R) -> Self::Output {
9350 ::fidl_next::FlexibleResult::Err(response)
9351 }
9352 }
9353
9354 pub struct DictionaryGet;
9355
9356 impl ::fidl_next::Method for DictionaryGet {
9357 const ORDINAL: u64 = 5592951026866236882;
9358 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9359 ::fidl_next::protocol::Flexibility::Flexible;
9360
9361 type Protocol = crate::CapabilityStore;
9362
9363 type Request = crate::wire::CapabilityStoreDictionaryGetRequest<'static>;
9364 }
9365
9366 impl ::fidl_next::TwoWayMethod for DictionaryGet {
9367 type Response = ::fidl_next::wire::FlexibleResult<
9368 'static,
9369 crate::wire::CapabilityStoreDictionaryGetResponse,
9370 crate::wire::CapabilityStoreError,
9371 >;
9372 }
9373
9374 impl<___R> ::fidl_next::Respond<___R> for DictionaryGet {
9375 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9376
9377 fn respond(response: ___R) -> Self::Output {
9378 ::fidl_next::FlexibleResult::Ok(response)
9379 }
9380 }
9381
9382 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryGet {
9383 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9384
9385 fn respond_err(response: ___R) -> Self::Output {
9386 ::fidl_next::FlexibleResult::Err(response)
9387 }
9388 }
9389
9390 pub struct DictionaryRemove;
9391
9392 impl ::fidl_next::Method for DictionaryRemove {
9393 const ORDINAL: u64 = 343892214579320051;
9394 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9395 ::fidl_next::protocol::Flexibility::Flexible;
9396
9397 type Protocol = crate::CapabilityStore;
9398
9399 type Request = crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>;
9400 }
9401
9402 impl ::fidl_next::TwoWayMethod for DictionaryRemove {
9403 type Response = ::fidl_next::wire::FlexibleResult<
9404 'static,
9405 crate::wire::CapabilityStoreDictionaryRemoveResponse,
9406 crate::wire::CapabilityStoreError,
9407 >;
9408 }
9409
9410 impl<___R> ::fidl_next::Respond<___R> for DictionaryRemove {
9411 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9412
9413 fn respond(response: ___R) -> Self::Output {
9414 ::fidl_next::FlexibleResult::Ok(response)
9415 }
9416 }
9417
9418 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryRemove {
9419 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9420
9421 fn respond_err(response: ___R) -> Self::Output {
9422 ::fidl_next::FlexibleResult::Err(response)
9423 }
9424 }
9425
9426 pub struct DictionaryCopy;
9427
9428 impl ::fidl_next::Method for DictionaryCopy {
9429 const ORDINAL: u64 = 3977783339739362383;
9430 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9431 ::fidl_next::protocol::Flexibility::Flexible;
9432
9433 type Protocol = crate::CapabilityStore;
9434
9435 type Request = crate::wire::CapabilityStoreDictionaryCopyRequest;
9436 }
9437
9438 impl ::fidl_next::TwoWayMethod for DictionaryCopy {
9439 type Response = ::fidl_next::wire::FlexibleResult<
9440 'static,
9441 crate::wire::CapabilityStoreDictionaryCopyResponse,
9442 crate::wire::CapabilityStoreError,
9443 >;
9444 }
9445
9446 impl<___R> ::fidl_next::Respond<___R> for DictionaryCopy {
9447 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9448
9449 fn respond(response: ___R) -> Self::Output {
9450 ::fidl_next::FlexibleResult::Ok(response)
9451 }
9452 }
9453
9454 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryCopy {
9455 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9456
9457 fn respond_err(response: ___R) -> Self::Output {
9458 ::fidl_next::FlexibleResult::Err(response)
9459 }
9460 }
9461
9462 pub struct DictionaryKeys;
9463
9464 impl ::fidl_next::Method for DictionaryKeys {
9465 const ORDINAL: u64 = 597577248872787102;
9466 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9467 ::fidl_next::protocol::Flexibility::Flexible;
9468
9469 type Protocol = crate::CapabilityStore;
9470
9471 type Request = crate::wire::CapabilityStoreDictionaryKeysRequest;
9472 }
9473
9474 impl ::fidl_next::TwoWayMethod for DictionaryKeys {
9475 type Response = ::fidl_next::wire::FlexibleResult<
9476 'static,
9477 crate::wire::CapabilityStoreDictionaryKeysResponse,
9478 crate::wire::CapabilityStoreError,
9479 >;
9480 }
9481
9482 impl<___R> ::fidl_next::Respond<___R> for DictionaryKeys {
9483 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9484
9485 fn respond(response: ___R) -> Self::Output {
9486 ::fidl_next::FlexibleResult::Ok(response)
9487 }
9488 }
9489
9490 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryKeys {
9491 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9492
9493 fn respond_err(response: ___R) -> Self::Output {
9494 ::fidl_next::FlexibleResult::Err(response)
9495 }
9496 }
9497
9498 pub struct DictionaryEnumerate;
9499
9500 impl ::fidl_next::Method for DictionaryEnumerate {
9501 const ORDINAL: u64 = 964467096271472193;
9502 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9503 ::fidl_next::protocol::Flexibility::Flexible;
9504
9505 type Protocol = crate::CapabilityStore;
9506
9507 type Request = crate::wire::CapabilityStoreDictionaryEnumerateRequest;
9508 }
9509
9510 impl ::fidl_next::TwoWayMethod for DictionaryEnumerate {
9511 type Response = ::fidl_next::wire::FlexibleResult<
9512 'static,
9513 crate::wire::CapabilityStoreDictionaryEnumerateResponse,
9514 crate::wire::CapabilityStoreError,
9515 >;
9516 }
9517
9518 impl<___R> ::fidl_next::Respond<___R> for DictionaryEnumerate {
9519 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9520
9521 fn respond(response: ___R) -> Self::Output {
9522 ::fidl_next::FlexibleResult::Ok(response)
9523 }
9524 }
9525
9526 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryEnumerate {
9527 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9528
9529 fn respond_err(response: ___R) -> Self::Output {
9530 ::fidl_next::FlexibleResult::Err(response)
9531 }
9532 }
9533
9534 pub struct DictionaryDrain;
9535
9536 impl ::fidl_next::Method for DictionaryDrain {
9537 const ORDINAL: u64 = 2928364469569621208;
9538 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9539 ::fidl_next::protocol::Flexibility::Flexible;
9540
9541 type Protocol = crate::CapabilityStore;
9542
9543 type Request = crate::wire::CapabilityStoreDictionaryDrainRequest;
9544 }
9545
9546 impl ::fidl_next::TwoWayMethod for DictionaryDrain {
9547 type Response = ::fidl_next::wire::FlexibleResult<
9548 'static,
9549 crate::wire::CapabilityStoreDictionaryDrainResponse,
9550 crate::wire::CapabilityStoreError,
9551 >;
9552 }
9553
9554 impl<___R> ::fidl_next::Respond<___R> for DictionaryDrain {
9555 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
9556
9557 fn respond(response: ___R) -> Self::Output {
9558 ::fidl_next::FlexibleResult::Ok(response)
9559 }
9560 }
9561
9562 impl<___R> ::fidl_next::RespondErr<___R> for DictionaryDrain {
9563 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9564
9565 fn respond_err(response: ___R) -> Self::Output {
9566 ::fidl_next::FlexibleResult::Err(response)
9567 }
9568 }
9569
9570 pub struct CreateServiceAggregate;
9571
9572 impl ::fidl_next::Method for CreateServiceAggregate {
9573 const ORDINAL: u64 = 5009147843253209178;
9574 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9575 ::fidl_next::protocol::Flexibility::Flexible;
9576
9577 type Protocol = crate::CapabilityStore;
9578
9579 type Request = crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>;
9580 }
9581
9582 impl ::fidl_next::TwoWayMethod for CreateServiceAggregate {
9583 type Response = ::fidl_next::wire::FlexibleResult<
9584 'static,
9585 crate::wire::CapabilityStoreCreateServiceAggregateResponse,
9586 crate::wire::CapabilityStoreError,
9587 >;
9588 }
9589
9590 impl<___R> ::fidl_next::Respond<___R> for CreateServiceAggregate {
9591 type Output = ::fidl_next::FlexibleResult<
9592 crate::generic::CapabilityStoreCreateServiceAggregateResponse<___R>,
9593 ::fidl_next::util::Never,
9594 >;
9595
9596 fn respond(response: ___R) -> Self::Output {
9597 ::fidl_next::FlexibleResult::Ok(
9598 crate::generic::CapabilityStoreCreateServiceAggregateResponse {
9599 aggregate_dir_connector: response,
9600 },
9601 )
9602 }
9603 }
9604
9605 impl<___R> ::fidl_next::RespondErr<___R> for CreateServiceAggregate {
9606 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
9607
9608 fn respond_err(response: ___R) -> Self::Output {
9609 ::fidl_next::FlexibleResult::Err(response)
9610 }
9611 }
9612
9613 mod ___detail {
9614 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::CapabilityStore
9615 where
9616 ___T: ::fidl_next::Transport,
9617 {
9618 type Client = CapabilityStoreClient<___T>;
9619 type Server = CapabilityStoreServer<___T>;
9620 }
9621
9622 #[repr(transparent)]
9624 pub struct CapabilityStoreClient<___T: ::fidl_next::Transport> {
9625 #[allow(dead_code)]
9626 client: ::fidl_next::protocol::Client<___T>,
9627 }
9628
9629 impl<___T> CapabilityStoreClient<___T>
9630 where
9631 ___T: ::fidl_next::Transport,
9632 {
9633 #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
9634 pub fn duplicate(
9635 &self,
9636
9637 id: impl ::fidl_next::Encode<
9638 ::fidl_next::wire::Uint64,
9639 <___T as ::fidl_next::Transport>::SendBuffer,
9640 >,
9641
9642 dest_id: impl ::fidl_next::Encode<
9643 ::fidl_next::wire::Uint64,
9644 <___T as ::fidl_next::Transport>::SendBuffer,
9645 >,
9646 ) -> ::fidl_next::TwoWayFuture<'_, super::Duplicate, ___T>
9647 where
9648 <___T as ::fidl_next::Transport>::SendBuffer:
9649 ::fidl_next::encoder::InternalHandleEncoder,
9650 {
9651 self.duplicate_with(crate::generic::CapabilityStoreDuplicateRequest { id, dest_id })
9652 }
9653
9654 #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
9655 pub fn duplicate_with<___R>(
9656 &self,
9657 request: ___R,
9658 ) -> ::fidl_next::TwoWayFuture<'_, super::Duplicate, ___T>
9659 where
9660 ___R: ::fidl_next::Encode<
9661 crate::wire::CapabilityStoreDuplicateRequest,
9662 <___T as ::fidl_next::Transport>::SendBuffer,
9663 >,
9664 {
9665 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9666 6727592627741008260,
9667 <super::Duplicate as ::fidl_next::Method>::FLEXIBILITY,
9668 request,
9669 ))
9670 }
9671
9672 #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
9673 pub fn drop(
9674 &self,
9675
9676 id: impl ::fidl_next::Encode<
9677 ::fidl_next::wire::Uint64,
9678 <___T as ::fidl_next::Transport>::SendBuffer,
9679 >,
9680 ) -> ::fidl_next::TwoWayFuture<'_, super::Drop, ___T>
9681 where
9682 <___T as ::fidl_next::Transport>::SendBuffer:
9683 ::fidl_next::encoder::InternalHandleEncoder,
9684 {
9685 self.drop_with(crate::generic::CapabilityStoreDropRequest { id })
9686 }
9687
9688 #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
9689 pub fn drop_with<___R>(
9690 &self,
9691 request: ___R,
9692 ) -> ::fidl_next::TwoWayFuture<'_, super::Drop, ___T>
9693 where
9694 ___R: ::fidl_next::Encode<
9695 crate::wire::CapabilityStoreDropRequest,
9696 <___T as ::fidl_next::Transport>::SendBuffer,
9697 >,
9698 {
9699 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9700 753328233834620249,
9701 <super::Drop as ::fidl_next::Method>::FLEXIBILITY,
9702 request,
9703 ))
9704 }
9705
9706 #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
9707 pub fn export(
9708 &self,
9709
9710 id: impl ::fidl_next::Encode<
9711 ::fidl_next::wire::Uint64,
9712 <___T as ::fidl_next::Transport>::SendBuffer,
9713 >,
9714 ) -> ::fidl_next::TwoWayFuture<'_, super::Export, ___T>
9715 where
9716 <___T as ::fidl_next::Transport>::SendBuffer:
9717 ::fidl_next::encoder::InternalHandleEncoder,
9718 {
9719 self.export_with(crate::generic::CapabilityStoreExportRequest { id })
9720 }
9721
9722 #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
9723 pub fn export_with<___R>(
9724 &self,
9725 request: ___R,
9726 ) -> ::fidl_next::TwoWayFuture<'_, super::Export, ___T>
9727 where
9728 ___R: ::fidl_next::Encode<
9729 crate::wire::CapabilityStoreExportRequest,
9730 <___T as ::fidl_next::Transport>::SendBuffer,
9731 >,
9732 {
9733 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9734 226159162093533951,
9735 <super::Export as ::fidl_next::Method>::FLEXIBILITY,
9736 request,
9737 ))
9738 }
9739
9740 #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
9741 pub fn import(
9742 &self,
9743
9744 id: impl ::fidl_next::Encode<
9745 ::fidl_next::wire::Uint64,
9746 <___T as ::fidl_next::Transport>::SendBuffer,
9747 >,
9748
9749 capability: impl ::fidl_next::Encode<
9750 crate::wire::Capability<'static>,
9751 <___T as ::fidl_next::Transport>::SendBuffer,
9752 >,
9753 ) -> ::fidl_next::TwoWayFuture<'_, super::Import, ___T>
9754 where
9755 <___T as ::fidl_next::Transport>::SendBuffer:
9756 ::fidl_next::encoder::InternalHandleEncoder,
9757 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9758 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9759 {
9760 self.import_with(crate::generic::CapabilityStoreImportRequest { id, capability })
9761 }
9762
9763 #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
9764 pub fn import_with<___R>(
9765 &self,
9766 request: ___R,
9767 ) -> ::fidl_next::TwoWayFuture<'_, super::Import, ___T>
9768 where
9769 ___R: ::fidl_next::Encode<
9770 crate::wire::CapabilityStoreImportRequest<'static>,
9771 <___T as ::fidl_next::Transport>::SendBuffer,
9772 >,
9773 {
9774 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9775 2276030276116435867,
9776 <super::Import as ::fidl_next::Method>::FLEXIBILITY,
9777 request,
9778 ))
9779 }
9780
9781 #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
9782 pub fn connector_create(
9783 &self,
9784
9785 id: impl ::fidl_next::Encode<
9786 ::fidl_next::wire::Uint64,
9787 <___T as ::fidl_next::Transport>::SendBuffer,
9788 >,
9789
9790 receiver: impl ::fidl_next::Encode<
9791 ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::wire::fuchsia::Channel>,
9792 <___T as ::fidl_next::Transport>::SendBuffer,
9793 >,
9794 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorCreate, ___T>
9795 where
9796 <___T as ::fidl_next::Transport>::SendBuffer:
9797 ::fidl_next::encoder::InternalHandleEncoder,
9798 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9799 {
9800 self.connector_create_with(crate::generic::CapabilityStoreConnectorCreateRequest {
9801 id,
9802
9803 receiver,
9804 })
9805 }
9806
9807 #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
9808 pub fn connector_create_with<___R>(
9809 &self,
9810 request: ___R,
9811 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorCreate, ___T>
9812 where
9813 ___R: ::fidl_next::Encode<
9814 crate::wire::CapabilityStoreConnectorCreateRequest,
9815 <___T as ::fidl_next::Transport>::SendBuffer,
9816 >,
9817 {
9818 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9819 2979461408102095909,
9820 <super::ConnectorCreate as ::fidl_next::Method>::FLEXIBILITY,
9821 request,
9822 ))
9823 }
9824
9825 #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
9826 pub fn connector_open(
9827 &self,
9828
9829 id: impl ::fidl_next::Encode<
9830 ::fidl_next::wire::Uint64,
9831 <___T as ::fidl_next::Transport>::SendBuffer,
9832 >,
9833
9834 server_end: impl ::fidl_next::Encode<
9835 ::fidl_next::wire::fuchsia::Channel,
9836 <___T as ::fidl_next::Transport>::SendBuffer,
9837 >,
9838 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorOpen, ___T>
9839 where
9840 <___T as ::fidl_next::Transport>::SendBuffer:
9841 ::fidl_next::encoder::InternalHandleEncoder,
9842 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9843 {
9844 self.connector_open_with(crate::generic::CapabilityStoreConnectorOpenRequest {
9845 id,
9846
9847 server_end,
9848 })
9849 }
9850
9851 #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
9852 pub fn connector_open_with<___R>(
9853 &self,
9854 request: ___R,
9855 ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorOpen, ___T>
9856 where
9857 ___R: ::fidl_next::Encode<
9858 crate::wire::CapabilityStoreConnectorOpenRequest,
9859 <___T as ::fidl_next::Transport>::SendBuffer,
9860 >,
9861 {
9862 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9863 6016362336453278623,
9864 <super::ConnectorOpen as ::fidl_next::Method>::FLEXIBILITY,
9865 request,
9866 ))
9867 }
9868
9869 #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
9870 pub fn dir_connector_create(
9871 &self,
9872
9873 id: impl ::fidl_next::Encode<
9874 ::fidl_next::wire::Uint64,
9875 <___T as ::fidl_next::Transport>::SendBuffer,
9876 >,
9877
9878 receiver: impl ::fidl_next::Encode<
9879 ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::wire::fuchsia::Channel>,
9880 <___T as ::fidl_next::Transport>::SendBuffer,
9881 >,
9882 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorCreate, ___T>
9883 where
9884 <___T as ::fidl_next::Transport>::SendBuffer:
9885 ::fidl_next::encoder::InternalHandleEncoder,
9886 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9887 {
9888 self.dir_connector_create_with(
9889 crate::generic::CapabilityStoreDirConnectorCreateRequest { id, receiver },
9890 )
9891 }
9892
9893 #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
9894 pub fn dir_connector_create_with<___R>(
9895 &self,
9896 request: ___R,
9897 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorCreate, ___T>
9898 where
9899 ___R: ::fidl_next::Encode<
9900 crate::wire::CapabilityStoreDirConnectorCreateRequest,
9901 <___T as ::fidl_next::Transport>::SendBuffer,
9902 >,
9903 {
9904 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9905 1756747594275428795,
9906 <super::DirConnectorCreate as ::fidl_next::Method>::FLEXIBILITY,
9907 request,
9908 ))
9909 }
9910
9911 #[doc = " Open a connection from the provided [DirConnector] capability that will\n be dispatched to the [DirReceiver] on the other end. The `id` and\n `server_end` arguments are required, and the `flags` and `path`\n arguments are optional (a path of `.` will be used if one is not\n otherwise set).\n\n If there was an error making the connection, it will be reported as a zx.Status\n epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
9912 pub fn dir_connector_open_with<___R>(
9913 &self,
9914 request: ___R,
9915 ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorOpen, ___T>
9916 where
9917 ___R: ::fidl_next::Encode<
9918 crate::wire::CapabilityStoreDirConnectorOpenRequest<'static>,
9919 <___T as ::fidl_next::Transport>::SendBuffer,
9920 >,
9921 {
9922 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9923 6219704004220369153,
9924 <super::DirConnectorOpen as ::fidl_next::Method>::FLEXIBILITY,
9925 request,
9926 ))
9927 }
9928
9929 #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
9930 pub fn dictionary_create(
9931 &self,
9932
9933 id: impl ::fidl_next::Encode<
9934 ::fidl_next::wire::Uint64,
9935 <___T as ::fidl_next::Transport>::SendBuffer,
9936 >,
9937 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCreate, ___T>
9938 where
9939 <___T as ::fidl_next::Transport>::SendBuffer:
9940 ::fidl_next::encoder::InternalHandleEncoder,
9941 {
9942 self.dictionary_create_with(
9943 crate::generic::CapabilityStoreDictionaryCreateRequest { id },
9944 )
9945 }
9946
9947 #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
9948 pub fn dictionary_create_with<___R>(
9949 &self,
9950 request: ___R,
9951 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCreate, ___T>
9952 where
9953 ___R: ::fidl_next::Encode<
9954 crate::wire::CapabilityStoreDictionaryCreateRequest,
9955 <___T as ::fidl_next::Transport>::SendBuffer,
9956 >,
9957 {
9958 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9959 7608770958894948499,
9960 <super::DictionaryCreate as ::fidl_next::Method>::FLEXIBILITY,
9961 request,
9962 ))
9963 }
9964
9965 #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
9966 pub fn dictionary_legacy_import(
9967 &self,
9968
9969 id: impl ::fidl_next::Encode<
9970 ::fidl_next::wire::Uint64,
9971 <___T as ::fidl_next::Transport>::SendBuffer,
9972 >,
9973
9974 client_end: impl ::fidl_next::Encode<
9975 ::fidl_next::wire::fuchsia::Channel,
9976 <___T as ::fidl_next::Transport>::SendBuffer,
9977 >,
9978 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyImport, ___T>
9979 where
9980 <___T as ::fidl_next::Transport>::SendBuffer:
9981 ::fidl_next::encoder::InternalHandleEncoder,
9982 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9983 {
9984 self.dictionary_legacy_import_with(
9985 crate::generic::CapabilityStoreDictionaryLegacyImportRequest { id, client_end },
9986 )
9987 }
9988
9989 #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
9990 pub fn dictionary_legacy_import_with<___R>(
9991 &self,
9992 request: ___R,
9993 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyImport, ___T>
9994 where
9995 ___R: ::fidl_next::Encode<
9996 crate::wire::CapabilityStoreDictionaryLegacyImportRequest,
9997 <___T as ::fidl_next::Transport>::SendBuffer,
9998 >,
9999 {
10000 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10001 8285893703432012383,
10002 <super::DictionaryLegacyImport as ::fidl_next::Method>::FLEXIBILITY,
10003 request,
10004 ))
10005 }
10006
10007 #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10008 pub fn dictionary_legacy_export(
10009 &self,
10010
10011 id: impl ::fidl_next::Encode<
10012 ::fidl_next::wire::Uint64,
10013 <___T as ::fidl_next::Transport>::SendBuffer,
10014 >,
10015
10016 server_end: impl ::fidl_next::Encode<
10017 ::fidl_next::wire::fuchsia::Channel,
10018 <___T as ::fidl_next::Transport>::SendBuffer,
10019 >,
10020 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyExport, ___T>
10021 where
10022 <___T as ::fidl_next::Transport>::SendBuffer:
10023 ::fidl_next::encoder::InternalHandleEncoder,
10024 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10025 {
10026 self.dictionary_legacy_export_with(
10027 crate::generic::CapabilityStoreDictionaryLegacyExportRequest { id, server_end },
10028 )
10029 }
10030
10031 #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10032 pub fn dictionary_legacy_export_with<___R>(
10033 &self,
10034 request: ___R,
10035 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyExport, ___T>
10036 where
10037 ___R: ::fidl_next::Encode<
10038 crate::wire::CapabilityStoreDictionaryLegacyExportRequest,
10039 <___T as ::fidl_next::Transport>::SendBuffer,
10040 >,
10041 {
10042 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10043 4647175832683306445,
10044 <super::DictionaryLegacyExport as ::fidl_next::Method>::FLEXIBILITY,
10045 request,
10046 ))
10047 }
10048
10049 #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
10050 pub fn dictionary_insert(
10051 &self,
10052
10053 id: impl ::fidl_next::Encode<
10054 ::fidl_next::wire::Uint64,
10055 <___T as ::fidl_next::Transport>::SendBuffer,
10056 >,
10057
10058 item: impl ::fidl_next::Encode<
10059 crate::wire::DictionaryItem<'static>,
10060 <___T as ::fidl_next::Transport>::SendBuffer,
10061 >,
10062 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryInsert, ___T>
10063 where
10064 <___T as ::fidl_next::Transport>::SendBuffer:
10065 ::fidl_next::encoder::InternalHandleEncoder,
10066 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10067 {
10068 self.dictionary_insert_with(
10069 crate::generic::CapabilityStoreDictionaryInsertRequest { id, item },
10070 )
10071 }
10072
10073 #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
10074 pub fn dictionary_insert_with<___R>(
10075 &self,
10076 request: ___R,
10077 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryInsert, ___T>
10078 where
10079 ___R: ::fidl_next::Encode<
10080 crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
10081 <___T as ::fidl_next::Transport>::SendBuffer,
10082 >,
10083 {
10084 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10085 8575443262986538023,
10086 <super::DictionaryInsert as ::fidl_next::Method>::FLEXIBILITY,
10087 request,
10088 ))
10089 }
10090
10091 #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
10092 pub fn dictionary_get(
10093 &self,
10094
10095 id: impl ::fidl_next::Encode<
10096 ::fidl_next::wire::Uint64,
10097 <___T as ::fidl_next::Transport>::SendBuffer,
10098 >,
10099
10100 key: impl ::fidl_next::Encode<
10101 ::fidl_next::wire::String<'static>,
10102 <___T as ::fidl_next::Transport>::SendBuffer,
10103 >,
10104
10105 dest_id: impl ::fidl_next::Encode<
10106 ::fidl_next::wire::Uint64,
10107 <___T as ::fidl_next::Transport>::SendBuffer,
10108 >,
10109 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryGet, ___T>
10110 where
10111 <___T as ::fidl_next::Transport>::SendBuffer:
10112 ::fidl_next::encoder::InternalHandleEncoder,
10113 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10114 {
10115 self.dictionary_get_with(crate::generic::CapabilityStoreDictionaryGetRequest {
10116 id,
10117
10118 key,
10119
10120 dest_id,
10121 })
10122 }
10123
10124 #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
10125 pub fn dictionary_get_with<___R>(
10126 &self,
10127 request: ___R,
10128 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryGet, ___T>
10129 where
10130 ___R: ::fidl_next::Encode<
10131 crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
10132 <___T as ::fidl_next::Transport>::SendBuffer,
10133 >,
10134 {
10135 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10136 5592951026866236882,
10137 <super::DictionaryGet as ::fidl_next::Method>::FLEXIBILITY,
10138 request,
10139 ))
10140 }
10141
10142 #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
10143 pub fn dictionary_remove(
10144 &self,
10145
10146 id: impl ::fidl_next::Encode<
10147 ::fidl_next::wire::Uint64,
10148 <___T as ::fidl_next::Transport>::SendBuffer,
10149 >,
10150
10151 key: impl ::fidl_next::Encode<
10152 ::fidl_next::wire::String<'static>,
10153 <___T as ::fidl_next::Transport>::SendBuffer,
10154 >,
10155
10156 dest_id: impl ::fidl_next::Encode<
10157 ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
10158 <___T as ::fidl_next::Transport>::SendBuffer,
10159 >,
10160 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryRemove, ___T>
10161 where
10162 <___T as ::fidl_next::Transport>::SendBuffer:
10163 ::fidl_next::encoder::InternalHandleEncoder,
10164 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10165 {
10166 self.dictionary_remove_with(
10167 crate::generic::CapabilityStoreDictionaryRemoveRequest { id, key, dest_id },
10168 )
10169 }
10170
10171 #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
10172 pub fn dictionary_remove_with<___R>(
10173 &self,
10174 request: ___R,
10175 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryRemove, ___T>
10176 where
10177 ___R: ::fidl_next::Encode<
10178 crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
10179 <___T as ::fidl_next::Transport>::SendBuffer,
10180 >,
10181 {
10182 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10183 343892214579320051,
10184 <super::DictionaryRemove as ::fidl_next::Method>::FLEXIBILITY,
10185 request,
10186 ))
10187 }
10188
10189 #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
10190 pub fn dictionary_copy(
10191 &self,
10192
10193 id: impl ::fidl_next::Encode<
10194 ::fidl_next::wire::Uint64,
10195 <___T as ::fidl_next::Transport>::SendBuffer,
10196 >,
10197
10198 dest_id: impl ::fidl_next::Encode<
10199 ::fidl_next::wire::Uint64,
10200 <___T as ::fidl_next::Transport>::SendBuffer,
10201 >,
10202 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCopy, ___T>
10203 where
10204 <___T as ::fidl_next::Transport>::SendBuffer:
10205 ::fidl_next::encoder::InternalHandleEncoder,
10206 {
10207 self.dictionary_copy_with(crate::generic::CapabilityStoreDictionaryCopyRequest {
10208 id,
10209
10210 dest_id,
10211 })
10212 }
10213
10214 #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
10215 pub fn dictionary_copy_with<___R>(
10216 &self,
10217 request: ___R,
10218 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCopy, ___T>
10219 where
10220 ___R: ::fidl_next::Encode<
10221 crate::wire::CapabilityStoreDictionaryCopyRequest,
10222 <___T as ::fidl_next::Transport>::SendBuffer,
10223 >,
10224 {
10225 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10226 3977783339739362383,
10227 <super::DictionaryCopy as ::fidl_next::Method>::FLEXIBILITY,
10228 request,
10229 ))
10230 }
10231
10232 #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10233 pub fn dictionary_keys(
10234 &self,
10235
10236 id: impl ::fidl_next::Encode<
10237 ::fidl_next::wire::Uint64,
10238 <___T as ::fidl_next::Transport>::SendBuffer,
10239 >,
10240
10241 iterator: impl ::fidl_next::Encode<
10242 ::fidl_next::ServerEnd<
10243 crate::DictionaryKeysIterator,
10244 ::fidl_next::wire::fuchsia::Channel,
10245 >,
10246 <___T as ::fidl_next::Transport>::SendBuffer,
10247 >,
10248 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryKeys, ___T>
10249 where
10250 <___T as ::fidl_next::Transport>::SendBuffer:
10251 ::fidl_next::encoder::InternalHandleEncoder,
10252 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10253 {
10254 self.dictionary_keys_with(crate::generic::CapabilityStoreDictionaryKeysRequest {
10255 id,
10256
10257 iterator,
10258 })
10259 }
10260
10261 #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10262 pub fn dictionary_keys_with<___R>(
10263 &self,
10264 request: ___R,
10265 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryKeys, ___T>
10266 where
10267 ___R: ::fidl_next::Encode<
10268 crate::wire::CapabilityStoreDictionaryKeysRequest,
10269 <___T as ::fidl_next::Transport>::SendBuffer,
10270 >,
10271 {
10272 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10273 597577248872787102,
10274 <super::DictionaryKeys as ::fidl_next::Method>::FLEXIBILITY,
10275 request,
10276 ))
10277 }
10278
10279 #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10280 pub fn dictionary_enumerate(
10281 &self,
10282
10283 id: impl ::fidl_next::Encode<
10284 ::fidl_next::wire::Uint64,
10285 <___T as ::fidl_next::Transport>::SendBuffer,
10286 >,
10287
10288 iterator: impl ::fidl_next::Encode<
10289 ::fidl_next::ServerEnd<
10290 crate::DictionaryEnumerateIterator,
10291 ::fidl_next::wire::fuchsia::Channel,
10292 >,
10293 <___T as ::fidl_next::Transport>::SendBuffer,
10294 >,
10295 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryEnumerate, ___T>
10296 where
10297 <___T as ::fidl_next::Transport>::SendBuffer:
10298 ::fidl_next::encoder::InternalHandleEncoder,
10299 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10300 {
10301 self.dictionary_enumerate_with(
10302 crate::generic::CapabilityStoreDictionaryEnumerateRequest { id, iterator },
10303 )
10304 }
10305
10306 #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10307 pub fn dictionary_enumerate_with<___R>(
10308 &self,
10309 request: ___R,
10310 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryEnumerate, ___T>
10311 where
10312 ___R: ::fidl_next::Encode<
10313 crate::wire::CapabilityStoreDictionaryEnumerateRequest,
10314 <___T as ::fidl_next::Transport>::SendBuffer,
10315 >,
10316 {
10317 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10318 964467096271472193,
10319 <super::DictionaryEnumerate as ::fidl_next::Method>::FLEXIBILITY,
10320 request,
10321 ))
10322 }
10323
10324 #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10325 pub fn dictionary_drain(
10326 &self,
10327
10328 id: impl ::fidl_next::Encode<
10329 ::fidl_next::wire::Uint64,
10330 <___T as ::fidl_next::Transport>::SendBuffer,
10331 >,
10332
10333 iterator: impl ::fidl_next::Encode<
10334 ::fidl_next::ServerEnd<
10335 crate::DictionaryDrainIterator,
10336 ::fidl_next::wire::fuchsia::OptionalChannel,
10337 >,
10338 <___T as ::fidl_next::Transport>::SendBuffer,
10339 >,
10340 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryDrain, ___T>
10341 where
10342 <___T as ::fidl_next::Transport>::SendBuffer:
10343 ::fidl_next::encoder::InternalHandleEncoder,
10344 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10345 {
10346 self.dictionary_drain_with(crate::generic::CapabilityStoreDictionaryDrainRequest {
10347 id,
10348
10349 iterator,
10350 })
10351 }
10352
10353 #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10354 pub fn dictionary_drain_with<___R>(
10355 &self,
10356 request: ___R,
10357 ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryDrain, ___T>
10358 where
10359 ___R: ::fidl_next::Encode<
10360 crate::wire::CapabilityStoreDictionaryDrainRequest,
10361 <___T as ::fidl_next::Transport>::SendBuffer,
10362 >,
10363 {
10364 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10365 2928364469569621208,
10366 <super::DictionaryDrain as ::fidl_next::Method>::FLEXIBILITY,
10367 request,
10368 ))
10369 }
10370
10371 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10372 pub fn create_service_aggregate(
10373 &self,
10374
10375 sources: impl ::fidl_next::Encode<
10376 ::fidl_next::wire::Vector<'static, crate::wire::AggregateSource<'static>>,
10377 <___T as ::fidl_next::Transport>::SendBuffer,
10378 >,
10379 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateServiceAggregate, ___T>
10380 where
10381 <___T as ::fidl_next::Transport>::SendBuffer:
10382 ::fidl_next::encoder::InternalHandleEncoder,
10383 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10384 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10385 {
10386 self.create_service_aggregate_with(
10387 crate::generic::CapabilityStoreCreateServiceAggregateRequest { sources },
10388 )
10389 }
10390
10391 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10392 pub fn create_service_aggregate_with<___R>(
10393 &self,
10394 request: ___R,
10395 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateServiceAggregate, ___T>
10396 where
10397 ___R: ::fidl_next::Encode<
10398 crate::wire::CapabilityStoreCreateServiceAggregateRequest<'static>,
10399 <___T as ::fidl_next::Transport>::SendBuffer,
10400 >,
10401 {
10402 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10403 5009147843253209178,
10404 <super::CreateServiceAggregate as ::fidl_next::Method>::FLEXIBILITY,
10405 request,
10406 ))
10407 }
10408 }
10409
10410 #[repr(transparent)]
10412 pub struct CapabilityStoreServer<___T: ::fidl_next::Transport> {
10413 server: ::fidl_next::protocol::Server<___T>,
10414 }
10415
10416 impl<___T> CapabilityStoreServer<___T> where ___T: ::fidl_next::Transport {}
10417 }
10418}
10419
10420pub trait CapabilityStoreClientHandler<
10424 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10425 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10426>
10427{
10428 fn on_unknown_interaction(
10429 &mut self,
10430 ordinal: u64,
10431 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
10432 ::core::future::ready(())
10433 }
10434}
10435
10436impl<___T> CapabilityStoreClientHandler<___T> for ::fidl_next::IgnoreEvents
10437where
10438 ___T: ::fidl_next::Transport,
10439{
10440 async fn on_unknown_interaction(&mut self, _: u64) {}
10441}
10442
10443impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for CapabilityStore
10444where
10445 ___H: CapabilityStoreClientHandler<___T> + ::core::marker::Send,
10446 ___T: ::fidl_next::Transport,
10447{
10448 async fn on_event(
10449 handler: &mut ___H,
10450 ordinal: u64,
10451 flexibility: ::fidl_next::protocol::Flexibility,
10452 body: ::fidl_next::Body<___T>,
10453 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10454 match ordinal {
10455 ordinal => {
10456 handler.on_unknown_interaction(ordinal).await;
10457 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10458 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10459 } else {
10460 Ok(())
10461 }
10462 }
10463 }
10464 }
10465}
10466
10467pub trait CapabilityStoreServerHandler<
10471 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10472 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10473>
10474{
10475 #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
10476 fn duplicate(
10477 &mut self,
10478
10479 request: ::fidl_next::Request<capability_store::Duplicate, ___T>,
10480
10481 responder: ::fidl_next::Responder<capability_store::Duplicate, ___T>,
10482 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10483
10484 #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10485 fn drop(
10486 &mut self,
10487
10488 request: ::fidl_next::Request<capability_store::Drop, ___T>,
10489
10490 responder: ::fidl_next::Responder<capability_store::Drop, ___T>,
10491 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10492
10493 #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10494 fn export(
10495 &mut self,
10496
10497 request: ::fidl_next::Request<capability_store::Export, ___T>,
10498
10499 responder: ::fidl_next::Responder<capability_store::Export, ___T>,
10500 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10501
10502 #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
10503 fn import(
10504 &mut self,
10505
10506 request: ::fidl_next::Request<capability_store::Import, ___T>,
10507
10508 responder: ::fidl_next::Responder<capability_store::Import, ___T>,
10509 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10510
10511 #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10512 fn connector_create(
10513 &mut self,
10514
10515 request: ::fidl_next::Request<capability_store::ConnectorCreate, ___T>,
10516
10517 responder: ::fidl_next::Responder<capability_store::ConnectorCreate, ___T>,
10518 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10519
10520 #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
10521 fn connector_open(
10522 &mut self,
10523
10524 request: ::fidl_next::Request<capability_store::ConnectorOpen, ___T>,
10525
10526 responder: ::fidl_next::Responder<capability_store::ConnectorOpen, ___T>,
10527 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10528
10529 #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10530 fn dir_connector_create(
10531 &mut self,
10532
10533 request: ::fidl_next::Request<capability_store::DirConnectorCreate, ___T>,
10534
10535 responder: ::fidl_next::Responder<capability_store::DirConnectorCreate, ___T>,
10536 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10537
10538 #[doc = " Open a connection from the provided [DirConnector] capability that will\n be dispatched to the [DirReceiver] on the other end. The `id` and\n `server_end` arguments are required, and the `flags` and `path`\n arguments are optional (a path of `.` will be used if one is not\n otherwise set).\n\n If there was an error making the connection, it will be reported as a zx.Status\n epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
10539 fn dir_connector_open(
10540 &mut self,
10541
10542 request: ::fidl_next::Request<capability_store::DirConnectorOpen, ___T>,
10543
10544 responder: ::fidl_next::Responder<capability_store::DirConnectorOpen, ___T>,
10545 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10546
10547 #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
10548 fn dictionary_create(
10549 &mut self,
10550
10551 request: ::fidl_next::Request<capability_store::DictionaryCreate, ___T>,
10552
10553 responder: ::fidl_next::Responder<capability_store::DictionaryCreate, ___T>,
10554 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10555
10556 #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
10557 fn dictionary_legacy_import(
10558 &mut self,
10559
10560 request: ::fidl_next::Request<capability_store::DictionaryLegacyImport, ___T>,
10561
10562 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport, ___T>,
10563 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10564
10565 #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
10566 fn dictionary_legacy_export(
10567 &mut self,
10568
10569 request: ::fidl_next::Request<capability_store::DictionaryLegacyExport, ___T>,
10570
10571 responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport, ___T>,
10572 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10573
10574 #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
10575 fn dictionary_insert(
10576 &mut self,
10577
10578 request: ::fidl_next::Request<capability_store::DictionaryInsert, ___T>,
10579
10580 responder: ::fidl_next::Responder<capability_store::DictionaryInsert, ___T>,
10581 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10582
10583 #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
10584 fn dictionary_get(
10585 &mut self,
10586
10587 request: ::fidl_next::Request<capability_store::DictionaryGet, ___T>,
10588
10589 responder: ::fidl_next::Responder<capability_store::DictionaryGet, ___T>,
10590 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10591
10592 #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
10593 fn dictionary_remove(
10594 &mut self,
10595
10596 request: ::fidl_next::Request<capability_store::DictionaryRemove, ___T>,
10597
10598 responder: ::fidl_next::Responder<capability_store::DictionaryRemove, ___T>,
10599 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10600
10601 #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
10602 fn dictionary_copy(
10603 &mut self,
10604
10605 request: ::fidl_next::Request<capability_store::DictionaryCopy, ___T>,
10606
10607 responder: ::fidl_next::Responder<capability_store::DictionaryCopy, ___T>,
10608 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10609
10610 #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10611 fn dictionary_keys(
10612 &mut self,
10613
10614 request: ::fidl_next::Request<capability_store::DictionaryKeys, ___T>,
10615
10616 responder: ::fidl_next::Responder<capability_store::DictionaryKeys, ___T>,
10617 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10618
10619 #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10620 fn dictionary_enumerate(
10621 &mut self,
10622
10623 request: ::fidl_next::Request<capability_store::DictionaryEnumerate, ___T>,
10624
10625 responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate, ___T>,
10626 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10627
10628 #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
10629 fn dictionary_drain(
10630 &mut self,
10631
10632 request: ::fidl_next::Request<capability_store::DictionaryDrain, ___T>,
10633
10634 responder: ::fidl_next::Responder<capability_store::DictionaryDrain, ___T>,
10635 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10636
10637 #[doc = " Creates a new DirConnector that forwards open requests to a set of\n sources.\n"]
10638 fn create_service_aggregate(
10639 &mut self,
10640
10641 request: ::fidl_next::Request<capability_store::CreateServiceAggregate, ___T>,
10642
10643 responder: ::fidl_next::Responder<capability_store::CreateServiceAggregate, ___T>,
10644 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10645
10646 fn on_unknown_interaction(
10647 &mut self,
10648 ordinal: u64,
10649 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
10650 ::core::future::ready(())
10651 }
10652}
10653
10654impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for CapabilityStore
10655where
10656 ___H: CapabilityStoreServerHandler<___T> + ::core::marker::Send,
10657 ___T: ::fidl_next::Transport,
10658 for<'de> crate::wire::CapabilityStoreDuplicateRequest: ::fidl_next::Decode<
10659 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10660 Constraint = (),
10661 >,
10662 for<'de> crate::wire::CapabilityStoreDropRequest: ::fidl_next::Decode<
10663 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10664 Constraint = (),
10665 >,
10666 for<'de> crate::wire::CapabilityStoreExportRequest: ::fidl_next::Decode<
10667 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10668 Constraint = (),
10669 >,
10670 for<'de> crate::wire::CapabilityStoreImportRequest<'de>: ::fidl_next::Decode<
10671 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10672 Constraint = (),
10673 >,
10674 for<'de> crate::wire::CapabilityStoreConnectorCreateRequest: ::fidl_next::Decode<
10675 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10676 Constraint = (),
10677 >,
10678 for<'de> crate::wire::CapabilityStoreConnectorOpenRequest: ::fidl_next::Decode<
10679 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10680 Constraint = (),
10681 >,
10682 for<'de> crate::wire::CapabilityStoreDirConnectorCreateRequest: ::fidl_next::Decode<
10683 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10684 Constraint = (),
10685 >,
10686 for<'de> crate::wire::CapabilityStoreDirConnectorOpenRequest<'de>: ::fidl_next::Decode<
10687 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10688 Constraint = (),
10689 >,
10690 for<'de> crate::wire::CapabilityStoreDictionaryCreateRequest: ::fidl_next::Decode<
10691 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10692 Constraint = (),
10693 >,
10694 for<'de> crate::wire::CapabilityStoreDictionaryLegacyImportRequest: ::fidl_next::Decode<
10695 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10696 Constraint = (),
10697 >,
10698 for<'de> crate::wire::CapabilityStoreDictionaryLegacyExportRequest: ::fidl_next::Decode<
10699 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10700 Constraint = (),
10701 >,
10702 for<'de> crate::wire::CapabilityStoreDictionaryInsertRequest<'de>: ::fidl_next::Decode<
10703 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10704 Constraint = (),
10705 >,
10706 for<'de> crate::wire::CapabilityStoreDictionaryGetRequest<'de>: ::fidl_next::Decode<
10707 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10708 Constraint = (),
10709 >,
10710 for<'de> crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>: ::fidl_next::Decode<
10711 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10712 Constraint = (),
10713 >,
10714 for<'de> crate::wire::CapabilityStoreDictionaryCopyRequest: ::fidl_next::Decode<
10715 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10716 Constraint = (),
10717 >,
10718 for<'de> crate::wire::CapabilityStoreDictionaryKeysRequest: ::fidl_next::Decode<
10719 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10720 Constraint = (),
10721 >,
10722 for<'de> crate::wire::CapabilityStoreDictionaryEnumerateRequest: ::fidl_next::Decode<
10723 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10724 Constraint = (),
10725 >,
10726 for<'de> crate::wire::CapabilityStoreDictionaryDrainRequest: ::fidl_next::Decode<
10727 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10728 Constraint = (),
10729 >,
10730 for<'de> crate::wire::CapabilityStoreCreateServiceAggregateRequest<'de>: ::fidl_next::Decode<
10731 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10732 Constraint = (),
10733 >,
10734{
10735 async fn on_one_way(
10736 handler: &mut ___H,
10737 ordinal: u64,
10738 flexibility: ::fidl_next::protocol::Flexibility,
10739 body: ::fidl_next::Body<___T>,
10740 ) -> ::core::result::Result<
10741 (),
10742 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10743 > {
10744 match ordinal {
10745 ordinal => {
10746 handler.on_unknown_interaction(ordinal).await;
10747 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10748 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10749 } else {
10750 Ok(())
10751 }
10752 }
10753 }
10754 }
10755
10756 async fn on_two_way(
10757 handler: &mut ___H,
10758 ordinal: u64,
10759 flexibility: ::fidl_next::protocol::Flexibility,
10760 body: ::fidl_next::Body<___T>,
10761 responder: ::fidl_next::protocol::Responder<___T>,
10762 ) -> ::core::result::Result<
10763 (),
10764 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10765 > {
10766 match ordinal {
10767 6727592627741008260 => {
10768 let responder = ::fidl_next::Responder::from_untyped(responder);
10769
10770 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10771 Ok(decoded) => {
10772 handler
10773 .duplicate(::fidl_next::Request::from_decoded(decoded), responder)
10774 .await;
10775 Ok(())
10776 }
10777 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10778 ordinal: 6727592627741008260,
10779 error,
10780 }),
10781 }
10782 }
10783
10784 753328233834620249 => {
10785 let responder = ::fidl_next::Responder::from_untyped(responder);
10786
10787 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10788 Ok(decoded) => {
10789 handler.drop(::fidl_next::Request::from_decoded(decoded), responder).await;
10790 Ok(())
10791 }
10792 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10793 ordinal: 753328233834620249,
10794 error,
10795 }),
10796 }
10797 }
10798
10799 226159162093533951 => {
10800 let responder = ::fidl_next::Responder::from_untyped(responder);
10801
10802 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10803 Ok(decoded) => {
10804 handler
10805 .export(::fidl_next::Request::from_decoded(decoded), responder)
10806 .await;
10807 Ok(())
10808 }
10809 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10810 ordinal: 226159162093533951,
10811 error,
10812 }),
10813 }
10814 }
10815
10816 2276030276116435867 => {
10817 let responder = ::fidl_next::Responder::from_untyped(responder);
10818
10819 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10820 Ok(decoded) => {
10821 handler
10822 .import(::fidl_next::Request::from_decoded(decoded), responder)
10823 .await;
10824 Ok(())
10825 }
10826 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10827 ordinal: 2276030276116435867,
10828 error,
10829 }),
10830 }
10831 }
10832
10833 2979461408102095909 => {
10834 let responder = ::fidl_next::Responder::from_untyped(responder);
10835
10836 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10837 Ok(decoded) => {
10838 handler
10839 .connector_create(
10840 ::fidl_next::Request::from_decoded(decoded),
10841 responder,
10842 )
10843 .await;
10844 Ok(())
10845 }
10846 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10847 ordinal: 2979461408102095909,
10848 error,
10849 }),
10850 }
10851 }
10852
10853 6016362336453278623 => {
10854 let responder = ::fidl_next::Responder::from_untyped(responder);
10855
10856 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10857 Ok(decoded) => {
10858 handler
10859 .connector_open(::fidl_next::Request::from_decoded(decoded), responder)
10860 .await;
10861 Ok(())
10862 }
10863 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10864 ordinal: 6016362336453278623,
10865 error,
10866 }),
10867 }
10868 }
10869
10870 1756747594275428795 => {
10871 let responder = ::fidl_next::Responder::from_untyped(responder);
10872
10873 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10874 Ok(decoded) => {
10875 handler
10876 .dir_connector_create(
10877 ::fidl_next::Request::from_decoded(decoded),
10878 responder,
10879 )
10880 .await;
10881 Ok(())
10882 }
10883 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10884 ordinal: 1756747594275428795,
10885 error,
10886 }),
10887 }
10888 }
10889
10890 6219704004220369153 => {
10891 let responder = ::fidl_next::Responder::from_untyped(responder);
10892
10893 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10894 Ok(decoded) => {
10895 handler
10896 .dir_connector_open(
10897 ::fidl_next::Request::from_decoded(decoded),
10898 responder,
10899 )
10900 .await;
10901 Ok(())
10902 }
10903 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10904 ordinal: 6219704004220369153,
10905 error,
10906 }),
10907 }
10908 }
10909
10910 7608770958894948499 => {
10911 let responder = ::fidl_next::Responder::from_untyped(responder);
10912
10913 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10914 Ok(decoded) => {
10915 handler
10916 .dictionary_create(
10917 ::fidl_next::Request::from_decoded(decoded),
10918 responder,
10919 )
10920 .await;
10921 Ok(())
10922 }
10923 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10924 ordinal: 7608770958894948499,
10925 error,
10926 }),
10927 }
10928 }
10929
10930 8285893703432012383 => {
10931 let responder = ::fidl_next::Responder::from_untyped(responder);
10932
10933 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10934 Ok(decoded) => {
10935 handler
10936 .dictionary_legacy_import(
10937 ::fidl_next::Request::from_decoded(decoded),
10938 responder,
10939 )
10940 .await;
10941 Ok(())
10942 }
10943 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10944 ordinal: 8285893703432012383,
10945 error,
10946 }),
10947 }
10948 }
10949
10950 4647175832683306445 => {
10951 let responder = ::fidl_next::Responder::from_untyped(responder);
10952
10953 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10954 Ok(decoded) => {
10955 handler
10956 .dictionary_legacy_export(
10957 ::fidl_next::Request::from_decoded(decoded),
10958 responder,
10959 )
10960 .await;
10961 Ok(())
10962 }
10963 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10964 ordinal: 4647175832683306445,
10965 error,
10966 }),
10967 }
10968 }
10969
10970 8575443262986538023 => {
10971 let responder = ::fidl_next::Responder::from_untyped(responder);
10972
10973 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10974 Ok(decoded) => {
10975 handler
10976 .dictionary_insert(
10977 ::fidl_next::Request::from_decoded(decoded),
10978 responder,
10979 )
10980 .await;
10981 Ok(())
10982 }
10983 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10984 ordinal: 8575443262986538023,
10985 error,
10986 }),
10987 }
10988 }
10989
10990 5592951026866236882 => {
10991 let responder = ::fidl_next::Responder::from_untyped(responder);
10992
10993 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10994 Ok(decoded) => {
10995 handler
10996 .dictionary_get(::fidl_next::Request::from_decoded(decoded), responder)
10997 .await;
10998 Ok(())
10999 }
11000 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11001 ordinal: 5592951026866236882,
11002 error,
11003 }),
11004 }
11005 }
11006
11007 343892214579320051 => {
11008 let responder = ::fidl_next::Responder::from_untyped(responder);
11009
11010 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11011 Ok(decoded) => {
11012 handler
11013 .dictionary_remove(
11014 ::fidl_next::Request::from_decoded(decoded),
11015 responder,
11016 )
11017 .await;
11018 Ok(())
11019 }
11020 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11021 ordinal: 343892214579320051,
11022 error,
11023 }),
11024 }
11025 }
11026
11027 3977783339739362383 => {
11028 let responder = ::fidl_next::Responder::from_untyped(responder);
11029
11030 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11031 Ok(decoded) => {
11032 handler
11033 .dictionary_copy(::fidl_next::Request::from_decoded(decoded), responder)
11034 .await;
11035 Ok(())
11036 }
11037 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11038 ordinal: 3977783339739362383,
11039 error,
11040 }),
11041 }
11042 }
11043
11044 597577248872787102 => {
11045 let responder = ::fidl_next::Responder::from_untyped(responder);
11046
11047 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11048 Ok(decoded) => {
11049 handler
11050 .dictionary_keys(::fidl_next::Request::from_decoded(decoded), responder)
11051 .await;
11052 Ok(())
11053 }
11054 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11055 ordinal: 597577248872787102,
11056 error,
11057 }),
11058 }
11059 }
11060
11061 964467096271472193 => {
11062 let responder = ::fidl_next::Responder::from_untyped(responder);
11063
11064 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11065 Ok(decoded) => {
11066 handler
11067 .dictionary_enumerate(
11068 ::fidl_next::Request::from_decoded(decoded),
11069 responder,
11070 )
11071 .await;
11072 Ok(())
11073 }
11074 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11075 ordinal: 964467096271472193,
11076 error,
11077 }),
11078 }
11079 }
11080
11081 2928364469569621208 => {
11082 let responder = ::fidl_next::Responder::from_untyped(responder);
11083
11084 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11085 Ok(decoded) => {
11086 handler
11087 .dictionary_drain(
11088 ::fidl_next::Request::from_decoded(decoded),
11089 responder,
11090 )
11091 .await;
11092 Ok(())
11093 }
11094 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11095 ordinal: 2928364469569621208,
11096 error,
11097 }),
11098 }
11099 }
11100
11101 5009147843253209178 => {
11102 let responder = ::fidl_next::Responder::from_untyped(responder);
11103
11104 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11105 Ok(decoded) => {
11106 handler
11107 .create_service_aggregate(
11108 ::fidl_next::Request::from_decoded(decoded),
11109 responder,
11110 )
11111 .await;
11112 Ok(())
11113 }
11114 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11115 ordinal: 5009147843253209178,
11116 error,
11117 }),
11118 }
11119 }
11120
11121 ordinal => {
11122 handler.on_unknown_interaction(ordinal).await;
11123 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11124 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11125 } else {
11126 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11127 ordinal,
11128 flexibility,
11129 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11130 )
11131 .expect("encoding a framework error should never fail")
11132 .await?;
11133 Ok(())
11134 }
11135 }
11136 }
11137 }
11138}
11139
11140#[derive(PartialEq, Debug)]
11142pub struct ConnectorRouter;
11143
11144impl ::fidl_next::Discoverable for ConnectorRouter {
11145 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
11146}
11147
11148#[cfg(target_os = "fuchsia")]
11149impl ::fidl_next::HasTransport for ConnectorRouter {
11150 type Transport = ::fidl_next::fuchsia::zx::Channel;
11151}
11152
11153pub mod connector_router {
11154 pub mod prelude {
11155 pub use crate::{
11156 ConnectorRouter, ConnectorRouterClientHandler, ConnectorRouterServerHandler,
11157 connector_router,
11158 };
11159
11160 pub use crate::natural::ConnectorRouterRouteResponse;
11161
11162 pub use crate::natural::RouteRequest;
11163
11164 pub use crate::natural::RouterError;
11165 }
11166
11167 pub struct Route;
11168
11169 impl ::fidl_next::Method for Route {
11170 const ORDINAL: u64 = 8420527046218942310;
11171 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11172 ::fidl_next::protocol::Flexibility::Flexible;
11173
11174 type Protocol = crate::ConnectorRouter;
11175
11176 type Request = crate::wire::RouteRequest<'static>;
11177 }
11178
11179 impl ::fidl_next::TwoWayMethod for Route {
11180 type Response = ::fidl_next::wire::FlexibleResult<
11181 'static,
11182 crate::wire::ConnectorRouterRouteResponse,
11183 crate::wire::RouterError,
11184 >;
11185 }
11186
11187 impl<___R> ::fidl_next::Respond<___R> for Route {
11188 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11189
11190 fn respond(response: ___R) -> Self::Output {
11191 ::fidl_next::FlexibleResult::Ok(response)
11192 }
11193 }
11194
11195 impl<___R> ::fidl_next::RespondErr<___R> for Route {
11196 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11197
11198 fn respond_err(response: ___R) -> Self::Output {
11199 ::fidl_next::FlexibleResult::Err(response)
11200 }
11201 }
11202
11203 mod ___detail {
11204 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ConnectorRouter
11205 where
11206 ___T: ::fidl_next::Transport,
11207 {
11208 type Client = ConnectorRouterClient<___T>;
11209 type Server = ConnectorRouterServer<___T>;
11210 }
11211
11212 #[repr(transparent)]
11214 pub struct ConnectorRouterClient<___T: ::fidl_next::Transport> {
11215 #[allow(dead_code)]
11216 client: ::fidl_next::protocol::Client<___T>,
11217 }
11218
11219 impl<___T> ConnectorRouterClient<___T>
11220 where
11221 ___T: ::fidl_next::Transport,
11222 {
11223 pub fn route_with<___R>(
11224 &self,
11225 request: ___R,
11226 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
11227 where
11228 ___R: ::fidl_next::Encode<
11229 crate::wire::RouteRequest<'static>,
11230 <___T as ::fidl_next::Transport>::SendBuffer,
11231 >,
11232 {
11233 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11234 8420527046218942310,
11235 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
11236 request,
11237 ))
11238 }
11239 }
11240
11241 #[repr(transparent)]
11243 pub struct ConnectorRouterServer<___T: ::fidl_next::Transport> {
11244 server: ::fidl_next::protocol::Server<___T>,
11245 }
11246
11247 impl<___T> ConnectorRouterServer<___T> where ___T: ::fidl_next::Transport {}
11248 }
11249}
11250
11251pub trait ConnectorRouterClientHandler<
11255 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11256 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11257>
11258{
11259 fn on_unknown_interaction(
11260 &mut self,
11261 ordinal: u64,
11262 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11263 ::core::future::ready(())
11264 }
11265}
11266
11267impl<___T> ConnectorRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
11268where
11269 ___T: ::fidl_next::Transport,
11270{
11271 async fn on_unknown_interaction(&mut self, _: u64) {}
11272}
11273
11274impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ConnectorRouter
11275where
11276 ___H: ConnectorRouterClientHandler<___T> + ::core::marker::Send,
11277 ___T: ::fidl_next::Transport,
11278{
11279 async fn on_event(
11280 handler: &mut ___H,
11281 ordinal: u64,
11282 flexibility: ::fidl_next::protocol::Flexibility,
11283 body: ::fidl_next::Body<___T>,
11284 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11285 match ordinal {
11286 ordinal => {
11287 handler.on_unknown_interaction(ordinal).await;
11288 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11289 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11290 } else {
11291 Ok(())
11292 }
11293 }
11294 }
11295 }
11296}
11297
11298pub trait ConnectorRouterServerHandler<
11302 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11303 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11304>
11305{
11306 fn route(
11307 &mut self,
11308
11309 request: ::fidl_next::Request<connector_router::Route, ___T>,
11310
11311 responder: ::fidl_next::Responder<connector_router::Route, ___T>,
11312 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11313
11314 fn on_unknown_interaction(
11315 &mut self,
11316 ordinal: u64,
11317 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11318 ::core::future::ready(())
11319 }
11320}
11321
11322impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ConnectorRouter
11323where
11324 ___H: ConnectorRouterServerHandler<___T> + ::core::marker::Send,
11325 ___T: ::fidl_next::Transport,
11326 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
11327 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11328 Constraint = (),
11329 >,
11330{
11331 async fn on_one_way(
11332 handler: &mut ___H,
11333 ordinal: u64,
11334 flexibility: ::fidl_next::protocol::Flexibility,
11335 body: ::fidl_next::Body<___T>,
11336 ) -> ::core::result::Result<
11337 (),
11338 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11339 > {
11340 match ordinal {
11341 ordinal => {
11342 handler.on_unknown_interaction(ordinal).await;
11343 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11344 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11345 } else {
11346 Ok(())
11347 }
11348 }
11349 }
11350 }
11351
11352 async fn on_two_way(
11353 handler: &mut ___H,
11354 ordinal: u64,
11355 flexibility: ::fidl_next::protocol::Flexibility,
11356 body: ::fidl_next::Body<___T>,
11357 responder: ::fidl_next::protocol::Responder<___T>,
11358 ) -> ::core::result::Result<
11359 (),
11360 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11361 > {
11362 match ordinal {
11363 8420527046218942310 => {
11364 let responder = ::fidl_next::Responder::from_untyped(responder);
11365
11366 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11367 Ok(decoded) => {
11368 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
11369 Ok(())
11370 }
11371 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11372 ordinal: 8420527046218942310,
11373 error,
11374 }),
11375 }
11376 }
11377
11378 ordinal => {
11379 handler.on_unknown_interaction(ordinal).await;
11380 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11381 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11382 } else {
11383 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11384 ordinal,
11385 flexibility,
11386 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11387 )
11388 .expect("encoding a framework error should never fail")
11389 .await?;
11390 Ok(())
11391 }
11392 }
11393 }
11394 }
11395}
11396
11397#[derive(PartialEq, Debug)]
11399pub struct DataRouter;
11400
11401impl ::fidl_next::Discoverable for DataRouter {
11402 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
11403}
11404
11405#[cfg(target_os = "fuchsia")]
11406impl ::fidl_next::HasTransport for DataRouter {
11407 type Transport = ::fidl_next::fuchsia::zx::Channel;
11408}
11409
11410pub mod data_router {
11411 pub mod prelude {
11412 pub use crate::{
11413 DataRouter, DataRouterClientHandler, DataRouterServerHandler, data_router,
11414 };
11415
11416 pub use crate::natural::DataRouterRouteResponse;
11417
11418 pub use crate::natural::RouteRequest;
11419
11420 pub use crate::natural::RouterError;
11421 }
11422
11423 pub struct Route;
11424
11425 impl ::fidl_next::Method for Route {
11426 const ORDINAL: u64 = 3352890635970754564;
11427 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11428 ::fidl_next::protocol::Flexibility::Flexible;
11429
11430 type Protocol = crate::DataRouter;
11431
11432 type Request = crate::wire::RouteRequest<'static>;
11433 }
11434
11435 impl ::fidl_next::TwoWayMethod for Route {
11436 type Response = ::fidl_next::wire::FlexibleResult<
11437 'static,
11438 crate::wire::DataRouterRouteResponse<'static>,
11439 crate::wire::RouterError,
11440 >;
11441 }
11442
11443 impl<___R> ::fidl_next::Respond<___R> for Route {
11444 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11445
11446 fn respond(response: ___R) -> Self::Output {
11447 ::fidl_next::FlexibleResult::Ok(response)
11448 }
11449 }
11450
11451 impl<___R> ::fidl_next::RespondErr<___R> for Route {
11452 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11453
11454 fn respond_err(response: ___R) -> Self::Output {
11455 ::fidl_next::FlexibleResult::Err(response)
11456 }
11457 }
11458
11459 mod ___detail {
11460 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DataRouter
11461 where
11462 ___T: ::fidl_next::Transport,
11463 {
11464 type Client = DataRouterClient<___T>;
11465 type Server = DataRouterServer<___T>;
11466 }
11467
11468 #[repr(transparent)]
11470 pub struct DataRouterClient<___T: ::fidl_next::Transport> {
11471 #[allow(dead_code)]
11472 client: ::fidl_next::protocol::Client<___T>,
11473 }
11474
11475 impl<___T> DataRouterClient<___T>
11476 where
11477 ___T: ::fidl_next::Transport,
11478 {
11479 pub fn route_with<___R>(
11480 &self,
11481 request: ___R,
11482 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
11483 where
11484 ___R: ::fidl_next::Encode<
11485 crate::wire::RouteRequest<'static>,
11486 <___T as ::fidl_next::Transport>::SendBuffer,
11487 >,
11488 {
11489 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11490 3352890635970754564,
11491 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
11492 request,
11493 ))
11494 }
11495 }
11496
11497 #[repr(transparent)]
11499 pub struct DataRouterServer<___T: ::fidl_next::Transport> {
11500 server: ::fidl_next::protocol::Server<___T>,
11501 }
11502
11503 impl<___T> DataRouterServer<___T> where ___T: ::fidl_next::Transport {}
11504 }
11505}
11506
11507pub trait DataRouterClientHandler<
11511 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11512 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11513>
11514{
11515 fn on_unknown_interaction(
11516 &mut self,
11517 ordinal: u64,
11518 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11519 ::core::future::ready(())
11520 }
11521}
11522
11523impl<___T> DataRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
11524where
11525 ___T: ::fidl_next::Transport,
11526{
11527 async fn on_unknown_interaction(&mut self, _: u64) {}
11528}
11529
11530impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DataRouter
11531where
11532 ___H: DataRouterClientHandler<___T> + ::core::marker::Send,
11533 ___T: ::fidl_next::Transport,
11534{
11535 async fn on_event(
11536 handler: &mut ___H,
11537 ordinal: u64,
11538 flexibility: ::fidl_next::protocol::Flexibility,
11539 body: ::fidl_next::Body<___T>,
11540 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11541 match ordinal {
11542 ordinal => {
11543 handler.on_unknown_interaction(ordinal).await;
11544 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11545 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11546 } else {
11547 Ok(())
11548 }
11549 }
11550 }
11551 }
11552}
11553
11554pub trait DataRouterServerHandler<
11558 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11559 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11560>
11561{
11562 fn route(
11563 &mut self,
11564
11565 request: ::fidl_next::Request<data_router::Route, ___T>,
11566
11567 responder: ::fidl_next::Responder<data_router::Route, ___T>,
11568 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11569
11570 fn on_unknown_interaction(
11571 &mut self,
11572 ordinal: u64,
11573 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11574 ::core::future::ready(())
11575 }
11576}
11577
11578impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DataRouter
11579where
11580 ___H: DataRouterServerHandler<___T> + ::core::marker::Send,
11581 ___T: ::fidl_next::Transport,
11582 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
11583 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11584 Constraint = (),
11585 >,
11586{
11587 async fn on_one_way(
11588 handler: &mut ___H,
11589 ordinal: u64,
11590 flexibility: ::fidl_next::protocol::Flexibility,
11591 body: ::fidl_next::Body<___T>,
11592 ) -> ::core::result::Result<
11593 (),
11594 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11595 > {
11596 match ordinal {
11597 ordinal => {
11598 handler.on_unknown_interaction(ordinal).await;
11599 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11600 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11601 } else {
11602 Ok(())
11603 }
11604 }
11605 }
11606 }
11607
11608 async fn on_two_way(
11609 handler: &mut ___H,
11610 ordinal: u64,
11611 flexibility: ::fidl_next::protocol::Flexibility,
11612 body: ::fidl_next::Body<___T>,
11613 responder: ::fidl_next::protocol::Responder<___T>,
11614 ) -> ::core::result::Result<
11615 (),
11616 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11617 > {
11618 match ordinal {
11619 3352890635970754564 => {
11620 let responder = ::fidl_next::Responder::from_untyped(responder);
11621
11622 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11623 Ok(decoded) => {
11624 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
11625 Ok(())
11626 }
11627 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11628 ordinal: 3352890635970754564,
11629 error,
11630 }),
11631 }
11632 }
11633
11634 ordinal => {
11635 handler.on_unknown_interaction(ordinal).await;
11636 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11637 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11638 } else {
11639 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11640 ordinal,
11641 flexibility,
11642 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11643 )
11644 .expect("encoding a framework error should never fail")
11645 .await?;
11646 Ok(())
11647 }
11648 }
11649 }
11650 }
11651}
11652
11653#[derive(PartialEq, Debug)]
11655pub struct DictionaryDrainIterator;
11656
11657#[cfg(target_os = "fuchsia")]
11658impl ::fidl_next::HasTransport for DictionaryDrainIterator {
11659 type Transport = ::fidl_next::fuchsia::zx::Channel;
11660}
11661
11662pub mod dictionary_drain_iterator {
11663 pub mod prelude {
11664 pub use crate::{
11665 DictionaryDrainIterator, DictionaryDrainIteratorClientHandler,
11666 DictionaryDrainIteratorServerHandler, dictionary_drain_iterator,
11667 };
11668
11669 pub use crate::natural::CapabilityStoreError;
11670
11671 pub use crate::natural::DictionaryDrainIteratorGetNextRequest;
11672
11673 pub use crate::natural::DictionaryDrainIteratorGetNextResponse;
11674 }
11675
11676 pub struct GetNext;
11677
11678 impl ::fidl_next::Method for GetNext {
11679 const ORDINAL: u64 = 5728722530628427873;
11680 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11681 ::fidl_next::protocol::Flexibility::Flexible;
11682
11683 type Protocol = crate::DictionaryDrainIterator;
11684
11685 type Request = crate::wire::DictionaryDrainIteratorGetNextRequest;
11686 }
11687
11688 impl ::fidl_next::TwoWayMethod for GetNext {
11689 type Response = ::fidl_next::wire::FlexibleResult<
11690 'static,
11691 crate::wire::DictionaryDrainIteratorGetNextResponse<'static>,
11692 crate::wire::CapabilityStoreError,
11693 >;
11694 }
11695
11696 impl<___R> ::fidl_next::Respond<___R> for GetNext {
11697 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11698
11699 fn respond(response: ___R) -> Self::Output {
11700 ::fidl_next::FlexibleResult::Ok(response)
11701 }
11702 }
11703
11704 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
11705 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11706
11707 fn respond_err(response: ___R) -> Self::Output {
11708 ::fidl_next::FlexibleResult::Err(response)
11709 }
11710 }
11711
11712 mod ___detail {
11713 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryDrainIterator
11714 where
11715 ___T: ::fidl_next::Transport,
11716 {
11717 type Client = DictionaryDrainIteratorClient<___T>;
11718 type Server = DictionaryDrainIteratorServer<___T>;
11719 }
11720
11721 #[repr(transparent)]
11723 pub struct DictionaryDrainIteratorClient<___T: ::fidl_next::Transport> {
11724 #[allow(dead_code)]
11725 client: ::fidl_next::protocol::Client<___T>,
11726 }
11727
11728 impl<___T> DictionaryDrainIteratorClient<___T>
11729 where
11730 ___T: ::fidl_next::Transport,
11731 {
11732 #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
11733 pub fn get_next(
11734 &self,
11735
11736 start_id: impl ::fidl_next::Encode<
11737 ::fidl_next::wire::Uint64,
11738 <___T as ::fidl_next::Transport>::SendBuffer,
11739 >,
11740
11741 limit: impl ::fidl_next::Encode<
11742 ::fidl_next::wire::Uint32,
11743 <___T as ::fidl_next::Transport>::SendBuffer,
11744 >,
11745 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
11746 where
11747 <___T as ::fidl_next::Transport>::SendBuffer:
11748 ::fidl_next::encoder::InternalHandleEncoder,
11749 {
11750 self.get_next_with(crate::generic::DictionaryDrainIteratorGetNextRequest {
11751 start_id,
11752
11753 limit,
11754 })
11755 }
11756
11757 #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
11758 pub fn get_next_with<___R>(
11759 &self,
11760 request: ___R,
11761 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
11762 where
11763 ___R: ::fidl_next::Encode<
11764 crate::wire::DictionaryDrainIteratorGetNextRequest,
11765 <___T as ::fidl_next::Transport>::SendBuffer,
11766 >,
11767 {
11768 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11769 5728722530628427873,
11770 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
11771 request,
11772 ))
11773 }
11774 }
11775
11776 #[repr(transparent)]
11778 pub struct DictionaryDrainIteratorServer<___T: ::fidl_next::Transport> {
11779 server: ::fidl_next::protocol::Server<___T>,
11780 }
11781
11782 impl<___T> DictionaryDrainIteratorServer<___T> where ___T: ::fidl_next::Transport {}
11783 }
11784}
11785
11786pub trait DictionaryDrainIteratorClientHandler<
11790 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11791 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11792>
11793{
11794 fn on_unknown_interaction(
11795 &mut self,
11796 ordinal: u64,
11797 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11798 ::core::future::ready(())
11799 }
11800}
11801
11802impl<___T> DictionaryDrainIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
11803where
11804 ___T: ::fidl_next::Transport,
11805{
11806 async fn on_unknown_interaction(&mut self, _: u64) {}
11807}
11808
11809impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryDrainIterator
11810where
11811 ___H: DictionaryDrainIteratorClientHandler<___T> + ::core::marker::Send,
11812 ___T: ::fidl_next::Transport,
11813{
11814 async fn on_event(
11815 handler: &mut ___H,
11816 ordinal: u64,
11817 flexibility: ::fidl_next::protocol::Flexibility,
11818 body: ::fidl_next::Body<___T>,
11819 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11820 match ordinal {
11821 ordinal => {
11822 handler.on_unknown_interaction(ordinal).await;
11823 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11824 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11825 } else {
11826 Ok(())
11827 }
11828 }
11829 }
11830 }
11831}
11832
11833pub trait DictionaryDrainIteratorServerHandler<
11837 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11838 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11839>
11840{
11841 #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
11842 fn get_next(
11843 &mut self,
11844
11845 request: ::fidl_next::Request<dictionary_drain_iterator::GetNext, ___T>,
11846
11847 responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext, ___T>,
11848 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11849
11850 fn on_unknown_interaction(
11851 &mut self,
11852 ordinal: u64,
11853 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11854 ::core::future::ready(())
11855 }
11856}
11857
11858impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryDrainIterator
11859where
11860 ___H: DictionaryDrainIteratorServerHandler<___T> + ::core::marker::Send,
11861 ___T: ::fidl_next::Transport,
11862 for<'de> crate::wire::DictionaryDrainIteratorGetNextRequest: ::fidl_next::Decode<
11863 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11864 Constraint = (),
11865 >,
11866{
11867 async fn on_one_way(
11868 handler: &mut ___H,
11869 ordinal: u64,
11870 flexibility: ::fidl_next::protocol::Flexibility,
11871 body: ::fidl_next::Body<___T>,
11872 ) -> ::core::result::Result<
11873 (),
11874 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11875 > {
11876 match ordinal {
11877 ordinal => {
11878 handler.on_unknown_interaction(ordinal).await;
11879 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11880 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11881 } else {
11882 Ok(())
11883 }
11884 }
11885 }
11886 }
11887
11888 async fn on_two_way(
11889 handler: &mut ___H,
11890 ordinal: u64,
11891 flexibility: ::fidl_next::protocol::Flexibility,
11892 body: ::fidl_next::Body<___T>,
11893 responder: ::fidl_next::protocol::Responder<___T>,
11894 ) -> ::core::result::Result<
11895 (),
11896 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11897 > {
11898 match ordinal {
11899 5728722530628427873 => {
11900 let responder = ::fidl_next::Responder::from_untyped(responder);
11901
11902 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11903 Ok(decoded) => {
11904 handler
11905 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
11906 .await;
11907 Ok(())
11908 }
11909 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11910 ordinal: 5728722530628427873,
11911 error,
11912 }),
11913 }
11914 }
11915
11916 ordinal => {
11917 handler.on_unknown_interaction(ordinal).await;
11918 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11919 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11920 } else {
11921 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11922 ordinal,
11923 flexibility,
11924 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11925 )
11926 .expect("encoding a framework error should never fail")
11927 .await?;
11928 Ok(())
11929 }
11930 }
11931 }
11932 }
11933}
11934
11935#[derive(PartialEq, Debug)]
11937pub struct DictionaryEnumerateIterator;
11938
11939#[cfg(target_os = "fuchsia")]
11940impl ::fidl_next::HasTransport for DictionaryEnumerateIterator {
11941 type Transport = ::fidl_next::fuchsia::zx::Channel;
11942}
11943
11944pub mod dictionary_enumerate_iterator {
11945 pub mod prelude {
11946 pub use crate::{
11947 DictionaryEnumerateIterator, DictionaryEnumerateIteratorClientHandler,
11948 DictionaryEnumerateIteratorServerHandler, dictionary_enumerate_iterator,
11949 };
11950
11951 pub use crate::natural::CapabilityStoreError;
11952
11953 pub use crate::natural::DictionaryEnumerateIteratorGetNextRequest;
11954
11955 pub use crate::natural::DictionaryEnumerateIteratorGetNextResponse;
11956 }
11957
11958 pub struct GetNext;
11959
11960 impl ::fidl_next::Method for GetNext {
11961 const ORDINAL: u64 = 1511164556663256527;
11962 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11963 ::fidl_next::protocol::Flexibility::Flexible;
11964
11965 type Protocol = crate::DictionaryEnumerateIterator;
11966
11967 type Request = crate::wire::DictionaryEnumerateIteratorGetNextRequest;
11968 }
11969
11970 impl ::fidl_next::TwoWayMethod for GetNext {
11971 type Response = ::fidl_next::wire::FlexibleResult<
11972 'static,
11973 crate::wire::DictionaryEnumerateIteratorGetNextResponse<'static>,
11974 crate::wire::CapabilityStoreError,
11975 >;
11976 }
11977
11978 impl<___R> ::fidl_next::Respond<___R> for GetNext {
11979 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11980
11981 fn respond(response: ___R) -> Self::Output {
11982 ::fidl_next::FlexibleResult::Ok(response)
11983 }
11984 }
11985
11986 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
11987 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11988
11989 fn respond_err(response: ___R) -> Self::Output {
11990 ::fidl_next::FlexibleResult::Err(response)
11991 }
11992 }
11993
11994 mod ___detail {
11995 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryEnumerateIterator
11996 where
11997 ___T: ::fidl_next::Transport,
11998 {
11999 type Client = DictionaryEnumerateIteratorClient<___T>;
12000 type Server = DictionaryEnumerateIteratorServer<___T>;
12001 }
12002
12003 #[repr(transparent)]
12005 pub struct DictionaryEnumerateIteratorClient<___T: ::fidl_next::Transport> {
12006 #[allow(dead_code)]
12007 client: ::fidl_next::protocol::Client<___T>,
12008 }
12009
12010 impl<___T> DictionaryEnumerateIteratorClient<___T>
12011 where
12012 ___T: ::fidl_next::Transport,
12013 {
12014 #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
12015 pub fn get_next(
12016 &self,
12017
12018 start_id: impl ::fidl_next::Encode<
12019 ::fidl_next::wire::Uint64,
12020 <___T as ::fidl_next::Transport>::SendBuffer,
12021 >,
12022
12023 limit: impl ::fidl_next::Encode<
12024 ::fidl_next::wire::Uint32,
12025 <___T as ::fidl_next::Transport>::SendBuffer,
12026 >,
12027 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
12028 where
12029 <___T as ::fidl_next::Transport>::SendBuffer:
12030 ::fidl_next::encoder::InternalHandleEncoder,
12031 {
12032 self.get_next_with(crate::generic::DictionaryEnumerateIteratorGetNextRequest {
12033 start_id,
12034
12035 limit,
12036 })
12037 }
12038
12039 #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
12040 pub fn get_next_with<___R>(
12041 &self,
12042 request: ___R,
12043 ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
12044 where
12045 ___R: ::fidl_next::Encode<
12046 crate::wire::DictionaryEnumerateIteratorGetNextRequest,
12047 <___T as ::fidl_next::Transport>::SendBuffer,
12048 >,
12049 {
12050 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12051 1511164556663256527,
12052 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
12053 request,
12054 ))
12055 }
12056 }
12057
12058 #[repr(transparent)]
12060 pub struct DictionaryEnumerateIteratorServer<___T: ::fidl_next::Transport> {
12061 server: ::fidl_next::protocol::Server<___T>,
12062 }
12063
12064 impl<___T> DictionaryEnumerateIteratorServer<___T> where ___T: ::fidl_next::Transport {}
12065 }
12066}
12067
12068pub trait DictionaryEnumerateIteratorClientHandler<
12072 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12073 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12074>
12075{
12076 fn on_unknown_interaction(
12077 &mut self,
12078 ordinal: u64,
12079 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12080 ::core::future::ready(())
12081 }
12082}
12083
12084impl<___T> DictionaryEnumerateIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
12085where
12086 ___T: ::fidl_next::Transport,
12087{
12088 async fn on_unknown_interaction(&mut self, _: u64) {}
12089}
12090
12091impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryEnumerateIterator
12092where
12093 ___H: DictionaryEnumerateIteratorClientHandler<___T> + ::core::marker::Send,
12094 ___T: ::fidl_next::Transport,
12095{
12096 async fn on_event(
12097 handler: &mut ___H,
12098 ordinal: u64,
12099 flexibility: ::fidl_next::protocol::Flexibility,
12100 body: ::fidl_next::Body<___T>,
12101 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12102 match ordinal {
12103 ordinal => {
12104 handler.on_unknown_interaction(ordinal).await;
12105 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12106 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12107 } else {
12108 Ok(())
12109 }
12110 }
12111 }
12112 }
12113}
12114
12115pub trait DictionaryEnumerateIteratorServerHandler<
12119 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12120 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12121>
12122{
12123 #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
12124 fn get_next(
12125 &mut self,
12126
12127 request: ::fidl_next::Request<dictionary_enumerate_iterator::GetNext, ___T>,
12128
12129 responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext, ___T>,
12130 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12131
12132 fn on_unknown_interaction(
12133 &mut self,
12134 ordinal: u64,
12135 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12136 ::core::future::ready(())
12137 }
12138}
12139
12140impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryEnumerateIterator
12141where
12142 ___H: DictionaryEnumerateIteratorServerHandler<___T> + ::core::marker::Send,
12143 ___T: ::fidl_next::Transport,
12144 for<'de> crate::wire::DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::Decode<
12145 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12146 Constraint = (),
12147 >,
12148{
12149 async fn on_one_way(
12150 handler: &mut ___H,
12151 ordinal: u64,
12152 flexibility: ::fidl_next::protocol::Flexibility,
12153 body: ::fidl_next::Body<___T>,
12154 ) -> ::core::result::Result<
12155 (),
12156 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12157 > {
12158 match ordinal {
12159 ordinal => {
12160 handler.on_unknown_interaction(ordinal).await;
12161 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12162 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12163 } else {
12164 Ok(())
12165 }
12166 }
12167 }
12168 }
12169
12170 async fn on_two_way(
12171 handler: &mut ___H,
12172 ordinal: u64,
12173 flexibility: ::fidl_next::protocol::Flexibility,
12174 body: ::fidl_next::Body<___T>,
12175 responder: ::fidl_next::protocol::Responder<___T>,
12176 ) -> ::core::result::Result<
12177 (),
12178 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12179 > {
12180 match ordinal {
12181 1511164556663256527 => {
12182 let responder = ::fidl_next::Responder::from_untyped(responder);
12183
12184 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12185 Ok(decoded) => {
12186 handler
12187 .get_next(::fidl_next::Request::from_decoded(decoded), responder)
12188 .await;
12189 Ok(())
12190 }
12191 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12192 ordinal: 1511164556663256527,
12193 error,
12194 }),
12195 }
12196 }
12197
12198 ordinal => {
12199 handler.on_unknown_interaction(ordinal).await;
12200 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12201 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12202 } else {
12203 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12204 ordinal,
12205 flexibility,
12206 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12207 )
12208 .expect("encoding a framework error should never fail")
12209 .await?;
12210 Ok(())
12211 }
12212 }
12213 }
12214 }
12215}
12216
12217#[derive(PartialEq, Debug)]
12219pub struct DictionaryKeysIterator;
12220
12221#[cfg(target_os = "fuchsia")]
12222impl ::fidl_next::HasTransport for DictionaryKeysIterator {
12223 type Transport = ::fidl_next::fuchsia::zx::Channel;
12224}
12225
12226pub mod dictionary_keys_iterator {
12227 pub mod prelude {
12228 pub use crate::{
12229 DictionaryKeysIterator, DictionaryKeysIteratorClientHandler,
12230 DictionaryKeysIteratorServerHandler, dictionary_keys_iterator,
12231 };
12232
12233 pub use crate::natural::DictionaryKeysIteratorGetNextResponse;
12234 }
12235
12236 pub struct GetNext;
12237
12238 impl ::fidl_next::Method for GetNext {
12239 const ORDINAL: u64 = 4987781442555247955;
12240 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12241 ::fidl_next::protocol::Flexibility::Flexible;
12242
12243 type Protocol = crate::DictionaryKeysIterator;
12244
12245 type Request = ::fidl_next::wire::EmptyMessageBody;
12246 }
12247
12248 impl ::fidl_next::TwoWayMethod for GetNext {
12249 type Response = ::fidl_next::wire::Flexible<
12250 'static,
12251 crate::wire::DictionaryKeysIteratorGetNextResponse<'static>,
12252 >;
12253 }
12254
12255 impl<___R> ::fidl_next::Respond<___R> for GetNext {
12256 type Output =
12257 ::fidl_next::Flexible<crate::generic::DictionaryKeysIteratorGetNextResponse<___R>>;
12258
12259 fn respond(response: ___R) -> Self::Output {
12260 ::fidl_next::Flexible::Ok(crate::generic::DictionaryKeysIteratorGetNextResponse {
12261 keys: response,
12262 })
12263 }
12264 }
12265
12266 mod ___detail {
12267 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryKeysIterator
12268 where
12269 ___T: ::fidl_next::Transport,
12270 {
12271 type Client = DictionaryKeysIteratorClient<___T>;
12272 type Server = DictionaryKeysIteratorServer<___T>;
12273 }
12274
12275 #[repr(transparent)]
12277 pub struct DictionaryKeysIteratorClient<___T: ::fidl_next::Transport> {
12278 #[allow(dead_code)]
12279 client: ::fidl_next::protocol::Client<___T>,
12280 }
12281
12282 impl<___T> DictionaryKeysIteratorClient<___T>
12283 where
12284 ___T: ::fidl_next::Transport,
12285 {
12286 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
12287 ::fidl_next::TwoWayFuture::from_untyped(
12288 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
12289 4987781442555247955,
12290 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
12291 (),
12292 ),
12293 )
12294 }
12295 }
12296
12297 #[repr(transparent)]
12299 pub struct DictionaryKeysIteratorServer<___T: ::fidl_next::Transport> {
12300 server: ::fidl_next::protocol::Server<___T>,
12301 }
12302
12303 impl<___T> DictionaryKeysIteratorServer<___T> where ___T: ::fidl_next::Transport {}
12304 }
12305}
12306
12307pub trait DictionaryKeysIteratorClientHandler<
12311 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12312 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12313>
12314{
12315 fn on_unknown_interaction(
12316 &mut self,
12317 ordinal: u64,
12318 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12319 ::core::future::ready(())
12320 }
12321}
12322
12323impl<___T> DictionaryKeysIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents
12324where
12325 ___T: ::fidl_next::Transport,
12326{
12327 async fn on_unknown_interaction(&mut self, _: u64) {}
12328}
12329
12330impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryKeysIterator
12331where
12332 ___H: DictionaryKeysIteratorClientHandler<___T> + ::core::marker::Send,
12333 ___T: ::fidl_next::Transport,
12334{
12335 async fn on_event(
12336 handler: &mut ___H,
12337 ordinal: u64,
12338 flexibility: ::fidl_next::protocol::Flexibility,
12339 body: ::fidl_next::Body<___T>,
12340 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12341 match ordinal {
12342 ordinal => {
12343 handler.on_unknown_interaction(ordinal).await;
12344 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12345 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12346 } else {
12347 Ok(())
12348 }
12349 }
12350 }
12351 }
12352}
12353
12354pub trait DictionaryKeysIteratorServerHandler<
12358 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12359 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12360>
12361{
12362 fn get_next(
12363 &mut self,
12364
12365 responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext, ___T>,
12366 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12367
12368 fn on_unknown_interaction(
12369 &mut self,
12370 ordinal: u64,
12371 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12372 ::core::future::ready(())
12373 }
12374}
12375
12376impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryKeysIterator
12377where
12378 ___H: DictionaryKeysIteratorServerHandler<___T> + ::core::marker::Send,
12379 ___T: ::fidl_next::Transport,
12380{
12381 async fn on_one_way(
12382 handler: &mut ___H,
12383 ordinal: u64,
12384 flexibility: ::fidl_next::protocol::Flexibility,
12385 body: ::fidl_next::Body<___T>,
12386 ) -> ::core::result::Result<
12387 (),
12388 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12389 > {
12390 match ordinal {
12391 ordinal => {
12392 handler.on_unknown_interaction(ordinal).await;
12393 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12394 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12395 } else {
12396 Ok(())
12397 }
12398 }
12399 }
12400 }
12401
12402 async fn on_two_way(
12403 handler: &mut ___H,
12404 ordinal: u64,
12405 flexibility: ::fidl_next::protocol::Flexibility,
12406 body: ::fidl_next::Body<___T>,
12407 responder: ::fidl_next::protocol::Responder<___T>,
12408 ) -> ::core::result::Result<
12409 (),
12410 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12411 > {
12412 match ordinal {
12413 4987781442555247955 => {
12414 let responder = ::fidl_next::Responder::from_untyped(responder);
12415
12416 handler.get_next(responder).await;
12417 Ok(())
12418 }
12419
12420 ordinal => {
12421 handler.on_unknown_interaction(ordinal).await;
12422 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12423 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12424 } else {
12425 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12426 ordinal,
12427 flexibility,
12428 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12429 )
12430 .expect("encoding a framework error should never fail")
12431 .await?;
12432 Ok(())
12433 }
12434 }
12435 }
12436 }
12437}
12438
12439#[derive(PartialEq, Debug)]
12441pub struct DictionaryRouter;
12442
12443impl ::fidl_next::Discoverable for DictionaryRouter {
12444 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
12445}
12446
12447#[cfg(target_os = "fuchsia")]
12448impl ::fidl_next::HasTransport for DictionaryRouter {
12449 type Transport = ::fidl_next::fuchsia::zx::Channel;
12450}
12451
12452pub mod dictionary_router {
12453 pub mod prelude {
12454 pub use crate::{
12455 DictionaryRouter, DictionaryRouterClientHandler, DictionaryRouterServerHandler,
12456 dictionary_router,
12457 };
12458
12459 pub use crate::natural::DictionaryRouterRouteResponse;
12460
12461 pub use crate::natural::RouteRequest;
12462
12463 pub use crate::natural::RouterError;
12464 }
12465
12466 pub struct Route;
12467
12468 impl ::fidl_next::Method for Route {
12469 const ORDINAL: u64 = 8164012099375978399;
12470 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12471 ::fidl_next::protocol::Flexibility::Flexible;
12472
12473 type Protocol = crate::DictionaryRouter;
12474
12475 type Request = crate::wire::RouteRequest<'static>;
12476 }
12477
12478 impl ::fidl_next::TwoWayMethod for Route {
12479 type Response = ::fidl_next::wire::FlexibleResult<
12480 'static,
12481 crate::wire::DictionaryRouterRouteResponse,
12482 crate::wire::RouterError,
12483 >;
12484 }
12485
12486 impl<___R> ::fidl_next::Respond<___R> for Route {
12487 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
12488
12489 fn respond(response: ___R) -> Self::Output {
12490 ::fidl_next::FlexibleResult::Ok(response)
12491 }
12492 }
12493
12494 impl<___R> ::fidl_next::RespondErr<___R> for Route {
12495 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12496
12497 fn respond_err(response: ___R) -> Self::Output {
12498 ::fidl_next::FlexibleResult::Err(response)
12499 }
12500 }
12501
12502 mod ___detail {
12503 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DictionaryRouter
12504 where
12505 ___T: ::fidl_next::Transport,
12506 {
12507 type Client = DictionaryRouterClient<___T>;
12508 type Server = DictionaryRouterServer<___T>;
12509 }
12510
12511 #[repr(transparent)]
12513 pub struct DictionaryRouterClient<___T: ::fidl_next::Transport> {
12514 #[allow(dead_code)]
12515 client: ::fidl_next::protocol::Client<___T>,
12516 }
12517
12518 impl<___T> DictionaryRouterClient<___T>
12519 where
12520 ___T: ::fidl_next::Transport,
12521 {
12522 pub fn route_with<___R>(
12523 &self,
12524 request: ___R,
12525 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
12526 where
12527 ___R: ::fidl_next::Encode<
12528 crate::wire::RouteRequest<'static>,
12529 <___T as ::fidl_next::Transport>::SendBuffer,
12530 >,
12531 {
12532 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12533 8164012099375978399,
12534 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
12535 request,
12536 ))
12537 }
12538 }
12539
12540 #[repr(transparent)]
12542 pub struct DictionaryRouterServer<___T: ::fidl_next::Transport> {
12543 server: ::fidl_next::protocol::Server<___T>,
12544 }
12545
12546 impl<___T> DictionaryRouterServer<___T> where ___T: ::fidl_next::Transport {}
12547 }
12548}
12549
12550pub trait DictionaryRouterClientHandler<
12554 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12555 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12556>
12557{
12558 fn on_unknown_interaction(
12559 &mut self,
12560 ordinal: u64,
12561 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12562 ::core::future::ready(())
12563 }
12564}
12565
12566impl<___T> DictionaryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
12567where
12568 ___T: ::fidl_next::Transport,
12569{
12570 async fn on_unknown_interaction(&mut self, _: u64) {}
12571}
12572
12573impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryRouter
12574where
12575 ___H: DictionaryRouterClientHandler<___T> + ::core::marker::Send,
12576 ___T: ::fidl_next::Transport,
12577{
12578 async fn on_event(
12579 handler: &mut ___H,
12580 ordinal: u64,
12581 flexibility: ::fidl_next::protocol::Flexibility,
12582 body: ::fidl_next::Body<___T>,
12583 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12584 match ordinal {
12585 ordinal => {
12586 handler.on_unknown_interaction(ordinal).await;
12587 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12588 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12589 } else {
12590 Ok(())
12591 }
12592 }
12593 }
12594 }
12595}
12596
12597pub trait DictionaryRouterServerHandler<
12601 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12602 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12603>
12604{
12605 fn route(
12606 &mut self,
12607
12608 request: ::fidl_next::Request<dictionary_router::Route, ___T>,
12609
12610 responder: ::fidl_next::Responder<dictionary_router::Route, ___T>,
12611 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12612
12613 fn on_unknown_interaction(
12614 &mut self,
12615 ordinal: u64,
12616 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12617 ::core::future::ready(())
12618 }
12619}
12620
12621impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryRouter
12622where
12623 ___H: DictionaryRouterServerHandler<___T> + ::core::marker::Send,
12624 ___T: ::fidl_next::Transport,
12625 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12626 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12627 Constraint = (),
12628 >,
12629{
12630 async fn on_one_way(
12631 handler: &mut ___H,
12632 ordinal: u64,
12633 flexibility: ::fidl_next::protocol::Flexibility,
12634 body: ::fidl_next::Body<___T>,
12635 ) -> ::core::result::Result<
12636 (),
12637 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12638 > {
12639 match ordinal {
12640 ordinal => {
12641 handler.on_unknown_interaction(ordinal).await;
12642 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12643 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12644 } else {
12645 Ok(())
12646 }
12647 }
12648 }
12649 }
12650
12651 async fn on_two_way(
12652 handler: &mut ___H,
12653 ordinal: u64,
12654 flexibility: ::fidl_next::protocol::Flexibility,
12655 body: ::fidl_next::Body<___T>,
12656 responder: ::fidl_next::protocol::Responder<___T>,
12657 ) -> ::core::result::Result<
12658 (),
12659 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12660 > {
12661 match ordinal {
12662 8164012099375978399 => {
12663 let responder = ::fidl_next::Responder::from_untyped(responder);
12664
12665 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12666 Ok(decoded) => {
12667 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
12668 Ok(())
12669 }
12670 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12671 ordinal: 8164012099375978399,
12672 error,
12673 }),
12674 }
12675 }
12676
12677 ordinal => {
12678 handler.on_unknown_interaction(ordinal).await;
12679 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12680 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12681 } else {
12682 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12683 ordinal,
12684 flexibility,
12685 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12686 )
12687 .expect("encoding a framework error should never fail")
12688 .await?;
12689 Ok(())
12690 }
12691 }
12692 }
12693 }
12694}
12695
12696#[derive(PartialEq, Debug)]
12698pub struct DirConnectorRouter;
12699
12700impl ::fidl_next::Discoverable for DirConnectorRouter {
12701 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
12702}
12703
12704#[cfg(target_os = "fuchsia")]
12705impl ::fidl_next::HasTransport for DirConnectorRouter {
12706 type Transport = ::fidl_next::fuchsia::zx::Channel;
12707}
12708
12709pub mod dir_connector_router {
12710 pub mod prelude {
12711 pub use crate::{
12712 DirConnectorRouter, DirConnectorRouterClientHandler, DirConnectorRouterServerHandler,
12713 dir_connector_router,
12714 };
12715
12716 pub use crate::natural::DirConnectorRouterRouteResponse;
12717
12718 pub use crate::natural::RouteRequest;
12719
12720 pub use crate::natural::RouterError;
12721 }
12722
12723 pub struct Route;
12724
12725 impl ::fidl_next::Method for Route {
12726 const ORDINAL: u64 = 972231070188342848;
12727 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12728 ::fidl_next::protocol::Flexibility::Flexible;
12729
12730 type Protocol = crate::DirConnectorRouter;
12731
12732 type Request = crate::wire::RouteRequest<'static>;
12733 }
12734
12735 impl ::fidl_next::TwoWayMethod for Route {
12736 type Response = ::fidl_next::wire::FlexibleResult<
12737 'static,
12738 crate::wire::DirConnectorRouterRouteResponse,
12739 crate::wire::RouterError,
12740 >;
12741 }
12742
12743 impl<___R> ::fidl_next::Respond<___R> for Route {
12744 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
12745
12746 fn respond(response: ___R) -> Self::Output {
12747 ::fidl_next::FlexibleResult::Ok(response)
12748 }
12749 }
12750
12751 impl<___R> ::fidl_next::RespondErr<___R> for Route {
12752 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12753
12754 fn respond_err(response: ___R) -> Self::Output {
12755 ::fidl_next::FlexibleResult::Err(response)
12756 }
12757 }
12758
12759 mod ___detail {
12760 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirConnectorRouter
12761 where
12762 ___T: ::fidl_next::Transport,
12763 {
12764 type Client = DirConnectorRouterClient<___T>;
12765 type Server = DirConnectorRouterServer<___T>;
12766 }
12767
12768 #[repr(transparent)]
12770 pub struct DirConnectorRouterClient<___T: ::fidl_next::Transport> {
12771 #[allow(dead_code)]
12772 client: ::fidl_next::protocol::Client<___T>,
12773 }
12774
12775 impl<___T> DirConnectorRouterClient<___T>
12776 where
12777 ___T: ::fidl_next::Transport,
12778 {
12779 pub fn route_with<___R>(
12780 &self,
12781 request: ___R,
12782 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
12783 where
12784 ___R: ::fidl_next::Encode<
12785 crate::wire::RouteRequest<'static>,
12786 <___T as ::fidl_next::Transport>::SendBuffer,
12787 >,
12788 {
12789 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12790 972231070188342848,
12791 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
12792 request,
12793 ))
12794 }
12795 }
12796
12797 #[repr(transparent)]
12799 pub struct DirConnectorRouterServer<___T: ::fidl_next::Transport> {
12800 server: ::fidl_next::protocol::Server<___T>,
12801 }
12802
12803 impl<___T> DirConnectorRouterServer<___T> where ___T: ::fidl_next::Transport {}
12804 }
12805}
12806
12807pub trait DirConnectorRouterClientHandler<
12811 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12812 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12813>
12814{
12815 fn on_unknown_interaction(
12816 &mut self,
12817 ordinal: u64,
12818 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12819 ::core::future::ready(())
12820 }
12821}
12822
12823impl<___T> DirConnectorRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
12824where
12825 ___T: ::fidl_next::Transport,
12826{
12827 async fn on_unknown_interaction(&mut self, _: u64) {}
12828}
12829
12830impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirConnectorRouter
12831where
12832 ___H: DirConnectorRouterClientHandler<___T> + ::core::marker::Send,
12833 ___T: ::fidl_next::Transport,
12834{
12835 async fn on_event(
12836 handler: &mut ___H,
12837 ordinal: u64,
12838 flexibility: ::fidl_next::protocol::Flexibility,
12839 body: ::fidl_next::Body<___T>,
12840 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12841 match ordinal {
12842 ordinal => {
12843 handler.on_unknown_interaction(ordinal).await;
12844 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12845 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12846 } else {
12847 Ok(())
12848 }
12849 }
12850 }
12851 }
12852}
12853
12854pub trait DirConnectorRouterServerHandler<
12858 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12859 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12860>
12861{
12862 fn route(
12863 &mut self,
12864
12865 request: ::fidl_next::Request<dir_connector_router::Route, ___T>,
12866
12867 responder: ::fidl_next::Responder<dir_connector_router::Route, ___T>,
12868 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12869
12870 fn on_unknown_interaction(
12871 &mut self,
12872 ordinal: u64,
12873 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12874 ::core::future::ready(())
12875 }
12876}
12877
12878impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirConnectorRouter
12879where
12880 ___H: DirConnectorRouterServerHandler<___T> + ::core::marker::Send,
12881 ___T: ::fidl_next::Transport,
12882 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
12883 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12884 Constraint = (),
12885 >,
12886{
12887 async fn on_one_way(
12888 handler: &mut ___H,
12889 ordinal: u64,
12890 flexibility: ::fidl_next::protocol::Flexibility,
12891 body: ::fidl_next::Body<___T>,
12892 ) -> ::core::result::Result<
12893 (),
12894 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12895 > {
12896 match ordinal {
12897 ordinal => {
12898 handler.on_unknown_interaction(ordinal).await;
12899 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12900 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12901 } else {
12902 Ok(())
12903 }
12904 }
12905 }
12906 }
12907
12908 async fn on_two_way(
12909 handler: &mut ___H,
12910 ordinal: u64,
12911 flexibility: ::fidl_next::protocol::Flexibility,
12912 body: ::fidl_next::Body<___T>,
12913 responder: ::fidl_next::protocol::Responder<___T>,
12914 ) -> ::core::result::Result<
12915 (),
12916 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12917 > {
12918 match ordinal {
12919 972231070188342848 => {
12920 let responder = ::fidl_next::Responder::from_untyped(responder);
12921
12922 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12923 Ok(decoded) => {
12924 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
12925 Ok(())
12926 }
12927 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12928 ordinal: 972231070188342848,
12929 error,
12930 }),
12931 }
12932 }
12933
12934 ordinal => {
12935 handler.on_unknown_interaction(ordinal).await;
12936 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12937 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12938 } else {
12939 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12940 ordinal,
12941 flexibility,
12942 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12943 )
12944 .expect("encoding a framework error should never fail")
12945 .await?;
12946 Ok(())
12947 }
12948 }
12949 }
12950 }
12951}
12952
12953#[derive(PartialEq, Debug)]
12955pub struct DirEntryRouter;
12956
12957impl ::fidl_next::Discoverable for DirEntryRouter {
12958 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
12959}
12960
12961#[cfg(target_os = "fuchsia")]
12962impl ::fidl_next::HasTransport for DirEntryRouter {
12963 type Transport = ::fidl_next::fuchsia::zx::Channel;
12964}
12965
12966pub mod dir_entry_router {
12967 pub mod prelude {
12968 pub use crate::{
12969 DirEntryRouter, DirEntryRouterClientHandler, DirEntryRouterServerHandler,
12970 dir_entry_router,
12971 };
12972
12973 pub use crate::natural::DirEntryRouterRouteResponse;
12974
12975 pub use crate::natural::RouteRequest;
12976
12977 pub use crate::natural::RouterError;
12978 }
12979
12980 pub struct Route;
12981
12982 impl ::fidl_next::Method for Route {
12983 const ORDINAL: u64 = 1929392218567642066;
12984 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12985 ::fidl_next::protocol::Flexibility::Flexible;
12986
12987 type Protocol = crate::DirEntryRouter;
12988
12989 type Request = crate::wire::RouteRequest<'static>;
12990 }
12991
12992 impl ::fidl_next::TwoWayMethod for Route {
12993 type Response = ::fidl_next::wire::FlexibleResult<
12994 'static,
12995 crate::wire::DirEntryRouterRouteResponse,
12996 crate::wire::RouterError,
12997 >;
12998 }
12999
13000 impl<___R> ::fidl_next::Respond<___R> for Route {
13001 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13002
13003 fn respond(response: ___R) -> Self::Output {
13004 ::fidl_next::FlexibleResult::Ok(response)
13005 }
13006 }
13007
13008 impl<___R> ::fidl_next::RespondErr<___R> for Route {
13009 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13010
13011 fn respond_err(response: ___R) -> Self::Output {
13012 ::fidl_next::FlexibleResult::Err(response)
13013 }
13014 }
13015
13016 mod ___detail {
13017 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirEntryRouter
13018 where
13019 ___T: ::fidl_next::Transport,
13020 {
13021 type Client = DirEntryRouterClient<___T>;
13022 type Server = DirEntryRouterServer<___T>;
13023 }
13024
13025 #[repr(transparent)]
13027 pub struct DirEntryRouterClient<___T: ::fidl_next::Transport> {
13028 #[allow(dead_code)]
13029 client: ::fidl_next::protocol::Client<___T>,
13030 }
13031
13032 impl<___T> DirEntryRouterClient<___T>
13033 where
13034 ___T: ::fidl_next::Transport,
13035 {
13036 pub fn route_with<___R>(
13037 &self,
13038 request: ___R,
13039 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
13040 where
13041 ___R: ::fidl_next::Encode<
13042 crate::wire::RouteRequest<'static>,
13043 <___T as ::fidl_next::Transport>::SendBuffer,
13044 >,
13045 {
13046 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13047 1929392218567642066,
13048 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
13049 request,
13050 ))
13051 }
13052 }
13053
13054 #[repr(transparent)]
13056 pub struct DirEntryRouterServer<___T: ::fidl_next::Transport> {
13057 server: ::fidl_next::protocol::Server<___T>,
13058 }
13059
13060 impl<___T> DirEntryRouterServer<___T> where ___T: ::fidl_next::Transport {}
13061 }
13062}
13063
13064pub trait DirEntryRouterClientHandler<
13068 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13069 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13070>
13071{
13072 fn on_unknown_interaction(
13073 &mut self,
13074 ordinal: u64,
13075 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13076 ::core::future::ready(())
13077 }
13078}
13079
13080impl<___T> DirEntryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
13081where
13082 ___T: ::fidl_next::Transport,
13083{
13084 async fn on_unknown_interaction(&mut self, _: u64) {}
13085}
13086
13087impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirEntryRouter
13088where
13089 ___H: DirEntryRouterClientHandler<___T> + ::core::marker::Send,
13090 ___T: ::fidl_next::Transport,
13091{
13092 async fn on_event(
13093 handler: &mut ___H,
13094 ordinal: u64,
13095 flexibility: ::fidl_next::protocol::Flexibility,
13096 body: ::fidl_next::Body<___T>,
13097 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13098 match ordinal {
13099 ordinal => {
13100 handler.on_unknown_interaction(ordinal).await;
13101 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13102 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13103 } else {
13104 Ok(())
13105 }
13106 }
13107 }
13108 }
13109}
13110
13111pub trait DirEntryRouterServerHandler<
13115 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13116 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13117>
13118{
13119 fn route(
13120 &mut self,
13121
13122 request: ::fidl_next::Request<dir_entry_router::Route, ___T>,
13123
13124 responder: ::fidl_next::Responder<dir_entry_router::Route, ___T>,
13125 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13126
13127 fn on_unknown_interaction(
13128 &mut self,
13129 ordinal: u64,
13130 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13131 ::core::future::ready(())
13132 }
13133}
13134
13135impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirEntryRouter
13136where
13137 ___H: DirEntryRouterServerHandler<___T> + ::core::marker::Send,
13138 ___T: ::fidl_next::Transport,
13139 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
13140 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13141 Constraint = (),
13142 >,
13143{
13144 async fn on_one_way(
13145 handler: &mut ___H,
13146 ordinal: u64,
13147 flexibility: ::fidl_next::protocol::Flexibility,
13148 body: ::fidl_next::Body<___T>,
13149 ) -> ::core::result::Result<
13150 (),
13151 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13152 > {
13153 match ordinal {
13154 ordinal => {
13155 handler.on_unknown_interaction(ordinal).await;
13156 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13157 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13158 } else {
13159 Ok(())
13160 }
13161 }
13162 }
13163 }
13164
13165 async fn on_two_way(
13166 handler: &mut ___H,
13167 ordinal: u64,
13168 flexibility: ::fidl_next::protocol::Flexibility,
13169 body: ::fidl_next::Body<___T>,
13170 responder: ::fidl_next::protocol::Responder<___T>,
13171 ) -> ::core::result::Result<
13172 (),
13173 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13174 > {
13175 match ordinal {
13176 1929392218567642066 => {
13177 let responder = ::fidl_next::Responder::from_untyped(responder);
13178
13179 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13180 Ok(decoded) => {
13181 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
13182 Ok(())
13183 }
13184 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13185 ordinal: 1929392218567642066,
13186 error,
13187 }),
13188 }
13189 }
13190
13191 ordinal => {
13192 handler.on_unknown_interaction(ordinal).await;
13193 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13194 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13195 } else {
13196 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13197 ordinal,
13198 flexibility,
13199 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13200 )
13201 .expect("encoding a framework error should never fail")
13202 .await?;
13203 Ok(())
13204 }
13205 }
13206 }
13207 }
13208}
13209
13210#[doc = " A receiver is served by components and allows them to receive directory channels\n framework.\n"]
13212#[derive(PartialEq, Debug)]
13213pub struct DirReceiver;
13214
13215impl ::fidl_next::Discoverable for DirReceiver {
13216 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
13217}
13218
13219#[cfg(target_os = "fuchsia")]
13220impl ::fidl_next::HasTransport for DirReceiver {
13221 type Transport = ::fidl_next::fuchsia::zx::Channel;
13222}
13223
13224pub mod dir_receiver {
13225 pub mod prelude {
13226 pub use crate::{
13227 DirReceiver, DirReceiverClientHandler, DirReceiverServerHandler, dir_receiver,
13228 };
13229
13230 pub use crate::natural::DirReceiverReceiveRequest;
13231 }
13232
13233 pub struct Receive;
13234
13235 impl ::fidl_next::Method for Receive {
13236 const ORDINAL: u64 = 926684461087488948;
13237 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13238 ::fidl_next::protocol::Flexibility::Flexible;
13239
13240 type Protocol = crate::DirReceiver;
13241
13242 type Request = crate::wire::DirReceiverReceiveRequest<'static>;
13243 }
13244
13245 mod ___detail {
13246 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirReceiver
13247 where
13248 ___T: ::fidl_next::Transport,
13249 {
13250 type Client = DirReceiverClient<___T>;
13251 type Server = DirReceiverServer<___T>;
13252 }
13253
13254 #[repr(transparent)]
13256 pub struct DirReceiverClient<___T: ::fidl_next::Transport> {
13257 #[allow(dead_code)]
13258 client: ::fidl_next::protocol::Client<___T>,
13259 }
13260
13261 impl<___T> DirReceiverClient<___T>
13262 where
13263 ___T: ::fidl_next::Transport,
13264 {
13265 #[doc = " Sends a directory channel to this receiver.\n\n The server should implement this method by forwarding `channel` to a vfs instance\n of the language appropriate `vfs` library.\n"]
13266 pub fn receive_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
13267 where
13268 ___R: ::fidl_next::Encode<
13269 crate::wire::DirReceiverReceiveRequest<'static>,
13270 <___T as ::fidl_next::Transport>::SendBuffer,
13271 >,
13272 {
13273 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
13274 926684461087488948,
13275 <super::Receive as ::fidl_next::Method>::FLEXIBILITY,
13276 request,
13277 ))
13278 }
13279 }
13280
13281 #[repr(transparent)]
13283 pub struct DirReceiverServer<___T: ::fidl_next::Transport> {
13284 server: ::fidl_next::protocol::Server<___T>,
13285 }
13286
13287 impl<___T> DirReceiverServer<___T> where ___T: ::fidl_next::Transport {}
13288 }
13289}
13290
13291pub trait DirReceiverClientHandler<
13295 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13296 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13297>
13298{
13299 fn on_unknown_interaction(
13300 &mut self,
13301 ordinal: u64,
13302 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13303 ::core::future::ready(())
13304 }
13305}
13306
13307impl<___T> DirReceiverClientHandler<___T> for ::fidl_next::IgnoreEvents
13308where
13309 ___T: ::fidl_next::Transport,
13310{
13311 async fn on_unknown_interaction(&mut self, _: u64) {}
13312}
13313
13314impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirReceiver
13315where
13316 ___H: DirReceiverClientHandler<___T> + ::core::marker::Send,
13317 ___T: ::fidl_next::Transport,
13318{
13319 async fn on_event(
13320 handler: &mut ___H,
13321 ordinal: u64,
13322 flexibility: ::fidl_next::protocol::Flexibility,
13323 body: ::fidl_next::Body<___T>,
13324 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13325 match ordinal {
13326 ordinal => {
13327 handler.on_unknown_interaction(ordinal).await;
13328 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13329 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13330 } else {
13331 Ok(())
13332 }
13333 }
13334 }
13335 }
13336}
13337
13338pub trait DirReceiverServerHandler<
13342 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13343 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13344>
13345{
13346 #[doc = " Sends a directory channel to this receiver.\n\n The server should implement this method by forwarding `channel` to a vfs instance\n of the language appropriate `vfs` library.\n"]
13347 fn receive(
13348 &mut self,
13349
13350 request: ::fidl_next::Request<dir_receiver::Receive, ___T>,
13351 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13352
13353 fn on_unknown_interaction(
13354 &mut self,
13355 ordinal: u64,
13356 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13357 ::core::future::ready(())
13358 }
13359}
13360
13361impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirReceiver
13362where
13363 ___H: DirReceiverServerHandler<___T> + ::core::marker::Send,
13364 ___T: ::fidl_next::Transport,
13365 for<'de> crate::wire::DirReceiverReceiveRequest<'de>: ::fidl_next::Decode<
13366 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13367 Constraint = (),
13368 >,
13369{
13370 async fn on_one_way(
13371 handler: &mut ___H,
13372 ordinal: u64,
13373 flexibility: ::fidl_next::protocol::Flexibility,
13374 body: ::fidl_next::Body<___T>,
13375 ) -> ::core::result::Result<
13376 (),
13377 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13378 > {
13379 match ordinal {
13380 926684461087488948 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13381 Ok(decoded) => {
13382 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
13383 Ok(())
13384 }
13385 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13386 ordinal: 926684461087488948,
13387 error,
13388 }),
13389 },
13390
13391 ordinal => {
13392 handler.on_unknown_interaction(ordinal).await;
13393 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13394 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13395 } else {
13396 Ok(())
13397 }
13398 }
13399 }
13400 }
13401
13402 async fn on_two_way(
13403 handler: &mut ___H,
13404 ordinal: u64,
13405 flexibility: ::fidl_next::protocol::Flexibility,
13406 body: ::fidl_next::Body<___T>,
13407 responder: ::fidl_next::protocol::Responder<___T>,
13408 ) -> ::core::result::Result<
13409 (),
13410 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13411 > {
13412 match ordinal {
13413 ordinal => {
13414 handler.on_unknown_interaction(ordinal).await;
13415 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13416 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13417 } else {
13418 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13419 ordinal,
13420 flexibility,
13421 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13422 )
13423 .expect("encoding a framework error should never fail")
13424 .await?;
13425 Ok(())
13426 }
13427 }
13428 }
13429 }
13430}
13431
13432#[derive(PartialEq, Debug)]
13434pub struct DirectoryRouter;
13435
13436impl ::fidl_next::Discoverable for DirectoryRouter {
13437 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
13438}
13439
13440#[cfg(target_os = "fuchsia")]
13441impl ::fidl_next::HasTransport for DirectoryRouter {
13442 type Transport = ::fidl_next::fuchsia::zx::Channel;
13443}
13444
13445pub mod directory_router {
13446 pub mod prelude {
13447 pub use crate::{
13448 DirectoryRouter, DirectoryRouterClientHandler, DirectoryRouterServerHandler,
13449 directory_router,
13450 };
13451
13452 pub use crate::natural::DirectoryRouterRouteResponse;
13453
13454 pub use crate::natural::RouteRequest;
13455
13456 pub use crate::natural::RouterError;
13457 }
13458
13459 pub struct Route;
13460
13461 impl ::fidl_next::Method for Route {
13462 const ORDINAL: u64 = 7510716014181158689;
13463 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13464 ::fidl_next::protocol::Flexibility::Flexible;
13465
13466 type Protocol = crate::DirectoryRouter;
13467
13468 type Request = crate::wire::RouteRequest<'static>;
13469 }
13470
13471 impl ::fidl_next::TwoWayMethod for Route {
13472 type Response = ::fidl_next::wire::FlexibleResult<
13473 'static,
13474 crate::wire::DirectoryRouterRouteResponse,
13475 crate::wire::RouterError,
13476 >;
13477 }
13478
13479 impl<___R> ::fidl_next::Respond<___R> for Route {
13480 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13481
13482 fn respond(response: ___R) -> Self::Output {
13483 ::fidl_next::FlexibleResult::Ok(response)
13484 }
13485 }
13486
13487 impl<___R> ::fidl_next::RespondErr<___R> for Route {
13488 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13489
13490 fn respond_err(response: ___R) -> Self::Output {
13491 ::fidl_next::FlexibleResult::Err(response)
13492 }
13493 }
13494
13495 mod ___detail {
13496 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirectoryRouter
13497 where
13498 ___T: ::fidl_next::Transport,
13499 {
13500 type Client = DirectoryRouterClient<___T>;
13501 type Server = DirectoryRouterServer<___T>;
13502 }
13503
13504 #[repr(transparent)]
13506 pub struct DirectoryRouterClient<___T: ::fidl_next::Transport> {
13507 #[allow(dead_code)]
13508 client: ::fidl_next::protocol::Client<___T>,
13509 }
13510
13511 impl<___T> DirectoryRouterClient<___T>
13512 where
13513 ___T: ::fidl_next::Transport,
13514 {
13515 pub fn route_with<___R>(
13516 &self,
13517 request: ___R,
13518 ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
13519 where
13520 ___R: ::fidl_next::Encode<
13521 crate::wire::RouteRequest<'static>,
13522 <___T as ::fidl_next::Transport>::SendBuffer,
13523 >,
13524 {
13525 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13526 7510716014181158689,
13527 <super::Route as ::fidl_next::Method>::FLEXIBILITY,
13528 request,
13529 ))
13530 }
13531 }
13532
13533 #[repr(transparent)]
13535 pub struct DirectoryRouterServer<___T: ::fidl_next::Transport> {
13536 server: ::fidl_next::protocol::Server<___T>,
13537 }
13538
13539 impl<___T> DirectoryRouterServer<___T> where ___T: ::fidl_next::Transport {}
13540 }
13541}
13542
13543pub trait DirectoryRouterClientHandler<
13547 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13548 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13549>
13550{
13551 fn on_unknown_interaction(
13552 &mut self,
13553 ordinal: u64,
13554 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13555 ::core::future::ready(())
13556 }
13557}
13558
13559impl<___T> DirectoryRouterClientHandler<___T> for ::fidl_next::IgnoreEvents
13560where
13561 ___T: ::fidl_next::Transport,
13562{
13563 async fn on_unknown_interaction(&mut self, _: u64) {}
13564}
13565
13566impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryRouter
13567where
13568 ___H: DirectoryRouterClientHandler<___T> + ::core::marker::Send,
13569 ___T: ::fidl_next::Transport,
13570{
13571 async fn on_event(
13572 handler: &mut ___H,
13573 ordinal: u64,
13574 flexibility: ::fidl_next::protocol::Flexibility,
13575 body: ::fidl_next::Body<___T>,
13576 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13577 match ordinal {
13578 ordinal => {
13579 handler.on_unknown_interaction(ordinal).await;
13580 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13581 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13582 } else {
13583 Ok(())
13584 }
13585 }
13586 }
13587 }
13588}
13589
13590pub trait DirectoryRouterServerHandler<
13594 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13595 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13596>
13597{
13598 fn route(
13599 &mut self,
13600
13601 request: ::fidl_next::Request<directory_router::Route, ___T>,
13602
13603 responder: ::fidl_next::Responder<directory_router::Route, ___T>,
13604 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13605
13606 fn on_unknown_interaction(
13607 &mut self,
13608 ordinal: u64,
13609 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13610 ::core::future::ready(())
13611 }
13612}
13613
13614impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryRouter
13615where
13616 ___H: DirectoryRouterServerHandler<___T> + ::core::marker::Send,
13617 ___T: ::fidl_next::Transport,
13618 for<'de> crate::wire::RouteRequest<'de>: ::fidl_next::Decode<
13619 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13620 Constraint = (),
13621 >,
13622{
13623 async fn on_one_way(
13624 handler: &mut ___H,
13625 ordinal: u64,
13626 flexibility: ::fidl_next::protocol::Flexibility,
13627 body: ::fidl_next::Body<___T>,
13628 ) -> ::core::result::Result<
13629 (),
13630 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13631 > {
13632 match ordinal {
13633 ordinal => {
13634 handler.on_unknown_interaction(ordinal).await;
13635 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13636 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13637 } else {
13638 Ok(())
13639 }
13640 }
13641 }
13642 }
13643
13644 async fn on_two_way(
13645 handler: &mut ___H,
13646 ordinal: u64,
13647 flexibility: ::fidl_next::protocol::Flexibility,
13648 body: ::fidl_next::Body<___T>,
13649 responder: ::fidl_next::protocol::Responder<___T>,
13650 ) -> ::core::result::Result<
13651 (),
13652 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13653 > {
13654 match ordinal {
13655 7510716014181158689 => {
13656 let responder = ::fidl_next::Responder::from_untyped(responder);
13657
13658 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13659 Ok(decoded) => {
13660 handler.route(::fidl_next::Request::from_decoded(decoded), responder).await;
13661 Ok(())
13662 }
13663 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13664 ordinal: 7510716014181158689,
13665 error,
13666 }),
13667 }
13668 }
13669
13670 ordinal => {
13671 handler.on_unknown_interaction(ordinal).await;
13672 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13673 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13674 } else {
13675 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13676 ordinal,
13677 flexibility,
13678 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13679 )
13680 .expect("encoding a framework error should never fail")
13681 .await?;
13682 Ok(())
13683 }
13684 }
13685 }
13686 }
13687}
13688
13689#[doc = " A receiver is served by components and allows them to receive channels\n from the framework.\n"]
13691#[derive(PartialEq, Debug)]
13692pub struct Receiver;
13693
13694impl ::fidl_next::Discoverable for Receiver {
13695 const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
13696}
13697
13698#[cfg(target_os = "fuchsia")]
13699impl ::fidl_next::HasTransport for Receiver {
13700 type Transport = ::fidl_next::fuchsia::zx::Channel;
13701}
13702
13703pub mod receiver {
13704 pub mod prelude {
13705 pub use crate::{Receiver, ReceiverClientHandler, ReceiverServerHandler, receiver};
13706
13707 pub use crate::natural::ProtocolPayload;
13708 }
13709
13710 pub struct Receive;
13711
13712 impl ::fidl_next::Method for Receive {
13713 const ORDINAL: u64 = 340832707723008660;
13714 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13715 ::fidl_next::protocol::Flexibility::Flexible;
13716
13717 type Protocol = crate::Receiver;
13718
13719 type Request = crate::wire::ProtocolPayload;
13720 }
13721
13722 mod ___detail {
13723 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Receiver
13724 where
13725 ___T: ::fidl_next::Transport,
13726 {
13727 type Client = ReceiverClient<___T>;
13728 type Server = ReceiverServer<___T>;
13729 }
13730
13731 #[repr(transparent)]
13733 pub struct ReceiverClient<___T: ::fidl_next::Transport> {
13734 #[allow(dead_code)]
13735 client: ::fidl_next::protocol::Client<___T>,
13736 }
13737
13738 impl<___T> ReceiverClient<___T>
13739 where
13740 ___T: ::fidl_next::Transport,
13741 {
13742 #[doc = " Sends a channel to this receiver.\n"]
13743 pub fn receive(
13744 &self,
13745
13746 channel: impl ::fidl_next::Encode<
13747 ::fidl_next::wire::fuchsia::Channel,
13748 <___T as ::fidl_next::Transport>::SendBuffer,
13749 >,
13750 ) -> ::fidl_next::SendFuture<'_, ___T>
13751 where
13752 <___T as ::fidl_next::Transport>::SendBuffer:
13753 ::fidl_next::encoder::InternalHandleEncoder,
13754 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
13755 {
13756 self.receive_with(crate::generic::ProtocolPayload { channel })
13757 }
13758
13759 #[doc = " Sends a channel to this receiver.\n"]
13760 pub fn receive_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
13761 where
13762 ___R: ::fidl_next::Encode<
13763 crate::wire::ProtocolPayload,
13764 <___T as ::fidl_next::Transport>::SendBuffer,
13765 >,
13766 {
13767 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
13768 340832707723008660,
13769 <super::Receive as ::fidl_next::Method>::FLEXIBILITY,
13770 request,
13771 ))
13772 }
13773 }
13774
13775 #[repr(transparent)]
13777 pub struct ReceiverServer<___T: ::fidl_next::Transport> {
13778 server: ::fidl_next::protocol::Server<___T>,
13779 }
13780
13781 impl<___T> ReceiverServer<___T> where ___T: ::fidl_next::Transport {}
13782 }
13783}
13784
13785pub trait ReceiverClientHandler<
13789 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13790 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13791>
13792{
13793 fn on_unknown_interaction(
13794 &mut self,
13795 ordinal: u64,
13796 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13797 ::core::future::ready(())
13798 }
13799}
13800
13801impl<___T> ReceiverClientHandler<___T> for ::fidl_next::IgnoreEvents
13802where
13803 ___T: ::fidl_next::Transport,
13804{
13805 async fn on_unknown_interaction(&mut self, _: u64) {}
13806}
13807
13808impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Receiver
13809where
13810 ___H: ReceiverClientHandler<___T> + ::core::marker::Send,
13811 ___T: ::fidl_next::Transport,
13812{
13813 async fn on_event(
13814 handler: &mut ___H,
13815 ordinal: u64,
13816 flexibility: ::fidl_next::protocol::Flexibility,
13817 body: ::fidl_next::Body<___T>,
13818 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13819 match ordinal {
13820 ordinal => {
13821 handler.on_unknown_interaction(ordinal).await;
13822 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13823 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13824 } else {
13825 Ok(())
13826 }
13827 }
13828 }
13829 }
13830}
13831
13832pub trait ReceiverServerHandler<
13836 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13837 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13838>
13839{
13840 #[doc = " Sends a channel to this receiver.\n"]
13841 fn receive(
13842 &mut self,
13843
13844 request: ::fidl_next::Request<receiver::Receive, ___T>,
13845 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13846
13847 fn on_unknown_interaction(
13848 &mut self,
13849 ordinal: u64,
13850 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13851 ::core::future::ready(())
13852 }
13853}
13854
13855impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Receiver
13856where
13857 ___H: ReceiverServerHandler<___T> + ::core::marker::Send,
13858 ___T: ::fidl_next::Transport,
13859 for<'de> crate::wire::ProtocolPayload: ::fidl_next::Decode<
13860 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13861 Constraint = (),
13862 >,
13863{
13864 async fn on_one_way(
13865 handler: &mut ___H,
13866 ordinal: u64,
13867 flexibility: ::fidl_next::protocol::Flexibility,
13868 body: ::fidl_next::Body<___T>,
13869 ) -> ::core::result::Result<
13870 (),
13871 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13872 > {
13873 match ordinal {
13874 340832707723008660 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13875 Ok(decoded) => {
13876 handler.receive(::fidl_next::Request::from_decoded(decoded)).await;
13877 Ok(())
13878 }
13879 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13880 ordinal: 340832707723008660,
13881 error,
13882 }),
13883 },
13884
13885 ordinal => {
13886 handler.on_unknown_interaction(ordinal).await;
13887 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13888 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13889 } else {
13890 Ok(())
13891 }
13892 }
13893 }
13894 }
13895
13896 async fn on_two_way(
13897 handler: &mut ___H,
13898 ordinal: u64,
13899 flexibility: ::fidl_next::protocol::Flexibility,
13900 body: ::fidl_next::Body<___T>,
13901 responder: ::fidl_next::protocol::Responder<___T>,
13902 ) -> ::core::result::Result<
13903 (),
13904 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13905 > {
13906 match ordinal {
13907 ordinal => {
13908 handler.on_unknown_interaction(ordinal).await;
13909 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13910 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13911 } else {
13912 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13913 ordinal,
13914 flexibility,
13915 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13916 )
13917 .expect("encoding a framework error should never fail")
13918 .await?;
13919 Ok(())
13920 }
13921 }
13922 }
13923 }
13924}
13925
13926pub use fidl_next_common_fuchsia_component_sandbox::*;